by singular · 13y ago · 0 comments
Apologies for semi-hijacking to mention it but, I take a slightly different approach in my personal blog (custom, messy code) - I rsync markdown documents to my webserver which are compiled into HTML and put into a redis in-memory collection which the server uses to render the blog. That gives you in-memory caching for free and avoids having a whole bunch of static files having to be generated every time. I use node on the backend and angular on the frontend to allow for a single-page website.
Currently the solution involves regenerating all HTML each time files are rsync by a script run remotely via SSH, however I ultimately intend for it to use an inotify-style approach to only import files that have actually changed, running both locally and remotely, so publishing an article need only require you to write some markdown and save it in a particular folder.
Though of course all this (currently) requires you to have a server such as linode to which you can rsync + have a remote serving script watch a folder, I mention it so to ask whether anybody would be interested in me cleaning it up and open sourcing it?
However it's more limiting to simply serve static files - you're limited to what you've generated. With redis you can serve it as json data and use it dynamically for e.g. search or showing all articles with a given tag, in a given date range, etc.
Additionally, I'm not a big fan of a whole bunch of static files sat in a folder somewhere that needs to be regenerated every time I change something. Personal preference, perhaps :-)
Check out my website's repo: https://bitbucket.org/devlinzed/devlinzed.com/src. It has a JSON format for just about every URL, but is still entirely static:
http://devlinzed.com/2013/may/keeping-all-your-data-safe
http://devlinzed.com/2013/may/keeping-all-your-data-safe.jso...
Would you care to reveal a little more about where/how you host your site?
Also love the honest assessment that in your repo's description that your setup is "far more neckbeard and far more work" :)