Skip to content

Commit f857d67

Browse files
committed
feat: update copyright year dynamically
1 parent e8e03f0 commit f857d67

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

docs/javascripts/copyright_year.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
document.getElementById("copyright-year").textContent = " - " + new Date().getFullYear();

mkdocs.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ extra:
4141
- icon: fontawesome/brands/github
4242
link: https://github.com/apernet/hysteria
4343

44-
copyright: Copyright © 2020 - 2024 The Hysteria Project
44+
copyright: Copyright &copy; 2020<span id="copyright-year"></span> The Hysteria Project
4545

4646
extra_css:
4747
- stylesheets/extra.css
@@ -240,6 +240,7 @@ nav:
240240
- Donation: docs/Donation.md
241241

242242
extra_javascript:
243+
- javascripts/copyright_year.js
243244
- javascripts/mathjax.js
244245
- https://polyfill.io/v3/polyfill.min.js?features=es6
245246
- https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js

0 commit comments

Comments
 (0)