diff --git a/.github/ISSUE_TEMPLATE/bug-report.md b/.github/ISSUE_TEMPLATE/bug-report.md new file mode 100644 index 0000000..5a54907 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug-report.md @@ -0,0 +1,70 @@ +--- +name: Bug Report +about: Something isn't working as expected +title: "" +labels: Bug +assignees: "" +--- + +Please follow this Issue template to provide relevant information, such as source code repositories, blog links, and screenshots, which will help us investigate. +请按照此 Issue 模版提供相关信息,例如源码仓库、博客链接和屏幕截图,这将有助于我们进行调查。 + +## Issue Checklist + + + +- [ ] I am using [the latest](https://github.com/Shen-Yu/hexo-theme-ayer) version of hexo-theme-ayer. +- [ ] I have reviewed the latest Roadmap on GitHub and searched for current [Ayer Issues](https://github.com/Shen-Yu/hexo-theme-ayer/issues), which does not help me. + +--- + +## Expected behavior + +## Actual behavior + + + +- Links to demo site with this issue: N/A +- Links to repository or source code of the blog: N/A + +## Steps to reproduce the behavior + +1. N/A +2. N/A +3. N/A + +## Environment Information + +### Node.js and NPM Information + + + +``` + +``` + +### Package dependencies Information + + + +``` + +``` + +### HTML Configuration + + + +``` + +``` + +### MiniValine Configuration + + + +``` + +``` + +## Other Information diff --git a/.github/ISSUE_TEMPLATE/feature-request.md b/.github/ISSUE_TEMPLATE/feature-request.md new file mode 100644 index 0000000..40779ff --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature-request.md @@ -0,0 +1,36 @@ +--- +name: Feature Request +about: Suggest an idea for this project +title: "" +labels: Feature Request +assignees: "" +--- + +Please follow this Issue template to provide relevant information, such as source code repositories, blog links, and screenshots, which will help us investigate. +请按照此 Issue 模版提供相关信息,例如源码仓库、博客链接和屏幕截图,这将有助于我们进行调查。 + +## Issue Checklist + + + +- [ ] I am using [the latest](https://github.com/Shen-Yu/hexo-theme-ayer) version of hexo-theme-ayer. +- [ ] I have reviewed the latest Roadmap on GitHub and searched for current [Ayer Issues](https://github.com/Shen-Yu/hexo-theme-ayer/issues), which does not help me. + +--- + +## Expected behavior + +## Actual behavior + + + +- Links to demo site with this feature: N/A +- Links to repository or source code of the blog: N/A + +## Steps to reproduce the behavior + +1. N/A +2. N/A +3. N/A + +## Other Information diff --git a/.github/ISSUE_TEMPLATE/other.md b/.github/ISSUE_TEMPLATE/other.md new file mode 100644 index 0000000..8c03155 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/other.md @@ -0,0 +1,21 @@ +--- +name: Other +about: Not a question, feature request or bug report +title: "" +labels: "" +assignees: "" +--- + +Please follow this Issue template to provide relevant information, such as source code repositories, blog links, and screenshots, which will help us investigate. +请按照此 Issue 模版提供相关信息,例如源码仓库、博客链接和屏幕截图,这将有助于我们进行调查。 + +## Issue Checklist + + + +- [ ] I am using [the latest](https://github.com/Shen-Yu/hexo-theme-ayer) version of hexo-theme-ayer. +- [ ] I have reviewed the latest Roadmap on GitHub and searched for current [Ayer Issues](https://github.com/Shen-Yu/hexo-theme-ayer/issues), which does not help me. + +--- + +## Other Information diff --git a/.github/ISSUE_TEMPLATE/question.md b/.github/ISSUE_TEMPLATE/question.md new file mode 100644 index 0000000..d34347c --- /dev/null +++ b/.github/ISSUE_TEMPLATE/question.md @@ -0,0 +1,70 @@ +--- +name: Question +about: I have a question for Ayer +title: "" +labels: Question +assignees: "" +--- + +Please follow this Issue template to provide relevant information, such as source code repositories, blog links, and screenshots, which will help us investigate. +请按照此 Issue 模版提供相关信息,例如源码仓库、博客链接和屏幕截图,这将有助于我们进行调查。 + +## Issue Checklist + + + +- [ ] I am using [the latest](https://github.com/Shen-Yu/hexo-theme-ayer) version of hexo-theme-ayer. +- [ ] I have reviewed the latest Roadmap on GitHub and searched for current [Ayer Issues](https://github.com/Shen-Yu/hexo-theme-ayer/issues), which does not help me. + +--- + +## Expected behavior + +## Actual behavior + + + +- Links to demo site with this issue: N/A +- Links to repository or source code of the blog: N/A + +## Steps to reproduce the behavior + +1. N/A +2. N/A +3. N/A + +## Environment Information + +### Node.js and NPM Information + + + +``` + +``` + +### Package dependencies Information + + + +``` + +``` + +### HTML Configuration + + + +``` + +``` + +### Ayer Configuration + + + +``` + +``` + +## Other Information diff --git a/.github/config.yml b/.github/config.yml new file mode 100644 index 0000000..dd81267 --- /dev/null +++ b/.github/config.yml @@ -0,0 +1,12 @@ +# =============================================================================================== # +# Configuration for welcome - https://github.com/behaviorbot/welcome + +# Comment to be posted to on first time issues +newIssueWelcomeComment: > + Thanks for opening this issue, maintainers will get back to you as soon as possible! +# Comment to be posted to on PRs from first time contributors in your repository +newPRWelcomeComment: > + Thanks so much for opening your first PR here! +# Comment to be posted to on pull requests merged by a first time user +firstPRMergeComment: > + Congrats on merging your first pull request here! :tada: How awesome! \ No newline at end of file diff --git a/README.md b/README.md index cb9767b..95b431d 100644 --- a/README.md +++ b/README.md @@ -3,18 +3,17 @@

一个安静且优雅的 Hexo 主题

- LICENSE - - - platform - -
travis-ci js-standard-style +
+ Hubble + + platform + Gitter @@ -22,11 +21,10 @@ GitHub tag (latest by date) - language - - hexo - + language GitHub repo size + LICENSE +

--- diff --git a/_config.yml b/_config.yml index 62cf3a4..87ba9fa 100644 --- a/_config.yml +++ b/_config.yml @@ -97,7 +97,7 @@ rss: /atom.xml darkmode: true # 动态背景效果: 0-关闭,1-动态线条(跟随鼠标) -canvas_bg: 1 +canvas_bg: 0 # 自定义鼠标样式,直接替换/images/mouse.cur文件 mouse: @@ -112,31 +112,6 @@ layout: article_width: 80rem sidebar_width: 8rem -# 评论:1、Valine(推荐);2、Gitalk - -# 1、Valine[一款快速、简洁且高效的无后端评论系统](https://github.com/xCss/Valine) -# 启用Valine必须先创建leancloud应用, 获取 id|key 填入即可 -leancloud: - enable: true - app_id: chaSYi8FMdJBwzIBpxeNjqWC-gzGzoHsz - app_key: PqqkLYgPkHvH1BmyQqySWnSK -# Valine配置 -valine: - enable: true # 是否启用 - verify: false # 是否启用防垃圾验证 - notify: true # 是否开启邮件提醒(https://valine.js.org/notify.html) - avatar: monsterid # 头像样式(https://valine.js.org/avatar.html) - placeholder: 给我的文章加点评论吧~ # placeholder - -# 2、Gitalk(https://github.com/gitalk/gitalk) -gitalk: - enable: false # true - clientID: # GitHub Application Client ID - clientSecret: # Client Secret - repo: # Repository name - owner: # GitHub ID - admin: # GitHub ID - # GitHub Ribbons-封面右上角的forkme,换样式直接在source/images目录下替换forkme图片 github: # (关闭请设置为false) @@ -178,7 +153,7 @@ katex: # 网站成立年份(默认为 2019,若填入年份小于当前年份,则显示为 2018-2019 类似的格式) since: 2015 -# 是否显示页脚信息(建议保留,有助于本主题的推广) +# 是否显示页脚信息(建议保留) pageFooter: true #ICP备案信息尾部显示 @@ -186,3 +161,66 @@ icp: enable: false url: "http://www.beian.miit.gov.cn/" # 备案链接 text: "浙ICP备88888888" # 备案信息 + +# 评论:1、Valine(推荐);2、Gitalk;3、MiniValine + +# 1、Valine[一款快速、简洁且高效的无后端评论系统](https://github.com/xCss/Valine) +# 启用Valine必须先创建leancloud应用, 获取 id|key 填入即可 +leancloud: + enable: true + app_id: chaSYi8FMdJBwzIBpxeNjqWC-gzGzoHsz + app_key: PqqkLYgPkHvH1BmyQqySWnSK +# Valine配置 +valine: + enable: true # 是否启用 + avatar: monsterid # 头像样式(https://valine.js.org/avatar.html) + placeholder: 给我的文章加点评论吧~ # placeholder + +# 2、Gitalk(https://github.com/gitalk/gitalk) +gitalk: + enable: false # true + clientID: # GitHub Application Client ID + clientSecret: # Client Secret + repo: # Repository name + owner: # GitHub ID + admin: # GitHub ID + +# 3、MiniValine +# See: https://github.com/MiniValine/MiniValine +minivaline: + enable: false + mode: DesertsP # DesertsP or xCss + placeholder: Write a Comment # Comment box placeholder + math: true # Support MathJax. + md: true # Support Markdown. + enableQQ: false # Enable QQ avatar API. + NoRecordIP: false # Do not record commenter IP. + visitor: true # Article reading statistics. + maxNest: 6 # Sub-comment maximum nesting depth. + pageSize: 6 # Pagination size. + adminEmailMd5: de8a7aa53d07e6b6bceb45c64027763d # The MD5 of Admin Email to show Admin Flag.[Just Only DesertsP Style mode] + tagMeta: # The String Array of Words to show Flag.[Just Only xCss Style mode] + - 管理员 + - 小伙伴 + - 访客 + master: # The MD5 String Array of master Email to show master Flag.[Just Only xCss Style mode] + - de8a7aa53d07e6b6bceb45c64027763d + friends: # The MD5 String Array of friends Email to show friends Flag.[Just Only xCss Style mode] + - b5bd5d836c7a0091aa8473e79ed4c25e + - adb7d1cd192658a55c0ad22a3309cecf + - 3ce1e6c77b4910f1871106cb30dc62b0 + - cfce8dc43725cc14ffcd9fb4892d5bfc + # MiniValine's display language depends on user's browser or system environment + # If you want everyone visiting your site to see a uniform language, you can set a force language value + # Available values: en | zh-CN | (and many more) + # More i18n info: https://github.com/MiniValine/minivaline-i18n + lang: + # Expression Url. + # https://github.com/MiniValine/MiniValine/blob/master/.github/FAQ.md#how-to-customize-emoticons + emoticonUrl: + - https://cdn.jsdelivr.net/npm/alus@latest + - https://cdn.jsdelivr.net/gh/MiniValine/qq@latest + - https://cdn.jsdelivr.net/gh/MiniValine/Bilibilis@latest + - https://cdn.jsdelivr.net/gh/MiniValine/tieba@latest + - https://cdn.jsdelivr.net/gh/MiniValine/twemoji@latest + - https://cdn.jsdelivr.net/gh/MiniValine/weibo@latest diff --git a/layout/_partial/article.ejs b/layout/_partial/article.ejs index 5d0dfcc..cf1d997 100644 --- a/layout/_partial/article.ejs +++ b/layout/_partial/article.ejs @@ -1,85 +1,65 @@ -
- +
<% if (post.link || post.title){ %>
<%- partial('post/title', {class_name: 'article-title'}) %>
- <% } %> - - <% if (index || is_post()) { %> + <% } %> <% if (index || is_post()) { %> - <% } %> - - <% if (theme.toc && is_post()){ %> - <%- partial('post/tocbot') %> - <% } %> - - <% if (theme.excerpt_all&&index){ %> - <% }else{ %> + <% } %> <% if (theme.toc && is_post()){ %> <%- partial('post/tocbot') %> <% + } %> <% if (theme.excerpt_all&&index){ %> <% }else{ %>
- <%- partial('post/justifiedGallery') %> - <%- partial('post/gallery') %> - <% if (post.excerpt && index){ %> - <%- post.excerpt %> - <% if (theme.excerpt_link){ %> - <%= theme.excerpt_link %> - <% } %> - <% } else { %> - <%- post.content %> - <% } %> + <%- partial('post/justifiedGallery') %> <%- partial('post/gallery') %> <% + if (post.excerpt && index){ %> <%- post.excerpt %> <% if + (theme.excerpt_link){ %> + <%= theme.excerpt_link %> + <% } %> <% } else { %> <%- post.content %> <% } %> - <% if ((theme.reward_type === 2 || (theme.reward_type === 1 && post.reward)) && !index && !post.no_reward){ %> + <% if ((theme.reward_type === 2 || (theme.reward_type === 1 && + post.reward)) && !index && !post.no_reward){ %>
<%= __('post.reward') %>
<% } %>
<% } %> - - - <% if (((theme.copyright_type === 2) || (theme.copyright_type === 1 && post.copyright)) && !index){ %> -
-
    -
  • - - <%= __('post.copyright_title') %>: - <%= __('post.copyright_content') %> -
  • -
-
- <% } %> + + + <% if (((theme.copyright_type === 2) || (theme.copyright_type === 1 && + post.copyright)) && !index){ %> +
+
    +
  • + + <%= __('post.copyright_title') %>: + <%= __('post.copyright_content') %> +
  • +
+
+ <% } %> -
- <% if (!index){ %> - <%- partial('post/nav') %> - <% } %> - - <% if (theme.valine && theme.valine.enable && !post.no_valine){ %> - <%- partial('post/valine', { - key: post.slug, - title: post.title, - url: config.url+url_for(post.path) - }) %> - <% } %> - - <% if (is_post()) { %> - <%- partial('post/gitalk') %> - <% } %> - -
\ No newline at end of file + <% if (!index){ %> <%- partial('post/nav') %> <% } %> <% if (theme.valine && + theme.valine.enable && !post.no_valine){ %> <%- partial('post/valine', { key: + post.slug, title: post.title, url: config.url+url_for(post.path) }) %> <% } %> + <% if (is_post()) { %> <%- partial('post/gitalk') %> <% } %> <% if + (theme.minivaline && theme.minivaline.enable && !post.no_minivaline){ %> <%- + partial('post/minivaline') %> <% } %> +
diff --git a/layout/_partial/post/minivaline.ejs b/layout/_partial/post/minivaline.ejs new file mode 100644 index 0000000..91aa117 --- /dev/null +++ b/layout/_partial/post/minivaline.ejs @@ -0,0 +1,88 @@ +<% if (!index && theme.leancloud && theme.leancloud.enable){ %> + +
+
+
+ + + +<% } %> diff --git a/layout/_partial/post/valine.ejs b/layout/_partial/post/valine.ejs index fef14fb..39c9a97 100644 --- a/layout/_partial/post/valine.ejs +++ b/layout/_partial/post/valine.ejs @@ -1,51 +1,48 @@ <% if (!index && theme.leancloud && theme.leancloud.enable){ %>
-
-
+
- + -<% } %> \ No newline at end of file +<% } %> diff --git a/layout/layout.ejs b/layout/layout.ejs index 1616e91..f84d86f 100644 --- a/layout/layout.ejs +++ b/layout/layout.ejs @@ -2,6 +2,22 @@
+ <% if (theme.click_effect===2){ %> + + + <% } %> + <% if (theme.click_effect===3){ %> + + <% } %>
<%- body %> <%- partial('_partial/footer', null, {cache: !config.relative_link}) %> @@ -24,23 +40,6 @@ <% if (theme.music&&theme.music.enable){ %> <%- partial('_partial/music') %> <% } %> - - <% if (theme.click_effect===2){ %> - - - <% } %> - <% if (theme.click_effect===3){ %> - - <% } %>