diff --git a/.github/ISSUE_TEMPLATE/bug-report.yml b/.github/ISSUE_TEMPLATE/bug-report.yml index 9f9067a26..1520be43f 100644 --- a/.github/ISSUE_TEMPLATE/bug-report.yml +++ b/.github/ISSUE_TEMPLATE/bug-report.yml @@ -10,7 +10,7 @@ body: attributes: value: | Please follow this Issue template to provide relevant information, such as source code repository, website URL and screenshots, which will help us investigate. - 请按照此 Issue 模版提供相关信息,例如源码仓库、网站链接和屏幕截图,这将有助于我们进行调查。 + 请按照此 Issue 模版提供相关信息,例如源码仓库、网站链接和屏幕截图,这将有助于我们进行排查。 - type: checkboxes id: checklist @@ -20,11 +20,11 @@ body: I made sure I checked 我确认我已经检查过了 options: - - label: I am using Keep version 3.8.5 or later. + - label: I am using Keep version `4.0.0` or later. (使用 Keep 4.0.0 或更高版本) required: true - - label: I have already read the [Troubleshooting page of Hexo](https://hexo.io/docs/troubleshooting) and [Keep documents](https://keep-docs.xpoet.cn). + - label: I have already read the [Troubleshooting page of Hexo](https://hexo.io/docs/troubleshooting) and [Keep documents](https://keep-docs.xpoet.cn). (已阅读 [Hexo 故障处理页面](https://hexo.io/docs/troubleshooting) 和 [Keep 文档](https://keep-docs.xpoet.cn)) required: true - - label: I have already searched for current [issues](https://github.com/XPoet/hexo-theme-keep/issues), which does not help me. + - label: I have already searched for current [issues](https://github.com/XPoet/hexo-theme-keep/issues), which does not help me. (已搜索 [Issues](https://github.com/XPoet/hexo-theme-keep/issues),对我没有帮助) required: true - type: textarea @@ -45,9 +45,10 @@ body: Please provide the following information 请提供以下信息 value: | - - Links to demo site with this issue: - - Links to repository or source code of the blog: - - Screenshots: + - Links to demo site with this issue (链接到这个 Issue 的演示网站) + - Links to source code of the blog with this issue (链接到这个 Issue 的博客源代码) + - Screenshots(屏幕截图) + validations: required: true @@ -59,14 +60,15 @@ body: Please provide a detailed description of the steps to reproduce the issue 请仔细描述重现步骤 value: | - 1. First step ... - 2. Second step ... - 3. Third step ... + 1. First step ... (第一步 ...) + 2. Second step ... (第二步 ...) + 3. Third step ... (第三步 ...) + validations: required: true - type: markdown - id: env + id: env-info attributes: value: | ## Environment Information | 环境信息 diff --git a/.github/ISSUE_TEMPLATE/feature-request.yml b/.github/ISSUE_TEMPLATE/feature-request.yml index e8ceca3ea..437b862ba 100644 --- a/.github/ISSUE_TEMPLATE/feature-request.yml +++ b/.github/ISSUE_TEMPLATE/feature-request.yml @@ -10,7 +10,7 @@ body: attributes: value: | Please follow this Issue template to provide relevant information, such as source code repository, website URL and screenshots, which will help us investigate. - 请按照此 Issue 模版提供相关信息,例如源码仓库、网站链接和屏幕截图,这将有助于我们进行调查。 + 请按照此 Issue 模版提供相关信息,例如源码仓库、网站链接和屏幕截图,这将有助于我们进行排查。 - type: checkboxes id: checklist @@ -20,11 +20,11 @@ body: I made sure I checked 我确认我已经检查过了 options: - - label: I am using Keep version 3.8.5 or later. + - label: I am using Keep version `4.0.0` or later. (使用 Keep 4.0.0 或更高版本) required: true - - label: I have already read the [Troubleshooting page of Hexo](https://hexo.io/docs/troubleshooting) and [Keep documents](https://keep-docs.xpoet.cn). + - label: I have already read the [Troubleshooting page of Hexo](https://hexo.io/docs/troubleshooting) and [Keep documents](https://keep-docs.xpoet.cn). (已阅读 [Hexo 故障处理页面](https://hexo.io/docs/troubleshooting) 和 [Keep 文档](https://keep-docs.xpoet.cn)) required: true - - label: I have already searched for current [issues](https://github.com/XPoet/hexo-theme-keep/issues), which does not help me. + - label: I have already searched for current [issues](https://github.com/XPoet/hexo-theme-keep/issues), which does not help me. (已搜索 [Issues](https://github.com/XPoet/hexo-theme-keep/issues),对我没有帮助) required: true - type: textarea @@ -35,9 +35,9 @@ body: Please provide the following information 请提供以下信息 value: | - - Detailed description of feature request: - - This feature request reference link: - - This feature request reference screenshots: + - Detailed description of feature request (功能需求的详情描述) + - This feature request reference link (功能需求的参考链接) + - This feature request reference screenshots (功能需求的参考截图) validations: required: true diff --git a/.github/ISSUE_TEMPLATE/other.yml b/.github/ISSUE_TEMPLATE/other.yml index 32879add6..1bb94066d 100644 --- a/.github/ISSUE_TEMPLATE/other.yml +++ b/.github/ISSUE_TEMPLATE/other.yml @@ -10,7 +10,7 @@ body: attributes: value: | Please follow this Issue template to provide relevant information, such as source code repository, website URL and screenshots, which will help us investigate. - 请按照此 Issue 模版提供相关信息,例如源码仓库、网站链接和屏幕截图,这将有助于我们进行调查。 + 请按照此 Issue 模版提供相关信息,例如源码仓库、网站链接和屏幕截图,这将有助于我们进行排查。 - type: checkboxes id: checklist @@ -20,11 +20,11 @@ body: I made sure I checked 我确认我已经检查过了 options: - - label: I am using Keep version 3.8.5 or later. + - label: I am using Keep version `4.0.0` or later. (使用 Keep 4.0.0 或更高版本) required: true - - label: I have already read the [Troubleshooting page of Hexo](https://hexo.io/docs/troubleshooting) and [Keep documents](https://keep-docs.xpoet.cn). + - label: I have already read the [Troubleshooting page of Hexo](https://hexo.io/docs/troubleshooting) and [Keep documents](https://keep-docs.xpoet.cn). (已阅读 [Hexo 故障处理页面](https://hexo.io/docs/troubleshooting) 和 [Keep 文档](https://keep-docs.xpoet.cn)) required: true - - label: I have already searched for current [issues](https://github.com/XPoet/hexo-theme-keep/issues), which does not help me. + - label: I have already searched for current [issues](https://github.com/XPoet/hexo-theme-keep/issues), which does not help me. (已搜索 [Issues](https://github.com/XPoet/hexo-theme-keep/issues),对我没有帮助) required: true - type: textarea diff --git a/_config.yml b/_config.yml index c36fc30f8..62c7c0201 100644 --- a/_config.yml +++ b/_config.yml @@ -1,63 +1,33 @@ ## ====================================================================================== ## Hexo Theme Keep -## Preview: https://xpoet.cn ## Documents: https://keep-docs.xpoet.cn ## Repository: https://github.com/XPoet/hexo-theme-keep ## ====================================================================================== # --------------------------------------------------------------------------------------- -# Your basic info # Docs: https://keep-docs.xpoet.cn/basis/configuration-guide/base_info.html # --------------------------------------------------------------------------------------- base_info: - # Your blog website title - title: Keep Theme - - # Your blog website author name - author: Keep Team - -# --------------------------------------------------------------------------------------- -# Theme style settings -# Docs: https://keep-docs.xpoet.cn/basis/configuration-guide/style.html -# --------------------------------------------------------------------------------------- -style: # Theme primary color primary_color: "#0066cc" - # Your blog website logo image - # You can use local image, image external link or don't fill - logo: /images/logo.svg + # Blog website title + title: Keep Theme - # Favicon (You can use local image or image external link) - favicon: /images/logo.svg + # Blog website author name + author: Keep Team - # Avatar (You can use local image or image external link) + # Author avatar, You can use local image path or image link avatar: /images/avatar.svg - # First screen style settings - first_screen: - enable: false # Option values: true | false - - # First screen background image (You can use local image or image external link) - background_img: /images/bg.svg - - # First screen description - # You can use the "||" to begin a newline, maximum is two lines. - description: Keep writing and Keep loving. - - # If enable hitokoto, first screen description is different every time when you enter the site - hitokoto: false # Option values: true | false + # Website LOGO, You can use local image path or image link + logo: /images/logo.svg - # Page scroll style settings - scroll: - # Show progress bar in top when page scroll - progress_bar: false # Option values: true | false + # Website favicon, You can use local image path or image link + favicon: /images/logo.svg - # Show percent when page scroll - percent: false # Option values: true | false # --------------------------------------------------------------------------------------- -# Navigation menu # Docs: https://keep-docs.xpoet.cn/basis/configuration-guide/menu.html # --------------------------------------------------------------------------------------- # If you want to enable Categories and Tags, you need to create categories and tags pages @@ -70,19 +40,40 @@ menu: # Links: /links # About: /about # Changelog: /changelog + # Photos: /photos # ...... + +# --------------------------------------------------------------------------------------- +# Docs: https://keep-docs.xpoet.cn/basis/configuration-guide/first_screen.html +# --------------------------------------------------------------------------------------- +first_screen: + enable: false # Option values: true | false + + # First screen background image in light mode, You can use local image path or image link + background_img: /images/bg.svg + + # First screen background image in dark mode, You can use local image path or image link + background_img_dark: /images/bg.svg + + # First screen description + # You can use the "||" to begin a newline, maximum is two lines. + description: Keep writing and Keep loving. + + # If enable hitokoto, first screen description is different every time when you enter the website + hitokoto: false # Option values: true | false + + # --------------------------------------------------------------------------------------- -# Social contact link # Docs: https://keep-docs.xpoet.cn/basis/configuration-guide/social_contact.html # --------------------------------------------------------------------------------------- social_contact: enable: false # Option values: true | false links: - # Fill in your social platform links here, e.g. [ github: https://github.com/XPoet ] - # If you want to click open the picture, you need to add a prefix "img |", + # Fill in your social platform links here, e.g. `github: https://github.com/XPoet` + # If you want to click open the picture, you need to add a prefix `img | `, # at the same time change your link to the image link. - # e.g. [ weixin: img | https://x.com/images/wechat.png ] or [ weixin: img | ./images/wechat.png ] + # e.g. `weixin: img | ./images/qrcode.png` github: # GitHub weixin: # WeChat qq: # QQ @@ -92,38 +83,52 @@ social_contact: facebook: # Facebook email: # Email + +# --------------------------------------------------------------------------------------- +# Docs: https://keep-docs.xpoet.cn/basis/configuration-guide/scroll.html +# --------------------------------------------------------------------------------------- +scroll: + # Show progress bar in top when page scroll + progress_bar: false # Option values: true | false + + # Show percent when page scroll + percent: false # Option values: true | false + + # Hide header in top when page scroll + hide_header: true # Option values: true | false + + # --------------------------------------------------------------------------------------- -# Home page article block display settings -# Docs: https://keep-docs.xpoet.cn/basis/configuration-guide/home_article.html +# Docs: https://keep-docs.xpoet.cn/basis/configuration-guide/home.html # --------------------------------------------------------------------------------------- -home_article: +home: # Show category in home page article block - category: - enable: false # Option values: true | false - limit: 3 # Max number of categories shown in home page article block + category: false # Option values: true | false + # Show tags in home page article block - tag: - enable: false # Option values: true | false - limit: 5 # Max number of tags shown in home page article block + tag: false # Option values: true | false + + # Website announcement in home page + announcement: + # --------------------------------------------------------------------------------------- -# Post page Settings # Docs: https://keep-docs.xpoet.cn/basis/configuration-guide/post.html # --------------------------------------------------------------------------------------- post: - # Author label in the post - author_label: - enable: true # Option values: true | false + # Author badge in the post + author_badge: + enable: true # Option values: true | false # If true, show Lv1, Lv2, Lv3 ... - # If false, show custom_label_list - auto: true # Option values: true | false + # If false, show custom badge + level_badge: true # Option values: true | false - # Label array item can be fill one or more - custom_label_list: ["Trainee", "Engineer", "Architect"] + # Custom badge array, You can be fill one or more item + custom_badge: ["One", "Two", "Three"] # Post word count - # Dependencies: hexo-wordcount (`npm install hexo-wordcount`) + # Depend on Hexo Plugin: hexo-wordcount (`npm install hexo-wordcount`) # See: https://github.com/willin/hexo-wordcount word_count: wordcount: false # Word count, one article. Option values: true | false @@ -144,8 +149,8 @@ post: img_link: # Image link for the payment QR code text: # Custom reward text, Can be null + # --------------------------------------------------------------------------------------- -# Code block # Docs: https://keep-docs.xpoet.cn/basis/configuration-guide/code_block.html # --------------------------------------------------------------------------------------- code_block: @@ -155,8 +160,8 @@ code_block: style: default # Option values: default | mac highlight_theme: default # Option values: default | obsidian + # --------------------------------------------------------------------------------------- -# Table of Contents in the Sidebar # Docs: https://keep-docs.xpoet.cn/basis/configuration-guide/toc.html # --------------------------------------------------------------------------------------- toc: @@ -174,8 +179,8 @@ toc: # TOC layout on article page layout: right # Option values: left | right + # --------------------------------------------------------------------------------------- -# Website count # Docs: https://keep-docs.xpoet.cn/basis/configuration-guide/website_count.html # --------------------------------------------------------------------------------------- website_count: @@ -187,23 +192,23 @@ website_count: site_pv: false # Option values: true | false page_pv: false # Option values: true | false + # --------------------------------------------------------------------------------------- -# Local Search # Docs: https://keep-docs.xpoet.cn/basis/configuration-guide/local_search.html -# Dependencies: hexo-generator-searchdb (`npm install hexo-generator-searchdb`) +# Depend on Hexo Plugin: hexo-generator-searchdb (`npm install hexo-generator-searchdb`) # See: https://github.com/theme-next/hexo-generator-searchdb # --------------------------------------------------------------------------------------- local_search: enable: false # Option values: true | false preload: false # Preload the search data when the page loads. Option values: true | false + # --------------------------------------------------------------------------------------- -# Comment plugin # Docs: https://keep-docs.xpoet.cn/basis/configuration-guide/comment.html # --------------------------------------------------------------------------------------- comment: enable: false # Option values: true | false - use: valine # Option values: valine | gitalk | twikoo | waline | giscus + use: valine # Option values: valine | gitalk | twikoo | waline | giscus | artalk | disqus # Valine # See: https://github.com/xCss/Valine @@ -252,39 +257,50 @@ comment: category_id: reactions_enabled: false # Option values: true | false + # Artalk + # See: https://github.com/ArtalkJS/Artalk + # https://artalk.js.org + artalk: + server: # Server URL + + # Disqus + # See: https://disqus.com/ + disqus: + shortname: # Disqus Shortname + + # --------------------------------------------------------------------------------------- -# RSS # Docs: https://keep-docs.xpoet.cn/basis/configuration-guide/rss.html -# Dependencies: hexo-generator-feed (`npm install hexo-generator-feed`) +# Depend on Hexo Plugin: hexo-generator-feed (`npm install hexo-generator-feed`) # See: https://github.com/hexojs/hexo-generator-feed # --------------------------------------------------------------------------------------- rss: enable: false # Option values: true | false + # --------------------------------------------------------------------------------------- -# Lazyload image # Docs: https://keep-docs.xpoet.cn/basis/configuration-guide/lazyload.html # --------------------------------------------------------------------------------------- lazyload: enable: false # Option values: true | false + # --------------------------------------------------------------------------------------- -# CDN # Docs: https://keep-docs.xpoet.cn/basis/configuration-guide/cdn.html # --------------------------------------------------------------------------------------- cdn: enable: false # Option values: true | false provider: jsdelivr # Option values: jsdelivr | unpkg + # --------------------------------------------------------------------------------------- -# PJAX # Docs: https://keep-docs.xpoet.cn/basis/configuration-guide/pjax.html # --------------------------------------------------------------------------------------- pjax: enable: false # Option values: true | false + # --------------------------------------------------------------------------------------- -# Footer settings # Docs: https://keep-docs.xpoet.cn/basis/configuration-guide/footer.html # --------------------------------------------------------------------------------------- footer: @@ -313,8 +329,8 @@ footer: # img_url: https://img.shields.io/badge/Hexo-Keep%20v3.7.3-blue?style=flat-square&logo=hexo # - ... + # --------------------------------------------------------------------------------------- -# Inject custom CSS and JavaScript files # Docs: https://keep-docs.xpoet.cn/basis/configuration-guide/inject.html # --------------------------------------------------------------------------------------- inject: diff --git a/languages/en.yml b/languages/en.yml index e1e7118b0..c849eb583 100644 --- a/languages/en.yml +++ b/languages/en.yml @@ -1,29 +1,30 @@ # ==================================================================== # English # ==================================================================== -search: Search... -prev: Prev -next: Next -prev_posts: Prev posts -next_posts: Next posts -page: Page %d -recent_posts: Recent Posts -share: Share -theme: Theme -rss_feed: RSS Feed + category: Category categories: Categories tag: Tag tags: Tags tagcloud: Tag Cloud -comment: Comment -comments: Comments home: Home archive: Archive archives: Archives about: About links: Links link: Link +photos: Photos +photo: Photo +search: Search... +prev: Prev +next: Next +prev_posts: Prev posts +next_posts: Next posts +page: Page %d +recent_posts: Recent Posts +share: Share +theme: Theme +rss_feed: RSS Feed top: TOP read_more: Read more wordcount: Words @@ -62,7 +63,6 @@ copyright: license: License license_title: Copyright notice license_content: "All articles in this blog are licensed under %s unless stating additionally." -article-aging: "It has been %s days since the last update of this article. Some contents may be outdated. Please pay attention to screening." ago: second: "%s seconds ago" minute: "%s minutes ago" @@ -86,9 +86,16 @@ footer: upyun: UPYUN total_words: Total words post: + aging: "It has been %s days since the last update of this article. Some contents may be outdated. Please pay attention to screening." share: qq: "Share to QQ" wechat: "Share to WeChat" weibo: "Share to WeiBo" wechat_scan: "Scan by WeChat" reward: Reward Author +comment: + comments: Comments + fail_tip: Comment plugin failed to load + reload: Click to reload + loading: Loading comment plugin + config_error: "Please fill in the required configuration items for %s comment plugin" diff --git a/languages/zh-CN.yml b/languages/zh-CN.yml index 9a15f9b8e..20afeed87 100644 --- a/languages/zh-CN.yml +++ b/languages/zh-CN.yml @@ -1,29 +1,30 @@ # ==================================================================== # 中文简体 # ==================================================================== -search: 搜索... -prev: 上一页 -next: 下一页 -prev_posts: 上一篇 -next_posts: 下一篇 -page: 第 %d 页 -recent_posts: 最新文章 -share: 分享 -theme: 主题 -rss_feed: RSS Feed + category: 分类 categories: 分类 tag: 标签 tags: 标签 tagcloud: 标签云 -comment: 评论 -comments: 评论 home: 首页 archive: 归档 archives: 归档 about: 关于 links: 友链 link: 友链 +photos: 相册 +photo: 照片 +search: 搜索... +prev: 上一页 +next: 下一页 +prev_posts: 上一篇 +next_posts: 下一篇 +page: 第 %d 页 +recent_posts: 最新文章 +share: 分享 +theme: 主题 +rss_feed: RSS Feed top: 置顶 read_more: 阅读全文 wordcount: 字 @@ -62,7 +63,6 @@ copyright: license: 许可 license_title: 版权声明 license_content: "本博客所有文章除特别声明外,均采用 %s 许可协议。转载请注明出处!" -article-aging: "本文距离上次更新已过去 %s 天,部分内容可能已经过时,请注意甄别。" ago: second: "%s 秒前" minute: "%s 分钟前" @@ -86,9 +86,16 @@ footer: upyun: 又拍云 total_words: 总字数 post: + aging: "本文距离上次更新已过去 %s 天,部分内容可能已经过时,请注意甄别。" share: qq: "分享到 QQ" wechat: "分享到微信" weibo: "分享到微博" wechat_scan: "微信扫一扫" reward: 打赏作者 +comment: + comments: 评论 + fail_tip: 评论插件加载失败 + reload: 点击重新加载 + loading: 正在加载评论插件 + config_error: "请完整填写 %s 评论插件必需的配置项" diff --git a/languages/zh-TW.yml b/languages/zh-TW.yml index f566a160d..80c4fc039 100644 --- a/languages/zh-TW.yml +++ b/languages/zh-TW.yml @@ -1,29 +1,30 @@ # ==================================================================== # 中文繁体 # ==================================================================== -search: 搜尋... -prev: 上一頁 -next: 下一頁 -prev_posts: 上一篇 -next_posts: 下一篇 -page: 第 %d 頁 -recent_posts: 之前的文章 -share: 分享 -theme: 主題 -rss_feed: RSS 訂閱 + category: 分類 categories: 分類 tag: 標籤 tags: 標籤 tagcloud: 標籤雲 -comment: 留言 -comments: 留言 home: 首頁 archive: 歸檔 archives: 歸檔 about: 關於 links: 友鏈 link: 友鏈 +photos: 相簿 +photo: 照片 +search: 搜尋... +prev: 上一頁 +next: 下一頁 +prev_posts: 上一篇 +next_posts: 下一篇 +page: 第 %d 頁 +recent_posts: 之前的文章 +share: 分享 +theme: 主題 +rss_feed: RSS 訂閱 top: 頂端 read_more: 繼續閱讀... wordcount: 字數 @@ -62,7 +63,6 @@ copyright: license: 許可 license_title: 版權宣告 license_content: "這個網站所有文章均使用 %s 授權" -article-aging: "本文距離上次更新已過去 %s 天,部分內容可能已經過時,請註意甄別。" ago: second: "%s 秒前" minute: "%s 分鐘前" @@ -86,9 +86,16 @@ footer: upyun: 又拍雲 total_words: 總字數 post: + aging: "本文距離上次更新已過去 %s 天,部分內容可能已經過時,請註意甄別。" share: qq: "分享到 QQ" wechat: "分享到微信" weibo: "分享到微博" wechat_scan: "微信掃壹掃" reward: 給作者打賞 +comment: + comments: 留言 + fail_tip: 評論插件加載失敗 + reload: 點擊重新加載 + loading: 正在加載評論插件 + config_error: "請完整填寫 %s 評論插件必需的配置項" diff --git a/layout/_partial/article-meta-info.ejs b/layout/_partial/article-meta-info.ejs index 8554b20f9..209407c0b 100644 --- a/layout/_partial/article-meta-info.ejs +++ b/layout/_partial/article-meta-info.ejs @@ -1,6 +1,6 @@ <% -const home_category_limit_number = theme?.home_article?.category?.limit || 5 -const home_tag_limit_number = theme?.home_article?.tag?.limit || 3 +const home_category_limit_number = 3 +const home_tag_limit_number = 5 %>
<% if (page_type === 'home') { %> - <%- __('read_more') %> + <%- __('read_more') %> <% } %> diff --git a/layout/_partial/comment/comment.ejs b/layout/_partial/comment/comment.ejs index a53db81b2..803c591e2 100644 --- a/layout/_partial/comment/comment.ejs +++ b/layout/_partial/comment/comment.ejs @@ -8,18 +8,23 @@ const { <% if (theme_comment_enable === true && theme_comment_use) { %>