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.

Here is an example of some loaded settings:

loaded settings

The sequence in which the settings are shown can be different from site to site. I'm not sure why, it may be a YAML thing (Yaml is the tool I use to load the settings with; if they were imported through a Python file you'd have to restart the server for every change). No, actually it's because not every settings file uses all the available keys and that influences the order the keys are displayed.

We have:

  • root: not really the root, but the base location of the converted files (hence the name ''target'' as used elsewhere).

  • source: the base location of the source files. Can be expressed as relative to the root.

  • mirror: the base location of the mirror site. This is where the target files are ultimately copied to.

  • css: the css file to include when converting the source to html. Needs to be an absolute file location

  • all_css: the css files to replace the single css file with when copying to the mirror site (can be more than one). In the settings display these are shown as html LINK elements

  • starthead: lines to copy directly after the <head> element when copying to the mirror site

  • endhead: lines to copy directly before the </head> element when copying to the mirror site

  • wid: width of the text area in the page

  • hig: height of the text area in the page

starthead and endhead 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.

wid and hig are probably a different type of settings, for which the server does have to be restarted when you change them. They were introduced to cater for the difference between screen dimensions on desktops and laptops.