Skip to content

Commit f67cec7

Browse files
authored
Merge pull request #12 from petercorke/docs/footer-convention
Match ecosystem-wide Sphinx doc footer convention
2 parents b67c5fb + a9fc94a commit f67cec7

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

@@ -81,10 +81,11 @@
8181
#
8282
html_theme = "sphinx_rtd_theme"
8383
html_show_sourcelink = True
84-
html_last_updated_fmt = "%d-%b-%Y"
84+
html_last_updated_fmt = "%Y-%m-%d"
8585
show_authors = True
8686

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

0 commit comments

Comments
 (0)