Re: [dev] Anyone interested in C "blogging platform"?

From: Bigby James <>
Date: Fri, 23 May 2014 16:45:58 -0500

> On 05/23, Dimitris Zervas wrote:
> 1: I use git (for versioning and easy management). The posts are written in
> markup. Once you make a new commit, a program (or a script?) is triggered and
> scans the commit, finds the files altered and either interprets the markup
> files (smu [1] is used) and store them as html, so you don't have to do that
> on serve time, or deletes the old cached file. Also, it alters a
> navigation.html file (used in the second piece)
> The git integration and the navigation altering is not done yet.

Git hooks can be used to call just about anything, most existing static site
generators included, and running a post-commit hook to build and push a new post
isn't a bad idea. But if I'm reading this right, your plan is to not process any
of the marked-up content or templates until committing it all to a Git repo. This
would potentially means lots of vacuous commits just test out and debug a
site---just to ensure everything's actually working. Ideally, commits would be
the last thing to happen, and some means of processing a site for previewing
would be desirable. I suppose this would depend on how fancy you want things to
be, though; if you're just going for a minimal text-on-screen look, previews
aren't really important. There are various tips floating around the web for
loop-device web servers in bash that might work.[1][2]

> 2: Blog preprocessor (bpp [2]). It's a small cgi program that just finds
> keywords in the asked page and replaces them with file contents. This is used
> to be able to have a navigation bar and (much later) comment system.
> so, if you ask for myfile.html (the post that smu has cached), bpp will scan
> the file for the "==navigation" keyword and replace it with the contents of
> navigation.html :

mustache[3] is essentially this same idea. What about a pure C mustache
implementation? Or perhaps just using their execution of the idea for some
inspiration yourself.


"A common mistake that people make when trying to design something completely foolproof is to underestimate the ingenuity of complete fools." - Douglas Adams
Received on Fri May 23 2014 - 23:45:58 CEST

This archive was generated by hypermail 2.3.0 : Fri May 23 2014 - 23:48:06 CEST