From 17df6fd2b3bd85acf98c7bfc3b66264b170ee5ee Mon Sep 17 00:00:00 2001 From: Henry Schreiner Date: Wed, 17 Jul 2024 12:32:17 -0400 Subject: [PATCH] docs: link back to source Signed-off-by: Henry Schreiner --- {{cookiecutter.project_name}}/docs/conf.py | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/{{cookiecutter.project_name}}/docs/conf.py b/{{cookiecutter.project_name}}/docs/conf.py index 3f65adf2..81648e7c 100644 --- a/{{cookiecutter.project_name}}/docs/conf.py +++ b/{{cookiecutter.project_name}}/docs/conf.py @@ -1,6 +1,7 @@ from __future__ import annotations import importlib.metadata +from typing import Any project = "{{ cookiecutter.project_name }}" copyright = "{{ cookiecutter.__year }}, {{ cookiecutter.full_name }}" @@ -29,6 +30,26 @@ html_theme = "furo" +html_theme_options: dict[str, Any] = { + {%- if cookiecutter.__ci == "github" %} + "footer_icons": [ + { + "name": "GitHub", + "url": "{{ cookiecutter.url }}", + "html": """ + + + + """, + "class": "", + }, + ], + {%- endif %} + "source_repository": "{{ cookiecutter.url }}", + "source_branch": "main", + "source_directory": "docs/", +} + myst_enable_extensions = [ "colon_fence", ]