Add copyright year

This commit is contained in:
Yan Lin 2025-06-18 02:57:44 +02:00
parent 7c34ebc579
commit 4004b4564d
6 changed files with 8 additions and 6 deletions

2
dist/index.html vendored
View file

@ -646,7 +646,7 @@
<footer> <footer>
<div class="container"> <div class="container">
<p class="text-center text-secondary footer-text"> <p class="text-center text-secondary footer-text">
Designed and implemented by Yan Lin. © 2025 - Designed and implemented by Yan Lin.
</p> </p>
</div> </div>
</footer> </footer>

View file

@ -135,7 +135,7 @@
<footer> <footer>
<div class="container"> <div class="container">
<p class="text-center text-secondary footer-text"> <p class="text-center text-secondary footer-text">
Designed and implemented by Yan Lin. © 2025 - Designed and implemented by Yan Lin.
</p> </p>
</div> </div>
</footer> </footer>

View file

@ -199,7 +199,7 @@
<footer> <footer>
<div class="container"> <div class="container">
<p class="text-center text-secondary footer-text"> <p class="text-center text-secondary footer-text">
Designed and implemented by Yan Lin. © 2025 - Designed and implemented by Yan Lin.
</p> </p>
</div> </div>
</footer> </footer>

View file

@ -487,7 +487,7 @@
<footer> <footer>
<div class="container"> <div class="container">
<p class="text-center text-secondary footer-text"> <p class="text-center text-secondary footer-text">
Designed and implemented by Yan Lin. © 2025 - Designed and implemented by Yan Lin.
</p> </p>
</div> </div>
</footer> </footer>

View file

@ -1,5 +1,6 @@
import os import os
import yaml import yaml
from datetime import datetime
from jinja2 import Environment, FileSystemLoader from jinja2 import Environment, FileSystemLoader
@ -8,6 +9,7 @@ if __name__ == '__main__':
profile_data = yaml.safe_load(file) profile_data = yaml.safe_load(file)
env = Environment(loader=FileSystemLoader('templates')) env = Environment(loader=FileSystemLoader('templates'))
current_year = datetime.now().year
os.makedirs('dist', exist_ok=True) os.makedirs('dist', exist_ok=True)
os.makedirs('dist/publications', exist_ok=True) os.makedirs('dist/publications', exist_ok=True)
@ -16,7 +18,7 @@ if __name__ == '__main__':
def render_template(template_name, output_path, **kwargs): def render_template(template_name, output_path, **kwargs):
template = env.get_template(template_name) template = env.get_template(template_name)
html = template.render(**kwargs) html = template.render(year=current_year, **kwargs)
with open(output_path, 'w') as file: with open(output_path, 'w') as file:
file.write(html) file.write(html)

View file

@ -70,7 +70,7 @@
<footer> <footer>
<div class="container"> <div class="container">
<p class="text-center text-secondary footer-text"> <p class="text-center text-secondary footer-text">
Designed and implemented by Yan Lin. © {{ year }} - Designed and implemented by Yan Lin.
</p> </p>
</div> </div>
</footer> </footer>