Permalink
Browse files

add: options for Copyright info. & TOC 目录和文末信息设置

Closes #30
  • Loading branch information...
MOxFIVE committed Jan 27, 2016
1 parent 946ff7c commit 60a984c1cd97df7410cf3e15da76cbf2f509dd23
Showing with 23 additions and 4 deletions.
  1. +14 −1 README.md
  2. +6 −0 _config.yml
  3. +2 −2 layout/_partial/article.ejs
  4. +1 −1 layout/_partial/post/nav.ejs
View
@@ -151,12 +151,25 @@ Remove toc and the button via putting `toc: false` before "---" at [post].md.
文章中默认显示目录和对应切换按钮,在文章 “---” 前输入 `toc: false` 关闭目录。
Hide toc in default | 默认不显示目录
> Set `toc: false` in `yelee/_config.yml`.
(*Set `toc: true` in front-matter to show it in certain post*)
#### 7. Copyright info. 文章版权信息:
Hide this via putting `original: false` to post's front-matter.
Hide this via putting `original: false` to post's front-matter.
在文章顶部插入行 `original: false` 关闭文章版权声明框
Hide Copyright info. in default | 默认不显示版权信息
> Set `copyright: false` in `yelee/_config.yml`.
(*Set `original: true` in front-matter to show it in certain post*)
#### 8. 404 Page:
```
View
@@ -101,6 +101,12 @@ blockquote_style:
# 左边栏宽度 px
left_col_width: 300
# Copyright info. of post | 文末版权信息
copyright: true
# Table of contents | 文章目录
toc: true
# 目录中标题不换行
# Keep TOC title on the same line |
toc_nowrap: false
@@ -56,11 +56,11 @@
<%- partial('post/nav') %>
<% } %>
</article>
<% if (!index && post.toc != false && !is_page()){ %>
<% if (!index && ((post.toc != false && !is_page() && theme.toc) || post.toc)){ %>
<%- partial('_partial/toc') %>
<% } %>
<% if (!index && theme.share){ %>
<%- partial('post/share') %>
<%- partial('post/share') %>
<% } %>
<% if (!index && post.comments){ %>
@@ -1,4 +1,4 @@
<% if (post.original != false && !is_page()){ %>
<% if ((post.original != false && !is_page() && theme.copyright) || post.original){ %>
<div class="copyright">
<p><span>本文标题:</span><a href="<%- url_for(post.path) %>"><%= post.title %></a></p>
<p><span>文章作者:</span><a href="/" title="访问 <%=theme.author%> 的个人博客"><%=theme.author%></a></p>

0 comments on commit 60a984c

Please sign in to comment.