Skip to content

Comment on Using the C preprocessor as an HTML templating engine

Comments

Why not go all out? Use -DUSERNAME=$USERNAME on the command line to pass in data? Define macros with parameters to affect rendering in complicated ways. Call cpp for every request to generate the html. Could be fun!

I've gotten a series of deranged preprocessor hacks from friends since sharing that repo, the possibilities are ... terrifyingly limitless.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.