content = misc.load_file(config.site_template_prefix + "/" + config.template_file)
content = template.page_title(content)
content = template.site_title(content)
+ content = template.current_year(content)
content = template.body(content)
print(content)
# See LICENSE file for copyright and license details.
# Python imports
-import os
+import os, datetime
# CMless imports
import config, misc
body = misc.process_markup(body)
return template.replace(config.template_delimiter + keyword +
config.template_delimiter, body)
+
+def current_year(template):
+ keyword = "current_year"
+ now = datetime.datetime.now()
+ return template.replace(config.template_delimiter + keyword +
+ config.template_delimiter, str(now.year))
</div>
<div id="footer">
<span class="left">Powered by <a href="https://github.com/subgeniuskitty/cmless">CMless</a></span>
- <span class="right">© 2018 subgeniuskitty.com</span>
+ <span class="right">© %%current_year%% subgeniuskitty.com</span>
</div>
</body>
</html>