diff --git a/docs/compose/setup.rst b/docs/compose/setup.rst index 263ebe51..4dded51e 100644 --- a/docs/compose/setup.rst +++ b/docs/compose/setup.rst @@ -19,17 +19,17 @@ Docker Compose configuration is stored in a file named :download:`docker-compose.yml`. Additionally, Mailu relies on a :download:`.env` file for various settings. Download the proper template files from the git repository. To download the configuration -for the "|version|" branch, use: +for the ``{{ github_version }}`` branch, use: -.. parsed-literal:: +.. code-block:: bash - wget https://mailu.io/|version|/_downloads/docker-compose.yml - wget https://mailu.io/|version|/_downloads/.env + wget https://mailu.io/{{ github_version }}/_downloads/docker-compose.yml + wget https://mailu.io/{{ github_version }}/_downloads/.env Then open the ``.env`` file to setup the mail server. Modify the ``ROOT`` setting to match your setup directory if different from ``/mailu``. -Mdify the ``VERSION`` configuration in the ``.env`` file to reflect the version you picked.. +Mdify the ``VERSION`` configuration in the ``.env`` file to reflect the version you picked. Set the common configuration values ----------------------------------- diff --git a/docs/conf.py b/docs/conf.py index f7aedb53..276d2260 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -2,8 +2,10 @@ # -*- coding: utf-8 -*- # -extensions = ['sphinx.ext.imgmath', - 'sphinx.ext.viewcode'] +import os, sys, docutils + +sys.path.append(os.path.dirname(__file__)) +extensions = ['sphinx.ext.imgmath', 'sphinx.ext.viewcode', 'conf'] templates_path = ['_templates'] source_suffix = '.rst' master_doc = 'index' @@ -37,6 +39,21 @@ html_context = { 'conf_py_path': '/docs/' } + +def setup(app): + """ The conf itself is an extension for parsing rst. + """ + def rstjinja(app, docname, source): + """ Render our pages as a jinja template for fancy templating. + """ + if app.builder.format != 'html': + return + source[0] = app.builder.templates.render_string( + source[0], app.config.html_context) + + app.connect("source-read", rstjinja) + + # Upload function when the script is called directly if __name__ == "__main__": import os, sys, paramiko diff --git a/docs/contributors/guide.rst b/docs/contributors/guide.rst index fb5c7320..705af469 100644 --- a/docs/contributors/guide.rst +++ b/docs/contributors/guide.rst @@ -26,7 +26,7 @@ for trust in a specific branch of the project, we can switch to a shared repository and add a couple of trusted committers. Commits -`````` +``````` This is a community project, thus commits should be readable enough for any of the contributors to guess the content by simply reading the comment or find a diff --git a/docs/contributors/memo.rst b/docs/contributors/memo.rst index e42dfeef..07ac8392 100644 --- a/docs/contributors/memo.rst +++ b/docs/contributors/memo.rst @@ -8,7 +8,7 @@ Mailu uses Babel for internationalization and localization. Before any of your work is merged, you must make sure that your strings are internationalized using Babel. -If you used ``_``, ``{% trans %}`` and other Babel syntaxes in your code, run the +If you used ``_``, ``trans`` blocks and other Babel syntaxes in your code, run the following command to update the POT file: .. code-block:: bash