Use any HTML editor

To comply with the simplicity and flexibility principles of NorthernWind, it must be possible to edit the various HTML files that compose a web site in the way you prefer; perhaps with your favourite desktop HTML editor. Actually, NorthernWind is running my websites since four months now, but I haven't found myself completely at ease when adding new contents. Most of the times I've found myself using a simple text editor to work with HTML markup, while I'd rather use a WYSIWYG editor. After some search, I've even found a good one, BlueGriffon, but it introduced a problem.

The problem lies with the fact that those HTML files are fragments, that is they shouldn't contain <html> and <body> elements, which are instead generated by page templates. Unfortunately, many HTML editors, BlueGriffon included, only support editing a "whole" file, thus they add the unwanted markup when they don't find it.

Just released with version 1.0-ALPHA-12, a new optional filter, HtmlCleanupFilter, fixes the problem: when activated it strips away unwanted markup. To enable it, just add the relevant section to the configuration file:

nw.beans: ..., HtmlCleanupFilter

Sometimes you don't want the clean up to occur: for instance, in case of HTML templates that contains a whole page structure. In this case, it's enough to add in any part of the markup a comment such as:

<!-- @nw.HtmlCleanupFilter.enabled=false -->

which disables the filtering.