ferenda.sources.general.Static – generate documents from your own .rst files¶
-
class
ferenda.sources.general.Static(config=None, **kwargs)[source]¶ Generates documents from your own
.rstfilesThe primary purpose of this docrepo is to provide a small set of static pages for a complete ferenda-based web site, like “About us”, “Contact information”, “Terms of service” or whatever else you need. The
downloadstep of this docrepo does not do anything, and it’sparsestep reads ReStructuredText (.rst) files from a local directory and converts them into XHTML+RDFa. From that point on, it works just like any other docrepo.After enabling this, you should set the configuration parameter
staticdirto the path of a directory where you keep your.rstfiles:[static] class = ferenda.sources.general.Static staticdir = /var/www/mysite/static/rst
Note
If this configuration parameter is not set, this docrepo will use a small set of generic static pages, stored under
ferenda/res/static-pagesin the distribution. To get started, you can just copy this directory and setstaticdirto point at your copy.If a rst file has a special :footer-order: directive directly underneath the main title, it will result in a link in the site footer. The link text will be the title of the document, i.e. the first header in the
.rstfile. The order of those links is controlled by the value of :footer-order:, which should be an integer.