I have multiple HTML files which vary only by a little – a few bits of text and Javascript constants here and there. I want to make it easy to maintain one master version and make generating the variants simple.
Something like the compile time substitution in C/C++ would be simple and perfect:
#define CONSTANT 1.23456
How? Any ideas?
Additional info:
- Using HTML 5
- These HTML files are for use in PhoneGap, so no server-side stuff allowed.
You can use a templating engine for that. I for one am very content with this one from twitter http://twitter.github.com/hogan.js/