Rst2HTML settings
The application uses settings that originally could only be edited from outside the application. Since most of the settings are file locations for which you don't need a server restart to activate them, I made it possible to load, save and edit them as in to have a kind of multi-site support.
That means you can change the site you're working on without restarting the server. Since you can see (and edit) which settings are loaded, you can always know which site you're working on.
On application startup the settings of the site set as default in the server configuration are loaded (note that each data backend can have a different default), for example:
You can then change site using a simple load-function:
And change settings using the save function:
A new site can be created by choosing "- new -" when loading - you will then get a minimum default set of settings - or by loading the settings of an existing one and then saving them under a different name (using the "new name" field).
Possible settings
url: the web address for the root of the mirror site (needs to be configured in the "hosts" file and the server configuration on the local machine)
css: on or more names of css files to include when converting the source to HTML. Can be an absolute location or relative to the address in the url setting. Must start with either "http" or "url + ".
wid: width of the text area in the page
hig: height of the text area in the page
writer: name of the docutils converter to use ("html4" or "html5")
These five settings are oblibatory and are loaded into the source area when you "load settings" using "new".
The application will work without a sensible value for url but you can't refer to a mirror site.
css is necessary to properly render the result HTML.
wid and hig originally defined the size of the textarea but I needed a predfined size for using the syntax highlighting so every value now gives the same result except when you're in non-highlight mode. These values were configurable so that you could change them according to the display you were using; to activate the changes you don't have to restart the server, just reload the settings.
The following settings may be omitted:
lang: language to use the button- and notification texts (currently "en" and "nl" possible and if it's not present "en" is used)
seflinks: 0 of 1, indicates whether hyperlinks point to files (ending in .html) or to directories (always showing their index.html) or not. sef stands for *search engine friendly"; if you don't specify this "0" is used)
highlight: 0 (default) or 1, indicates whether syntax highlighting should be active in the text field
blurb: "site-slogan" to show on every page that uses the header directive
do-not-generate: list of documents that should be skipped in the automatic regeneration
image: (relative) link to an image to display on each page that uses the header directive
menu: document with menulinks to show on each page where the header directive is used
starthead: extra lines to copy directly after the <head> element when copying to the mirror site
endhead: extra lines to copy directly before the </head> element when copying to the mirror site
I added the last two settings to provide a way to copy extra stuff into the page that is only needed in the final display, for instance javascript or extra css files. It's only added to the source that is copied to the mirror site.