diff --git a/docs/conf.py b/docs/conf.py index 551ef28..2e5e1be 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -2,6 +2,9 @@ # # For the full list of built-in configuration values, see the documentation: # https://www.sphinx-doc.org/en/master/usage/configuration.html +# +# NOTE: This file is designed to be synced across all IATI documentation repos. +# Project-specific settings are imported from project_info.py. import os @@ -10,14 +13,15 @@ import iati_sphinx_theme +# Import project-specific settings +from project_info import project, github_repository, languages + MESSAGE_CATALOG_NAME = "iati-sphinx-theme" _ = get_translation(MESSAGE_CATALOG_NAME) # -- Project information ----------------------------------------------------- # https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information -# These are kept for compatibility but shouldn't appear anywhere on the final website. -project = "IATI Docs Base" author = "IATI Secretariat" language = "en" @@ -39,11 +43,11 @@ html_theme = "iati_sphinx_theme" html_theme_options = { # See https://iati-sphinx-theme.readthedocs-hosted.com/en/latest/#configuration for additional options and info - "github_repository": "https://github.com/IATI/sphinx-theme", - "header_title_text": _("IATI Docs Base"), + "github_repository": github_repository, + "header_title_text": _(project), "header_eyebrow_text": _("IATI Documentation"), - "languages": ["en", "fr", "es"], - "project_title": _("IATI Docs Base"), + "languages": languages, + "project_title": _(project), "show_download_links": True, } diff --git a/docs/project_info.py b/docs/project_info.py new file mode 100644 index 0000000..5f0cad0 --- /dev/null +++ b/docs/project_info.py @@ -0,0 +1,12 @@ +# Project-specific configuration for Sphinx documentation. +# This file contains settings that vary per repository. +# The main conf.py imports these values and can be synced across all repos. + +# Project name (used for titles, headers, and Sphinx internals) +project = "IATI Docs Base" + +# GitHub repository URL (for "Edit on GitHub" links) +github_repository = "https://github.com/IATI/iati-docs-base" + +# Supported languages for the documentation +languages = ["en", "fr", "es"]