I’m not sure if it’s technically sound …

I’m not sure if it’s technically sound to do things this way, but you can now do content templating using jQuery. Do everything in the browser with jQuery javascript, no need for server–side parsing.