浏览代码

feat(footer): add ability to auto update the copyright year

To use, add `{year}` to `Copyright` option in `config.toml`. Displays
current year.

Close #976
George Cushen 6 年之前
父节点
当前提交
5358dd00ad
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      layouts/partials/footer_section.html

+ 1 - 1
layouts/partials/footer_section.html

@@ -6,7 +6,7 @@
   {{ end }}
 
   <p class="powered-by">
-    {{ with .Site.Copyright }}{{ . | markdownify}} &middot; {{ end }}
+    {{ with .Site.Copyright }}{{ replace . "{year}" now.Year | markdownify}} &middot; {{ end }}
 
     Powered by the
     <a href="https://sourcethemes.com/academic/" target="_blank" rel="noopener">Academic theme</a> for