Comment on Using the C preprocessor as an HTML templating engineComments−sour-taste2yWhy 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!−cedric_hOP2yI've gotten a series of deranged preprocessor hacks from friends since sharing that repo, the possibilities are ... terrifyingly limitless.
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.