Skip to content

Commit eaa63d8

Browse files
authored
Merge pull request #199 from tekktrik/dev/evergreen-pt-2
Use year range in RTD copyright attribtuion
2 parents 34932a7 + 4dc63e3 commit eaa63d8

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

{{ cookiecutter.__dirname }}/docs/{% if cookiecutter.sphinx_docs in ['y', 'yes'] %}conf.py{% endif %}

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,14 @@ master_doc = "index"
5353

5454
# General information about the project.
5555
project = "{% if cookiecutter.target_bundle != 'CircuitPython Org' %}{% if cookiecutter.library_prefix %}{{ cookiecutter.library_prefix | capitalize }} {% endif %}{% endif %}CircuitPython {{ cookiecutter.library_name }} Library"
56+
creation_year = "{% now 'utc', '%Y' %}"
5657
current_year = str(datetime.datetime.now().year)
57-
copyright = current_year + " {{ cookiecutter.author_name }}"
58+
year_duration = (
59+
current_year
60+
if current_year == creation_year
61+
else creation_year + " - " + current_year
62+
)
63+
copyright = year_duration + " {{ cookiecutter.author_name }}"
5864
author = "{{ cookiecutter.author_name }}"
5965

6066
# The version info for the project you're documenting, acts as replacement for

0 commit comments

Comments
 (0)