diff --git a/docs/_data/plugins.py b/docs/_data/plugins.py index 05c3aea05b27349881aa3b8fd29cffca48dd80b3..cbac0510eaaef2f22dcce4593f6c701b341d8066 100644 --- a/docs/_data/plugins.py +++ b/docs/_data/plugins.py @@ -401,9 +401,19 @@ def set_copyright(env: dict, git_repo: git.Repo) -> None: first_year = time.strftime("%Y", time.localtime()) curr_year = time.strftime("%Y", time.localtime()) + if first_year == curr_year: + env.variables[ + "date_copyright" + ] = f"Copyright © {curr_year}" + else: + env.variables[ + "date_copyright" + ] = f"Copyright © {curr_year} - {curr_year}" + env.conf[ "copyright" - ] = f"Copyright © {first_year} - {curr_year} {env.variables['copyright']}" + ] = f"{env.variables['date_copyright']} {env.variables['copyright']}" + def set_repo_name(env: dict, repo_slug: str) -> None: @@ -844,7 +854,7 @@ def update_version(env: dict) -> None: } ) last_minor = minor - last_patch = 0 + last_patch = -1 if patch > last_patch: last_patch = patch mike_version.append( diff --git a/templates/docs/_data/plugins.py b/templates/docs/_data/plugins.py index cae7a4e7f868d3ce85eab13bbac1e121e29a9dcf..cbac0510eaaef2f22dcce4593f6c701b341d8066 100644 --- a/templates/docs/_data/plugins.py +++ b/templates/docs/_data/plugins.py @@ -401,13 +401,19 @@ def set_copyright(env: dict, git_repo: git.Repo) -> None: first_year = time.strftime("%Y", time.localtime()) curr_year = time.strftime("%Y", time.localtime()) + if first_year == curr_year: + env.variables[ + "date_copyright" + ] = f"Copyright © {curr_year}" + else: + env.variables[ + "date_copyright" + ] = f"Copyright © {curr_year} - {curr_year}" + env.conf[ "copyright" - ] = f"Copyright © {first_year} - {curr_year} {env.variables['copyright']}" + ] = f"{env.variables['date_copyright']} {env.variables['copyright']}" - env.variables[ - "full_copyright" - ] = f"Copyright © {first_year} - {curr_year} {env.variables['copyright']}" def set_repo_name(env: dict, repo_slug: str) -> None: