nwsc, the New Web Site Compiler, is a program I wrote last year to assist me in maintaining my static web sites, including this one.

It takes in HTML files and processes several macros in them to output a finished HTML product. The macros can generate tables of contents from HTML headers, navigation menus from directory structures, include other files, and a handful of other things.

The program only works on Linux as far as I know.


See the man page.

Addendum to the manpage: right now, due to hacks in the released code, to use it, you must create a folder called src_root, and call the program from src_root/../

This will be corrected later.

Support and bug reports

Contact me and included nwsc in the subject line.

Future directions

I'd like to do better integration with my dynamic template system.

I'd also like to see the inline math macros work.

I might change how the command line arguments work.

Project History

You might be curious: if this is the New web site compiler, what was my old web site compiler?

Well, it was a small program that automatically added a hard-coded header and footer to a list of pages, defined in a text file, along with an auto-generated hierarchal navigation menu.

nwsc is meant to be a whole replacement for that, incorporating all its features and more. I set out to write it so writing long essays would be easier, which is why it has footnote and table of contents support.

I'm pretty happy with it, but it isn't quite perfect yet, as it still displays filenames in the nav menu, where titles might be better.


This program is copyright Adam D. Ruppe, 2007, and released under the GNU GPL.

Source tarball. To compile, just type make. It doesn't do a proper install; just run it from the source directory or copy it manually if you want to /usr/bin.