|
| 1 | +# Configuration file for the modi-helper-scripts documentation site. |
| 2 | +# import sphinx_rtd_theme |
| 3 | + |
| 4 | +from configparser import ConfigParser |
| 5 | +import os |
| 6 | +from types import SimpleNamespace |
| 7 | + |
| 8 | +_SITE_DIR = os.path.dirname(os.path.abspath(__file__)) |
| 9 | + |
| 10 | + |
| 11 | +def _sitevars_and_epilog(): |
| 12 | + parser = ConfigParser() |
| 13 | + parser.read(os.path.join(_SITE_DIR, "variables.ini")) |
| 14 | + |
| 15 | + sitevars = SimpleNamespace(**parser['site']) |
| 16 | + |
| 17 | + epilog_lines = [".. |%s| replace:: %s" % (k, v) for k, v in sitevars.__dict__.items()] |
| 18 | + epilog = '\n'.join(epilog_lines) |
| 19 | + |
| 20 | + return sitevars, epilog |
| 21 | + |
| 22 | + |
| 23 | +# -- Project information ----------------------------------------------------- |
| 24 | + |
| 25 | +sitevars, rst_epilog = _sitevars_and_epilog() |
| 26 | +project = "%s support" % (sitevars.project_name,) |
| 27 | +copyright = "2023 SCIENCE HPC Center Support Team" |
| 28 | +author = "SCIENCE HPC Center Support Team" |
| 29 | + |
| 30 | + |
| 31 | +# -- General configuration --------------------------------------------------- |
| 32 | + |
| 33 | +# Add any Sphinx extension module names here, as strings. They can be |
| 34 | +# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom |
| 35 | +# ones. |
| 36 | +extensions = [ |
| 37 | + "sphinx_rtd_theme", |
| 38 | + "sphinxemoji.sphinxemoji", |
| 39 | +] |
| 40 | +pygments_style = 'sphinx' |
| 41 | +# Add any paths that contain templates here, relative to this directory. |
| 42 | +templates_path = ["_templates"] |
| 43 | + |
| 44 | +# List of patterns, relative to source directory, that match files and |
| 45 | +# directories to ignore when looking for source files. |
| 46 | +# This pattern also affects html_static_path and html_extra_path. |
| 47 | +exclude_patterns = [] |
| 48 | + |
| 49 | +# HTML logo which will show on top of the sidebar |
| 50 | +html_logo = "../../_static/faelles.svg" |
| 51 | + |
| 52 | +# -- Options for HTML output ------------------------------------------------- |
| 53 | + |
| 54 | +# The theme to use for HTML and HTML Help pages. See the documentation for |
| 55 | +# a list of builtin themes. |
| 56 | +# |
| 57 | +html_theme = "sphinx_rtd_theme" |
| 58 | + |
| 59 | +# Add any paths that contain custom static files (such as style sheets) here, |
| 60 | +# relative to this directory. They are copied after the builtin static files, |
| 61 | +# so a file named "default.css" will overwrite the builtin "default.css". |
| 62 | +html_static_path = ["../../_static"] |
| 63 | +html_css_files = [] |
| 64 | +# Favicon for browsertab etcetera |
| 65 | +html_favicon = '../../_static/favicon.ico' |
0 commit comments