1
To build a single application out of source code split in multiple files for organisation, one would use tools such as make
.
So let's say you want to do the same, but for a HTML document. Maybe you have a long manual that's a hassle to edit all at once, so you split it in parts surrounded by <article>
or <section>
tags. And it'd be nice to add a table of contents on top out of the h1
elements.
How would you go about doing that? Is there some standard tool built for it? Can you pull it off with make
? Or would you write, say, a python script to do the parsing and compilation for you?
I realise there are different markup languages (such as TeX, which I already know) with such features available, but after reading about the more formal / semantic purposes of HTML5 in particular, it strikes me as a markup language well-suited for such "compilation" processes, but I can't name any tool that could pull it off (save for writing your own scripts).
1
make
is just a scripting engine. And I believe what you're trying to do is called text file concatenation. – gronostaj – 2013-11-14T21:01:23.183If I were doing this with static content, I'd write it in LaTeX and render it to HTML. If I were doing this with dynamic content, then use a javascript HTML templating engine and backend server programming language of your choice. – Darth Android – 2013-11-14T21:10:37.697
Templating sounds like an interesting solution. – None – 2013-11-14T21:14:51.507