From fcfb39b8f2924eaa7928c3235bfc1cdad2cabdff Mon Sep 17 00:00:00 2001 From: Justin Mayer Date: Mon, 1 Aug 2022 12:40:26 +0200 Subject: [PATCH] Improve copyright year logic in Sphinx configuration --- docs/conf.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/conf.py b/docs/conf.py index a391bffa..0211c71a 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -1,3 +1,4 @@ +import datetime import os import sys @@ -13,7 +14,8 @@ extensions = ['sphinx.ext.autodoc', source_suffix = '.rst' master_doc = 'index' project = 'Pelican' -copyright = '2010 – present, Justin Mayer, Alexis Metaireau, and contributors' +year = datetime.datetime.now().date().year +copyright = f'2010–{year}' exclude_patterns = ['_build'] release = __version__ version = '.'.join(release.split('.')[:1])