build(config): `copyright_info` move to `post.copyright_info`

This commit is contained in:
XPoet 2022-10-28 15:06:33 +08:00
parent d404e93c26
commit cf55a10e8d
3 changed files with 16 additions and 20 deletions

View File

@ -129,17 +129,6 @@ home_article:
# Post page Settings
# ---------------------------------------------------------------------------------------
post:
# Image align position in the post
img_align: left # Option values: left | center
# Post word count
# Dependencies: hexo-wordcount (`npm install hexo-wordcount`)
# See: https://github.com/willin/hexo-wordcount
word_count:
enable: false # Option values: true | false
wordcount: false # Word count, one article. Option values: true | false
min2read: false # Time to read, one article. Option values: true | false
# Author label in the post
author_label:
enable: true # Option values: true | false
@ -151,6 +140,20 @@ post:
# Label array item can be fill one or more
custom_label_list: ["Trainee", "Engineer", "Architect"]
# Post word count
# Dependencies: hexo-wordcount (`npm install hexo-wordcount`)
# See: https://github.com/willin/hexo-wordcount
word_count:
enable: false # Option values: true | false
wordcount: false # Word count, one article. Option values: true | false
min2read: false # Time to read, one article. Option values: true | false
# Image align position in the post
img_align: left # Option values: left | center
# Post copyright info
copyright_info: false # Option values: true | false
# ---------------------------------------------------------------------------------------
# Code block
# Support code copy and code block collapse
@ -177,12 +180,6 @@ toc:
# If true, open TOC every time when you enter the article page
init_open: false # Option values: true | false
# ---------------------------------------------------------------------------------------
# Post copyright info
# ---------------------------------------------------------------------------------------
copyright_info:
enable: false # Option values: true | false
# ---------------------------------------------------------------------------------------
# Website count
# ---------------------------------------------------------------------------------------

View File

@ -35,7 +35,7 @@
<%- page.content %>
</div>
<% if (theme.copyright_info.enable) { %>
<% if (theme.post?.copyright_info === true || theme?.copyright_info?.enable === true) { %>
<div class="post-copyright-info">
<%- partial('_partial/article-copyright-info') %>
</div>

View File

@ -145,7 +145,7 @@ $toc-container-width = 15rem
color var(--text-color-3)
word-wrap break-word
if (hexo-config('copyright_info.enable') == true) {
if (hexo-config('post.copyright_info') == true || hexo-config('copyright_info.enable') == true) {
border-bottom 0.1rem dashed var(--border-color)
}
}
@ -278,4 +278,3 @@ $toc-container-width = 15rem
}
}
}