Skip to content

Commit a9fc94a

Browse files
petercorkeclaude
andcommitted
Match ecosystem-wide Sphinx doc footer convention
Per rvc-ecosystem AGENTS.md section 5: footer left side reads exactly "Copyright (c) 20xx-present, Peter Corke: built YYYY-MM-DD", right side is a smaller-font GitHub link back to the repo. Copies bdsim's reference implementation (2026-08-16), the pair this convention was established with: - docs/source/_templates/footer.html: overrides sphinx_rtd_theme's default footer (which reads "(c) Copyright ... Last updated on DD-Mon-YYYY") with the exact left-side text, plus the GitHub link. - docs/source/_static/custom.css: flexbox on the footer's contentinfo div so the GitHub link actually renders on the right -- a plain <a> tag with no CSS just falls inline below the copyright line. Also fixes conf.py to match: copyright was "2020, Peter Corke" (no "-present"), and html_last_updated_fmt was "%d-%b-%Y" instead of "%Y-%m-%d" (the format the new footer template actually expects). As a side effect this also resolves a pre-existing, unrelated build warning: html_static_path already listed "_static" in conf.py, but the directory didn't exist on disk, so every build warned "html_ static_path entry '_static' does not exist" -- creating the directory for custom.css fixes that too. Verified: real Sphinx build renders the exact expected footer text ("Copyright (c) 2020-present, Peter Corke: built 2026-09-03.") with the GitHub link correctly positioned via the loaded custom.css. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
1 parent 6c24cfe commit a9fc94a

3 files changed

Lines changed: 31 additions & 2 deletions

File tree

‎docs/source/_static/custom.css‎

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
/* Footer layout: copyright on the left, GitHub link on the right in smaller font. */
2+
div[role="contentinfo"] {
3+
display: flex;
4+
justify-content: space-between;
5+
align-items: baseline;
6+
flex-wrap: wrap;
7+
}
8+
9+
div[role="contentinfo"] p {
10+
margin: 0;
11+
}
12+
13+
.footer-github-link {
14+
font-size: 0.85em;
15+
}

‎docs/source/_templates/footer.html‎

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{% extends "!footer.html" %}
2+
{% block contentinfo %}
3+
<p>
4+
{%- if show_copyright %}
5+
{%- trans copyright=copyright|e %}Copyright &#169; {{ copyright }}{% endtrans -%}
6+
{%- endif %}
7+
{%- if last_updated %}
8+
{%- trans last_updated=last_updated|e %}: built {{ last_updated }}{% endtrans %}
9+
{%- endif -%}
10+
.
11+
</p>
12+
<a href="https://github.com/petercorke/pgraph-python" class="footer-github-link">GitHub</a>
13+
{% endblock %}

‎docs/source/conf.py‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
# -- Project information -----------------------------------------------------
2020

2121
project = "Simple graph functionality for Python"
22-
copyright = "2020, Peter Corke"
22+
copyright = "2020-present, Peter Corke"
2323
author = "Peter Corke"
2424

2525

@@ -80,10 +80,11 @@
8080
#
8181
html_theme = "sphinx_rtd_theme"
8282
html_show_sourcelink = True
83-
html_last_updated_fmt = "%d-%b-%Y"
83+
html_last_updated_fmt = "%Y-%m-%d"
8484
show_authors = True
8585

8686
# Add any paths that contain custom static files (such as style sheets) here,
8787
# relative to this directory. They are copied after the builtin static files,
8888
# so a file named "default.css" will overwrite the builtin "default.css".
8989
html_static_path = ["_static"]
90+
html_css_files = ["custom.css"]

0 commit comments

Comments
 (0)