Procod

Professional Software Development

HTML Authoring with m4

For my websites, I wanted:

I used to use Macromedia Dreamweaver for HTML authoring. Dreamweaver has these two features, templates and library items, which are sopposed to solve the problems presented above. But I think these features in Dreamweaver are hard to use, fragile and inflexible. I wanted a better solution, and I realized: I just need a macro processor.

I decided to use m4, a macro processor coming from the Unix world, which is also available on Windows. This was my first contact with m4, and I'm very happy I found and used it. M4 made authoring my site significantly simpler.

You can find here the m4 files I used for generating the Procod and PicoStorage sites:

I also used CSS to somehow separate the content from the presentation: pico_yellow.css

More, I wanted to give the user feedback on the sidebar about which page he is viewing: the link on the sidebar pointing to the current page should be disabled, and showed differently. A neat solution was to do this client-side by using a small javascript: pico.js