summaryrefslogtreecommitdiff
path: root/_includes
diff options
context:
space:
mode:
authorYuchen Zhang <anthony.yuchen@gmail.com>2021-06-28 19:31:58 -0700
committerGitHub <noreply@github.com>2021-06-29 10:31:58 +0800
commitb3e6ee2f69a463e7c0ba075b488c3a3959096c94 (patch)
tree807697587aa4e86cc509cb6a40eb67e627fcc3e8 /_includes
parent4e3e599bbff99261206cefaa1159e61d7d353262 (diff)
feat: support copyright placeholders/variables (#46)
* feat: re-format copyright message and auto increase current year * docs: add comment for copyright setting This comment is crucial, especially for newcomers. * refactor: better liquid code format Co-authored-by: jeffreytse <jeffreytse.mail@gmail.com>
Diffstat (limited to '_includes')
-rw-r--r--_includes/views/footer.html10
1 files changed, 9 insertions, 1 deletions
diff --git a/_includes/views/footer.html b/_includes/views/footer.html
index 86650e1..78f2f6d 100644
--- a/_includes/views/footer.html
+++ b/_includes/views/footer.html
@@ -3,7 +3,15 @@
<div class="wrapper">
<div class="site-footer-inner">
- <div>{{ site.copyright }} {% if site.author %}@{{ site.author | escape }}{% endif %}</div>
+ <div>
+ {%- assign currYear = 'now' | date: "%Y" -%}
+ {{ site.copyright
+ | replace: '{currentYear}', currYear
+ | replace: '{author}', site.author
+ | replace: '(c)', '&copy;'
+ | replace: '(p)', '℗'
+ | replace: '(cleft)', '<span class="copyleft">&copy;</span>'
+ }}</div>
<div>Powered by <a title="Jekyll is a simple, blog-aware, static site
generator." href="http://jekyllrb.com/">Jekyll</a> &amp; <a title="Yat, yet
another theme." href="https://github.com/jeffreytse/jekyll-theme-yat">Yat Theme</a>.</div>