Skip to content

Commit 0ef1721

Browse files
authored
chore: make docs copyright year automatic (#1313)
* chore: make docs copyright year automatic * update license year
1 parent 903ae01 commit 0ef1721

File tree

4 files changed

+11
-2
lines changed

4 files changed

+11
-2
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,3 +110,4 @@ nb-configuration.xml
110110
/.phpunit.*.cache
111111

112112
/.php-cs-fixer.php
113+
/docs/assets/__pycache__/

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
The MIT License (MIT)
22

33
Copyright (c) 2020-2022 Lonnie Ezell
4-
Copyright (c) 2022-2025 CodeIgniter Foundation
4+
Copyright (c) 2022-present CodeIgniter Foundation
55

66
Permission is hereby granted, free of charge, to any person obtaining a copy
77
of this software and associated documentation files (the "Software"), to deal

docs/assets/hooks.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
from datetime import datetime
2+
3+
def on_config(config, **kwargs):
4+
config.copyright = config.copyright.format(year=datetime.now().year)
5+
return config

mkdocs.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,10 @@ extra:
5757
site_url: https://shield.codeigniter.com/
5858
repo_url: https://github.com/codeigniter4/shield
5959
edit_uri: edit/develop/docs/
60-
copyright: Copyright © 2023-2025 CodeIgniter Foundation.
60+
copyright: Copyright © 2022-{year} CodeIgniter Foundation.
61+
62+
hooks:
63+
- docs/assets/hooks.py
6164

6265
markdown_extensions:
6366
- pymdownx.superfences

0 commit comments

Comments
 (0)