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
.rst
filesThe 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
download
step of this docrepo does not do anything, and it’sparse
step 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
staticdir
to the path of a directory where you keep your.rst
files:[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-pages
in the distribution. To get started, you can just copy this directory and setstaticdir
to 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
.rst
file. The order of those links is controlled by the value of :footer-order:, which should be an integer.