Skip to content

Commit

Permalink
fix: Solved that set toc & copyright & reward invalid in front-matter
Browse files Browse the repository at this point in the history
  • Loading branch information
liuyib committed Sep 14, 2019
1 parent 7b859df commit 6d4149c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
5 changes: 3 additions & 2 deletions layout/_partials/sidebar/sidebar.pug
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
- var isShowToc = page.toc || (theme.toc.enable && is_post())
- var fa_prefix = theme.fa_prefix || 'fa'
-
var fa_prefix = theme.fa_prefix || 'fa';
var isShowToc = is_post() && (!(page.toc === false) && (theme.toc && theme.toc.enable));
if isShowToc
div.sidebar-nav
Expand Down
4 changes: 2 additions & 2 deletions layout/post.pug
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ block content
span= __("post.end")
span= " ------"

if page.copyright || (theme.creative_commons.enable && theme.creative_commons.post)
if !(page.copyright === false) && (theme.creative_commons.enable && theme.creative_commons.post)
include ./_partials/widgets/copyright.pug

if theme.post_widget.tags
Expand All @@ -32,7 +32,7 @@ block content
i.post-tags-item__i(class=`${fa_prefix} fa-tags`)
a.post-tags-item__a(href=tag.permalink)= tag.name

if page.reward || (theme.reward && theme.reward.enable)
if !(page.reward === false) && (theme.reward && theme.reward.enable)
include ./_partials/widgets/reward.pug

include ./_partials/widgets/pagination.pug
2 changes: 1 addition & 1 deletion source/css/_common/components/widgets/index.styl
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@
@import './lazyload.styl' if (hexo-config('lazyload.enable'));
@import './loading-bar.styl' if (hexo-config('pjax.enable'));
@import './comments.styl';
@import './copy-button.styl'
@import './copy-button.styl';
@import './sticky-top.styl';
@import './pagination.styl';

0 comments on commit 6d4149c

Please sign in to comment.