hexo-theme-next
Advanced tools
Comparing version 7.6.0 to 7.7.0
@@ -17,2 +17,4 @@ <div align="right"> | ||
* [Before Submitting An Issue](#before-submitting-an-issue) | ||
* [Read the docs](#read-the-docs) | ||
* [Quick debug instructions](quick-debug-instructions) | ||
* [Reporting Bugs](#reporting-bugs) | ||
@@ -31,22 +33,25 @@ * [Reporting Security Bugs](#reporting-security-bugs) | ||
<a name="how-can-i-contribute"></a> | ||
## How Can I Contribute? | ||
Main Theme-Next repository was rebased from [iissnan's](https://github.com/iissnan/hexo-theme-next) profile to [Theme-Next](https://github.com/theme-next) organization on GitHub. Most libraries under the `next/source/lib` directory was moved out to [external repos](https://github.com/theme-next) under NexT organization. Version 5 works fine at most cases, but for frequent users, you maybe need to [upgrade version 5 to 6](https://github.com/theme-next/hexo-theme-next/blob/master/docs/UPDATE-FROM-5.1.X.md) to get features and supports in new [Theme-Next](https://github.com/theme-next/hexo-theme-next) repository. | ||
### Before Submitting An Issue | ||
<a name="before-submitting-an-issue"></a> | ||
#### Read the docs | ||
### Before Submitting An Issue | ||
If you just have a question, you'll get faster results by checking the [FAQs for a list of common questions and problems](https://theme-next.org/docs/faqs) or the [troubleshooting part of «NexT» Documentation Site](https://theme-next.org/docs/troubleshooting). | ||
If you just have a question, you'll get faster results by checking the FAQs for a list of common questions and problems (Work in progress) or the [«NexT» Documentation Site](https://theme-next.org/docs/) (Work in progress). | ||
Also, you can perform a [cursory search](https://github.com/theme-next/hexo-theme-next/search?q=&type=Issues&utf8=%E2%9C%93) to see if the problem has already been reported or solved. You don't want to duplicate effort. You might be able to find the cause of the problem and fix things yourself, or add comments to the existed issue. | ||
If you find a bug in the source code, most importantly, please check carefully if you can reproduce the problem [in the latest release version of Next](https://github.com/theme-next/hexo-theme-next/releases/latest). Then, you can help us by | ||
[Reporting Bugs](#reporting-bugs) or [Suggesting Enhancements](#suggesting-enhancements) to our [ Repository](https://github.com/theme-next/hexo-theme-next). Even better, you can | ||
[submit a Pull Request](#submitting-a-pull-request) with a fix. | ||
#### Quick debug instructions | ||
<a name="reporting-bugs"></a> | ||
Before submitting an Issue on GitHub, you can follow the steps below to debug: | ||
* Execute `hexo clean`, cleare the browser cache and disable all CDN services (e.g. Cloudflare Rocket Loader) | ||
* Switch to another theme and check if the bug still exists (e.g. default theme landscape). In other words, prove that this is a NexT issue, not a issue from Hexo. | ||
* Upgrade Hexo and Hexo plugins to the latest version. | ||
* Uninstall all non-essential Hexo plugins. | ||
If you get an error message from Hexo or your browser, please search in Google / Stackoverflow / GitHub Issues, or report it to us when submitting a new Issue. | ||
If you find a bug in the source code, most importantly, please check carefully if you can reproduce the problem [in the latest release version of Next](https://github.com/theme-next/hexo-theme-next/releases/latest). Then, you can help us by [Reporting Bugs](#reporting-bugs) or [Suggesting Enhancements](#suggesting-enhancements) to our [Repository](https://github.com/theme-next/hexo-theme-next). Even better, you can [submit a Pull Request](#submitting-a-pull-request) with a fix. | ||
### Reporting Bugs | ||
@@ -70,4 +75,2 @@ | ||
<a name="reporting-security-bugs"></a> | ||
#### Reporting Security Bugs | ||
@@ -79,4 +82,2 @@ | ||
<a name="suggesting-enhancements"></a> | ||
### Suggesting Enhancements | ||
@@ -92,4 +93,2 @@ | ||
<a name="submitting-a-pull-request"></a> | ||
### Submitting a Pull Request | ||
@@ -99,20 +98,2 @@ | ||
1. On GitHub, navigate to the original page of the [hexo-theme-next](https://github.com/theme-next/hexo-theme-next). In the top-right corner of the page, click **Fork**. | ||
2. Under the repository name in your forked repository, click **Clone or download**. In the `Clone with SSH` section, copy the clone URL for the repository. Open Git Bash, and change the current working directory to the location where you want the cloned directory to be made. Type `git clone`, and then paste the URL you copied. Press **Enter**. Your local clone will be created. | ||
```sh | ||
$ git clone git@github.com:username/hexo-theme-next.git | ||
``` | ||
3. Navigate into your new cloned repository. Switch branches to the compare branch of the pull request where the original changes were made. | ||
```sh | ||
$ cd hexo-theme-next | ||
$ git checkout -b patchname | ||
``` | ||
4. After you commit your changes to the head branch of the pull request you can push your changes up to the original pull request directly. | ||
```sh | ||
$ git add . | ||
$ git commit -m "add commit messamge" | ||
$ git push origin patchname | ||
``` | ||
5. Navigate to the original repository you created your fork from. To the right of the Branch menu, click **New pull request**. On the Compare page, confirm that the base fork is the repository you'd like to merge changes into. Use the base branch drop-down menu to select the branch of the upstream repository you'd like to merge changes into. Use the head fork drop-down menu to select your fork, then use the compare branch drop-down menu to select the branch you made your changes in. Click **Create pull request** and type a title and description for your pull request. | ||
Following these guidelines helps maintainers and the community understand your pull request :pencil:: | ||
@@ -125,4 +106,2 @@ | ||
<a name="creating-releases"></a> | ||
### Creating Releases | ||
@@ -143,8 +122,4 @@ | ||
<a name="guides"></a> | ||
## Guides | ||
<a name="coding-rules"></a> | ||
### Coding Rules | ||
@@ -154,10 +129,6 @@ | ||
<a name="coding-standards"></a> | ||
### Coding Standards | ||
To be continued. | ||
We use ESLint and Stylint for identifying and reporting on patterns in JavaScript and Stylus, with the goal of making code more consistent and avoiding bugs. These specifications should be followed when coding. | ||
<a name="labels-rules"></a> | ||
### Labels Rules | ||
@@ -215,4 +186,2 @@ | ||
<a name="commit-messages-rules"></a> | ||
### Commit Messages Rules | ||
@@ -219,0 +188,0 @@ |
@@ -10,13 +10,14 @@ --- | ||
Please check if your Issue fulfills the following requirements. If you refuse to fill out the following information in accordance with the template, we may close your issue without conducting an investigation. | ||
请务必确认您在提交此 Issue 前已经查看并完成了下列检查单中的所有事项。如果您拒绝根据模板填写以下信息,我们可能会在不进行调查的情况下关闭您的 Issue。 | ||
If you delete this template, we may close your issue without conducting an investigation. | ||
如果您删除此模版,我们可能会在不进行调查的情况下关闭您的 Issue。 | ||
Please check if your Issue fulfills the following requirements. This will guide you to resolve the issue quickly. | ||
请务必确认您在提交此 Issue 前已经查看并完成了下列检查单中的所有事项。这会指导您快速地解决问题。 | ||
## Issue Checklist <!-- 我确认我已经查看了 --> | ||
<!-- Change [ ] to [x] to select, not [ x] or [x ] (将 [ ] 换成 [x] 来选择,而非 [ x] 或者 [x ]) --> | ||
<!-- Change [ ] to [x] to select (将 [ ] 换成 [x] 来选择) --> | ||
- [ ] I am using [the latest](https://github.com/theme-next/hexo-theme-next/releases/latest) version of NexT. | ||
- [ ] I have executed `hexo clean`, cleared the browser cache and disabled all CDN services (e.g. Cloudflare Rocket Loader), this issue still exists. | ||
- [ ] I have confirmed that this issue only appears in theme NexT, but cannot be reproduced in other themes (e.g. default theme landscape). In other words, prove that this is a NexT issue, not a issue from Hexo. | ||
- [ ] I have already viewed [NexT Documentation Site](http://theme-next.org/docs/) and [Hexo Docs page](https://hexo.io/docs/), especially [Troubleshooting](https://hexo.io/docs/troubleshooting.html) part. | ||
- [ ] I have already viewed the latest Roadmap on GitHub and searched for current [issues](https://github.com/theme-next/hexo-theme-next/issues?utf8=%E2%9C%93&q=is%3Aissue), which does not help me. | ||
- [ ] I have reviewed [guidelines for NexT](https://github.com/theme-next/hexo-theme-next/blob/master/.github/CONTRIBUTING.md), especially the [Before Submitting An Issue](https://github.com/theme-next/hexo-theme-next/blob/master/.github/CONTRIBUTING.md#before-submitting-an-issue) part. | ||
- [ ] I have reviewed the latest Roadmap on GitHub and searched for current [issues](https://github.com/theme-next/hexo-theme-next/issues?utf8=%E2%9C%93&q=is%3Aissue), which does not help me. | ||
@@ -23,0 +24,0 @@ *** |
@@ -10,11 +10,14 @@ --- | ||
Please check if your Issue fulfills the following requirements. If you refuse to fill out the following information in accordance with the template, we may close your issue without conducting an investigation. | ||
请务必确认您在提交此 Issue 前已经查看并完成了下列检查单中的所有事项。如果您拒绝根据模板填写以下信息,我们可能会在不进行调查的情况下关闭您的 Issue。 | ||
If you delete this template, we may close your issue without conducting an investigation. | ||
如果您删除此模版,我们可能会在不进行调查的情况下关闭您的 Issue。 | ||
Please check if your Issue fulfills the following requirements. This will guide you to resolve the issue quickly. | ||
请务必确认您在提交此 Issue 前已经查看并完成了下列检查单中的所有事项。这会指导您快速地解决问题。 | ||
## Issue Checklist <!-- 我确认我已经查看了 --> | ||
<!-- Change [ ] to [x] to select, not [ x] or [x ] (将 [ ] 换成 [x] 来选择,而非 [ x] 或者 [x ]) --> | ||
<!-- Change [ ] to [x] to select (将 [ ] 换成 [x] 来选择) --> | ||
- [ ] I am using [the latest](https://github.com/theme-next/hexo-theme-next/releases/latest) version of NexT. | ||
- [ ] I have already viewed [NexT Documentation Site](http://theme-next.org/docs/) and [Hexo Docs page](https://hexo.io/docs/), especially [Troubleshooting](https://hexo.io/docs/troubleshooting.html) part. | ||
- [ ] I have already viewed the latest Roadmap on GitHub and searched for current [issues](https://github.com/theme-next/hexo-theme-next/issues?utf8=%E2%9C%93&q=is%3Aissue), which does not help me. | ||
- [ ] I have reviewed [guidelines for NexT](https://github.com/theme-next/hexo-theme-next/blob/master/.github/CONTRIBUTING.md), especially the [Before Submitting An Issue](https://github.com/theme-next/hexo-theme-next/blob/master/.github/CONTRIBUTING.md#before-submitting-an-issue) part. | ||
- [ ] I have reviewed the latest Roadmap on GitHub and searched for current [issues](https://github.com/theme-next/hexo-theme-next/issues?utf8=%E2%9C%93&q=is%3Aissue), which does not help me. | ||
@@ -21,0 +24,0 @@ *** |
@@ -10,12 +10,15 @@ --- | ||
Please check if your Issue fulfills the following requirements. If you refuse to fill out the following information in accordance with the template, we may close your issue without conducting an investigation. | ||
请务必确认您在提交此 Issue 前已经查看并完成了下列检查单中的所有事项。如果您拒绝根据模板填写以下信息,我们可能会在不进行调查的情况下关闭您的 Issue。 | ||
If you delete this template, we may close your issue without conducting an investigation. | ||
如果您删除此模版,我们可能会在不进行调查的情况下关闭您的 Issue。 | ||
Please check if your Issue fulfills the following requirements. This will guide you to resolve the issue quickly. | ||
请务必确认您在提交此 Issue 前已经查看并完成了下列检查单中的所有事项。这会指导您快速地解决问题。 | ||
## Issue Checklist <!-- 我确认我已经查看了 --> | ||
<!-- Change [ ] to [x] to select, not [ x] or [x ] (将 [ ] 换成 [x] 来选择,而非 [ x] 或者 [x ]) --> | ||
<!-- Change [ ] to [x] to select (将 [ ] 换成 [x] 来选择) --> | ||
- [ ] I am using [the latest](https://github.com/theme-next/hexo-theme-next/releases/latest) version of NexT. | ||
- [ ] I have already viewed [NexT Documentation Site](http://theme-next.org/docs/) and [Hexo Docs page](https://hexo.io/docs/), especially [Troubleshooting](https://hexo.io/docs/troubleshooting.html) part. | ||
- [ ] I have already viewed the latest Roadmap on GitHub and searched for current [issues](https://github.com/theme-next/hexo-theme-next/issues?utf8=%E2%9C%93&q=is%3Aissue), which does not help me. | ||
- [ ] I have reviewed [guidelines for NexT](https://github.com/theme-next/hexo-theme-next/blob/master/.github/CONTRIBUTING.md), especially the [Before Submitting An Issue](https://github.com/theme-next/hexo-theme-next/blob/master/.github/CONTRIBUTING.md#before-submitting-an-issue) part. | ||
- [ ] I have reviewed the latest Roadmap on GitHub and searched for current [issues](https://github.com/theme-next/hexo-theme-next/issues?utf8=%E2%9C%93&q=is%3Aissue), which does not help me. | ||
*** |
@@ -10,13 +10,14 @@ --- | ||
Please check if your Issue fulfills the following requirements. If you refuse to fill out the following information in accordance with the template, we may close your issue without conducting an investigation. | ||
请务必确认您在提交此 Issue 前已经查看并完成了下列检查单中的所有事项。如果您拒绝根据模板填写以下信息,我们可能会在不进行调查的情况下关闭您的 Issue。 | ||
If you delete this template, we may close your issue without conducting an investigation. | ||
如果您删除此模版,我们可能会在不进行调查的情况下关闭您的 Issue。 | ||
Please check if your Issue fulfills the following requirements. This will guide you to resolve the issue quickly. | ||
请务必确认您在提交此 Issue 前已经查看并完成了下列检查单中的所有事项。这会指导您快速地解决问题。 | ||
## Issue Checklist <!-- 我确认我已经查看了 --> | ||
<!-- Change [ ] to [x] to select, not [ x] or [x ] (将 [ ] 换成 [x] 来选择,而非 [ x] 或者 [x ]) --> | ||
<!-- Change [ ] to [x] to select (将 [ ] 换成 [x] 来选择) --> | ||
- [ ] I am using [the latest](https://github.com/theme-next/hexo-theme-next/releases/latest) version of NexT. | ||
- [ ] I have executed `hexo clean`, cleared the browser cache and disabled all CDN services (e.g. Cloudflare Rocket Loader), this issue still exists. | ||
- [ ] I have confirmed that this issue only appears in theme NexT, but cannot be reproduced in other themes (e.g. default theme landscape). In other words, prove that this is a NexT issue, not a issue from Hexo. | ||
- [ ] I have already viewed [NexT Documentation Site](http://theme-next.org/docs/) and [Hexo Docs page](https://hexo.io/docs/), especially [Troubleshooting](https://hexo.io/docs/troubleshooting.html) part. | ||
- [ ] I have already viewed the latest Roadmap on GitHub and searched for current [issues](https://github.com/theme-next/hexo-theme-next/issues?utf8=%E2%9C%93&q=is%3Aissue), which does not help me. | ||
- [ ] I have reviewed [guidelines for NexT](https://github.com/theme-next/hexo-theme-next/blob/master/.github/CONTRIBUTING.md), especially the [Before Submitting An Issue](https://github.com/theme-next/hexo-theme-next/blob/master/.github/CONTRIBUTING.md#before-submitting-an-issue) part. | ||
- [ ] I have reviewed the latest Roadmap on GitHub and searched for current [issues](https://github.com/theme-next/hexo-theme-next/issues?utf8=%E2%9C%93&q=is%3Aissue), which does not help me. | ||
@@ -23,0 +24,0 @@ *** |
@@ -21,5 +21,5 @@ <!-- ATTENTION! | ||
## PR Checklist <!-- 我确认我已经查看了 --> | ||
<!-- Change [ ] to [x] to select, not [ x] or [x ] (将 [ ] 换成 [x] 来选择,而非 [ x] 或者 [x ]) --> | ||
<!-- Change [ ] to [x] to select (将 [ ] 换成 [x] 来选择) --> | ||
- [ ] The commit message follows [our guidelines](https://github.com/theme-next/hexo-theme-next/blob/master/.github/CONTRIBUTING.md). | ||
- [ ] The commit message follows [guidelines for NexT](https://github.com/theme-next/hexo-theme-next/blob/master/.github/CONTRIBUTING.md). | ||
- [ ] Tests for the changes was maked (for bug fixes / features). | ||
@@ -26,0 +26,0 @@ - [ ] Muse | Mist have been tested. |
@@ -9,3 +9,3 @@ <h1 align="center">Data Files</h1> | ||
In order to resolve this issue, NexT will take advantage of Hexo [Data files](https://hexo.io/docs/data-files.html). Because Data files is introduced in Hexo 3, so you need upgrade Hexo to 3.0 (or above) to use this feature. | ||
In order to resolve this issue, NexT provides the following two solutions. | ||
@@ -20,3 +20,3 @@ <h2 align="center">Option 1: Hexo-Way</h2> | ||
1. Check for no exists `/source/_data/next.yml` file (delete it if exists). | ||
1. Please confirm that the `/source/_data/next.yml` file does not exist (delete it if exists). | ||
2. Copy needed NexT theme options from theme's `/themes/next/_config.yml` into `/_config.yml`, then\ | ||
@@ -38,2 +38,4 @@ 2.1. Move all this settings to the right with two spaces (in Visual Studio Code: select all strings, <kbd>CTRL</kbd> + <kbd>]</kbd>).\ | ||
This method relies on Hexo [Data files](https://hexo.io/docs/data-files.html). Because Data files is introduced in Hexo 3, so you need upgrade Hexo to 3.0 (or above) to use this feature. | ||
### Usage | ||
@@ -40,0 +42,0 @@ |
@@ -9,3 +9,3 @@ <h1 align="center">Дата Файлы</h1> | ||
Во избежании проблемы, NexT использует преимущество Hexo [дата-файлов](https://hexo.io/docs/data-files.html). И т.к. дата-файлы были представлены в Hexo 3, необходимо обновиться до Hexo 3.0 (или выше) для использования этой возможности. | ||
Во избежании проблемы, NexT предлагает два варианта. | ||
@@ -37,2 +37,4 @@ <h2 align="center">Способ 1: Hexo-Путь</h2> | ||
Этот метод опирается на Hexo [дата-файлов](https://hexo.io/docs/data-files.html). И т.к. дата-файлы были представлены в Hexo 3, необходимо обновиться до Hexo 3.0 (или выше) для использования этой возможности. | ||
### Использование | ||
@@ -39,0 +41,0 @@ |
<h1 align="center">Update from NexT v5.1.x</h1> | ||
NexT version 5 works fine at most cases, but for frequent users, you maybe need to upgrade version 5 to 6 to get features and supports in new [Theme-Next](https://github.com/theme-next/hexo-theme-next) repository. | ||
There are no hard breaking changes between 5.1.x and the latest version. It's change major version to 6 because: | ||
@@ -4,0 +6,0 @@ |
@@ -16,11 +16,10 @@ <div align="right"> | ||
- [我们的保证](#our-pledge) | ||
- [我们的责任](#our-responsibilities) | ||
- [我们的标准](#our-standards) | ||
- [使用范围](#scope) | ||
- [强制执行](#enforcement) | ||
- [联系项目维护者](#contacting-maintainers) | ||
- [来源](#attribution) | ||
- [我们的保证](#我们的保证) | ||
- [我们的责任](#我们的责任) | ||
- [我们的标准](#我们的标准) | ||
- [使用范围](#使用范围) | ||
- [强制执行](#强制执行) | ||
- [联系项目维护者](#联系项目维护者) | ||
- [来源](#来源) | ||
<a name="our-pledge"></a> | ||
## 我们的保证 | ||
@@ -32,3 +31,2 @@ | ||
<a name="our-responsibilities"></a> | ||
## 我们的责任 | ||
@@ -38,3 +36,2 @@ | ||
<a name="our-standards"></a> | ||
## 我们的标准 | ||
@@ -60,3 +57,2 @@ | ||
<a name="scope"></a> | ||
## 使用范围 | ||
@@ -68,3 +64,2 @@ | ||
<a name="enforcement"></a> | ||
## 强制执行 | ||
@@ -75,3 +70,3 @@ | ||
1. 让这个人知道他所做的并不合适,并要求他停止或编辑他们的提交信息。该人应立即停止行为并纠正问题。 | ||
2. 如果该人没有纠正其行为,或者您不方便与其沟通,请[联系项目维护者](#contacting-maintainers)。上报时,请尽可能多的提供详细信息,链接,截图,上下文或可用于更好地理解和解决情况的其他信息。 | ||
2. 如果该人没有纠正其行为,或者您不方便与其沟通,请[联系项目维护者](#联系项目维护者)。上报时,请尽可能多的提供详细信息,链接,截图,上下文或可用于更好地理解和解决情况的其他信息。 | ||
3. 收到上报信息后,项目维护者会查看问题,并采取进一步的措施。 | ||
@@ -92,3 +87,2 @@ | ||
<a name="contacting-maintainers"></a> | ||
## 联系项目维护者 | ||
@@ -106,5 +100,4 @@ | ||
<a name="attribution"></a> | ||
## 来源 | ||
本行为标准改编自[Contributor Covenant](https://www.contributor-covenant.org/) 和 [WeAllJS Code of Conduct](https://wealljs.org/code-of-conduct)。 |
@@ -14,37 +14,46 @@ <div align="right"> | ||
[如何为 NexT 做贡献](#how-can-i-contribute) | ||
[如何为 NexT 做贡献](#如何为-next-做贡献) | ||
* [你需要了解的](#before-submitting-an-issue) | ||
* [反馈 Bug](#reporting-bugs) | ||
* [提交漏洞](#reporting-security-bugs) | ||
* [提交功能需求](#suggesting-enhancements) | ||
* [提交合并请求](#submitting-a-pull-request) | ||
* [发布版本](#creating-releases) | ||
* [你需要了解的](#你需要了解的) | ||
* [阅读文档](#阅读文档) | ||
* [快速调试指南](#快速调试指南) | ||
* [反馈 Bug](#反馈-bug) | ||
* [提交漏洞](#提交漏洞) | ||
* [提交功能需求](#提交功能需求) | ||
* [提交合并请求](#提交合并请求) | ||
* [发布版本](#发布版本) | ||
[规范](#guides) | ||
[规范](#规范) | ||
* [行为规范](#coding-rules) | ||
* [编码规范](#coding-standards) | ||
* [标签规范](#labels-rules) | ||
* [提交信息规范](#commit-messages-rules) | ||
* [行为规范](#行为规范) | ||
* [编码规范](#编码规范) | ||
* [标签规范](#标签规范) | ||
* [提交信息规范](#提交信息规范) | ||
<a name="how-can-i-contribute"></a> | ||
## 如何为 NexT 做贡献 | ||
目前 NexT 主题已经从 [iissnan](https://github.com/iissnan/hexo-theme-next) 的个人仓库移动到了 [Theme-Next](https://github.com/theme-next) 组织仓库中,并升级到 V6 版本。在 V6+ 版本中,`next/source/lib` 目录下的第三方依赖库将独立放置在 [Theme-Next](https://github.com/theme-next) 组织仓库中。在大多数情况下,NexT V5 版本仍然能够正常运行,但是如果你想获得更多的功能和帮助,还是建议您 [升级到 NexT V6+ 版本](https://github.com/theme-next/hexo-theme-next/blob/master/docs/UPDATE-FROM-5.1.X.md),并移步 [Theme-Next](https://github.com/theme-next/hexo-theme-next) 仓库。 | ||
### 你需要了解的 | ||
<a name="before-submitting-an-issue"></a> | ||
#### 阅读文档 | ||
### 你需要了解的 | ||
如果你在使用过程中遇到了问题,你可以查阅 [FAQs](https://theme-next.org/docs/faqs) 或者 [NexT 帮助文档](https://theme-next.org/docs/troubleshooting)。 | ||
如果你在使用过程中遇到了问题,你可以查阅 FAQs(建设中) 或者 [NexT 帮助文档](https://theme-next.org/docs/)(建设中)。另外,你也可以通过 [这里](https://github.com/theme-next/hexo-theme-next/search?q=&type=Issues&utf8=%E2%9C%93) 进行大致检索,有些问题已经得到解答,你可以自行解决。对于没有解决的 Issue,你也可以继续提问。 | ||
另外,你也可以通过 [这里](https://github.com/theme-next/hexo-theme-next/search?q=&type=Issues&utf8=%E2%9C%93) 进行大致检索,有些问题已经得到解答,你可以自行解决。对于没有解决的 Issue,你也可以继续提问。 | ||
如果你在使用过程中发现了 Bug,请再次确认 Bug 在 [最新发布版本](https://github.com/theme-next/hexo-theme-next/releases/latest) 中是否重现。如果 Bug 重现,欢迎你到我们的 [主题仓库](https://github.com/theme-next/hexo-theme-next) 中 [反馈 Bug ](#reporting-bugs) 或者 [提交功能需求](#suggesting-enhancements),也更期待您 [提交合并请求](#submitting-a-pull-request)。 | ||
#### 快速调试指南 | ||
<a name="reporting-bugs"></a> | ||
在 GitHub 上提交 Issue 前,请先通过以下方法 debug: | ||
* 执行`hexo clean`,清除浏览器缓存,并禁用 CDN 服务(例如 Cloudflare Rocket Loader); | ||
* 切换到其它主题并检查 bug 是否仍然存在(例如使用默认主题 landscape)。换言之,证明这是 NexT 主题而非来自 Hexo 的 bug; | ||
* 将 Hexo 和 Hexo 插件升级到最新版; | ||
* 卸载不必要的 Hexo 插件。 | ||
如果你得到了来自 Hexo 或浏览器控制台的报错信息,请在 Google / Stackoverflow / GitHub Issue 中搜寻,或在提交 Issue 时报告给我们。 | ||
如果你在使用过程中发现了 Bug,请再次确认 Bug 在 [最新发布版本](https://github.com/theme-next/hexo-theme-next/releases/latest) 中是否重现。如果 Bug 重现,欢迎你到我们的 [主题仓库](https://github.com/theme-next/hexo-theme-next) 中 [反馈 Bug ](#reporting-bugs) 或者 [提交功能需求](#提交功能需求),也更期待您 [提交合并请求](#提交合并请求)。 | ||
### 反馈 Bug | ||
反馈 Bug 前,请再次确认您已经查看了 [你需要了解的](#before-submitting-an-issue) 内容,避免提交重复的 Issue。确定相关仓库后,创建 Issue 并按照 [模板](../../.github/ISSUE_TEMPLATE.md) 尽可能的详细填写相关信息。 | ||
反馈 Bug 前,请再次确认您已经查看了 [你需要了解的](#你需要了解的) 内容,避免提交重复的 Issue。确定相关仓库后,创建 Issue 并按照 [模板](../../.github/ISSUE_TEMPLATE.md) 尽可能的详细填写相关信息。 | ||
@@ -65,4 +74,2 @@ 请认真遵守如下指南,这样我们才能更好地理解问题,重现问题和解决问题。 | ||
<a name="reporting-security-bugs"></a> | ||
#### 提交漏洞 | ||
@@ -74,7 +81,5 @@ | ||
<a name="suggesting-enhancements"></a> | ||
### 提交功能需求 | ||
提交功能需求前,请再次确认您已经查看了 [你需要了解的](#before-submitting-an-issue) 内容,避免提交重复的 Issue。确定相关仓库后,创建 Issue 并按照 [模板](../../.github/ISSUE_TEMPLATE.md) 尽可能的详细填写相关信息。 | ||
提交功能需求前,请再次确认您已经查看了 [你需要了解的](#你需要了解的) 内容,避免提交重复的 Issue。确定相关仓库后,创建 Issue 并按照 [模板](../../.github/ISSUE_TEMPLATE.md) 尽可能的详细填写相关信息。 | ||
@@ -87,29 +92,9 @@ 请认真遵守如下指南,这样我们才能更好地理解和开发功能需求:pencil:: | ||
<a name="submitting-a-pull-request"></a> | ||
### 提交合并请求 | ||
提交合并请求前,请再次确认您已经查看了 [你需要了解的](#before-submitting-an-issue) 内容,避免提交重复的合并请求。确定相关仓库后,创建合并请求。更多详细操作过程可以查看 [帮助文档](https://help.github.com/articles/creating-a-pull-request/)。 | ||
提交合并请求前,请再次确认您已经查看了 [你需要了解的](#你需要了解的) 内容,避免提交重复的合并请求。确定相关仓库后,创建合并请求。更多详细操作过程可以查看 [帮助文档](https://help.github.com/articles/creating-a-pull-request/)。 | ||
1. 进入 [hexo-theme-next](https://github.com/theme-next/hexo-theme-next) 主页面,点击 `Fork`。 | ||
2. 进入到已经 `Fork` 的个人仓库(`https://github.com/username/hexo-theme-next`),点击 **Clone or download** 并复制该仓库地址。选择本地文件夹,并打开 Git Bash ,输入如下命令并回车,即可完成仓库克隆。 | ||
```sh | ||
$ git clone git@github.com:username/hexo-theme-next.git | ||
``` | ||
3. 进入 `hexo-theme-next` 本地文件夹,并创建分支。 | ||
```sh | ||
$ cd hexo-theme-next | ||
$ git checkout -b patchname | ||
``` | ||
4. 本地修改并测试,推送分支。 | ||
```sh | ||
$ git add . | ||
$ git commit -m "add commit messamge" | ||
$ git push origin patchname | ||
``` | ||
5. 进入 `fork` 后的仓库,切换到新提交的 `patchname` 分支,点击 `patchname` 分支右侧的 **New pull request** 。在 PR 对比页面,正确选择你需要发起合并请求的分支,然后点击 **Create pull request** ,建立一个新的合并申请并描述变动。 | ||
请认真遵守如下指南,这样我们才能更好地理解你的合并请求: | ||
* 创建合并请求时,请遵守 [编码规范](#coding-rules) 和 [提交信息规范](#commit-messages-rules)。 | ||
* 创建合并请求时,请遵守 [编码规范](#编码规范) 和 [提交信息规范](#提交信息规范)。 | ||
* 在标题中清晰准确地描述你的合并请求,不要加入 Issue 编号。 | ||
@@ -119,4 +104,2 @@ * 按照 [模板](../../.github/PULL_REQUEST_TEMPLATE.md) 尽可能的详细填写相关信息。 | ||
<a name="creating-releases"></a> | ||
### 发布版本 | ||
@@ -137,8 +120,4 @@ | ||
<a name="guides"></a> | ||
## 规范 | ||
<a name="coding-rules"></a> | ||
### 行为规范 | ||
@@ -148,10 +127,6 @@ | ||
<a name="coding-standards"></a> | ||
### 编码规范 | ||
未完待续。 | ||
我们使用 ESLint 和 Stylint 来识别和报告 JavaScript 和 Stylus 中的模式,目的是使代码更加一致并避免错误。编码时应遵循这些规范。 | ||
<a name="labels-rules"></a> | ||
### 标签规范 | ||
@@ -209,4 +184,2 @@ | ||
<a name="commit-messages-rules"></a> | ||
### 提交信息规范 | ||
@@ -213,0 +186,0 @@ |
@@ -9,9 +9,9 @@ <h1 align="center">数据文件</h1> | ||
为了解决这一问题,NexT 将利用 Hexo 的[数据文件](https://hexo.io/docs/data-files.html)特性。因为数据文件是在 Hexo 3 中被引入,所以你需要更新至 Hexo 3.0 以后的版本来使用这一特性。 | ||
为了解决这一问题,NexT 提供了以下两种方案。 | ||
<h2 align="center">选择 1:Hexo 方式</h2> | ||
使用这一方式,你的全部配置都将置于 Hexo 站点配置文件(`/_config.yml`),并且不需要修改 `/themes/next/_config.yml`,或者创建什么其他的文件。但是所有的主题选项必须放置在 `theme_config` 后,并全部增加两个空格的缩进。 | ||
使用这一方式,你的全部配置都将置于 Hexo 站点配置文件(`/_config.yml`),并且不需要修改 `/themes/next/_config.yml`,或者创建什么其他的文件。但是所有用到的主题选项必须放置在 `theme_config` 后,并全部增加两个空格的缩进。 | ||
如果在新的 release 中出现了任何新的选项,那么你只需要从 `/themes/next/_config.yml` 中将他们复制到 `/_config.yml` 中并设置它们的值为你想要的选项。 | ||
如果在新的 release 中新增了选项,那么你只需要从 `/themes/next/_config.yml` 中将他们复制到 `/_config.yml` 中并将它们的值设置为你想要的。 | ||
@@ -37,2 +37,4 @@ ### 用法 | ||
这一方法依赖于 Hexo 的[数据文件](https://hexo.io/docs/data-files.html)特性。因为数据文件是在 Hexo 3 中被引入,所以你需要更新至 Hexo 3.0 以后的版本来使用这一特性。 | ||
### 用法 | ||
@@ -39,0 +41,0 @@ |
@@ -98,3 +98,2 @@ <h1 align="center">修复 LeanCloud 统计插件安全漏洞</h1> | ||
至此云引擎已成功部署,任何非法的访客数量更改请求都将失败。 | ||
@@ -101,0 +100,0 @@ |
@@ -166,3 +166,2 @@ <h1 align="center">数学公式</h1> | ||
我们目前使用的 Katex 版本为 0.11.1,这里面可能有某些问题是因为 Katex 版本老旧导致的; | ||
@@ -169,0 +168,0 @@ |
<h1 align="center">从 NexT v5.1.x 更新</h1> | ||
在大多数情况下,NexT V5 版本仍然能够正常运行,但是如果你想获得更多的功能和帮助,还是建议您升级到 NexT V6+ 版本,并移步 [Theme-Next](https://github.com/theme-next/hexo-theme-next) 仓库。 | ||
在 5.1.x 版本和新版本之间没有很大的革命性改进。主版本号变更至 6 主要是因为: | ||
@@ -4,0 +6,0 @@ |
{ | ||
"name": "hexo-theme-next", | ||
"version": "7.6.0", | ||
"description": "Elegant and powerful theme for Hexo", | ||
"version": "7.7.0", | ||
"description": "Elegant and powerful theme for Hexo.", | ||
"main": "gulpfile.js", | ||
@@ -19,3 +19,3 @@ "scripts": { | ||
"author": "NexT <support@theme-next.org> (https://theme-next.org)", | ||
"license": "AGPL", | ||
"license": "AGPL-3.0-or-later", | ||
"bugs": { | ||
@@ -26,3 +26,3 @@ "url": "https://github.com/theme-next/hexo-theme-next/issues" | ||
"devDependencies": { | ||
"eslint": "^6.6.0", | ||
"eslint": "^6.8.0", | ||
"eslint-config-theme-next": "^1.1.3", | ||
@@ -29,0 +29,0 @@ "gulp": "^4.0.2", |
@@ -14,3 +14,3 @@ /* global hexo */ | ||
injects.comment.raw('changyan', ` | ||
<div class="comments" id="comments"> | ||
<div class="comments"> | ||
<div id="SOHUCS"></div> | ||
@@ -17,0 +17,0 @@ </div> |
@@ -14,3 +14,3 @@ /* global hexo */ | ||
injects.comment.raw('disqus', ` | ||
<div class="comments" id="comments"> | ||
<div class="comments"> | ||
<div id="disqus_thread"> | ||
@@ -17,0 +17,0 @@ <noscript>Please enable JavaScript to view the comments powered by Disqus.</noscript> |
@@ -13,3 +13,3 @@ /* global hexo */ | ||
injects.comment.raw('disqusjs', ` | ||
<div class="comments" id="comments"> | ||
<div class="comments"> | ||
<div id="disqus_thread"> | ||
@@ -16,0 +16,0 @@ <noscript>Please enable JavaScript to view the comments powered by Disqus.</noscript> |
@@ -13,3 +13,3 @@ /* global hexo */ | ||
injects.comment.raw('livere', ` | ||
<div class="comments" id="comments"> | ||
<div class="comments"> | ||
<div id="lv-container" data-id="city" data-uid="{{ theme.livere_uid }}"></div> | ||
@@ -16,0 +16,0 @@ </div> |
@@ -13,3 +13,3 @@ /* global hexo */ | ||
injects.comment.raw('valine', '<div class="comments" id="comments"></div>', {}, {cache: true}); | ||
injects.comment.raw('valine', '<div class="comments" id="valine-comments"></div>', {}, {cache: true}); | ||
@@ -16,0 +16,0 @@ injects.bodyEnd.file('valine', path.join(hexo.theme_dir, 'layout/_third-party/comments/valine.swig')); |
@@ -18,4 +18,6 @@ /* global hexo */ | ||
locals.description = __('description') !== 'description' ? __('description') : config.description; | ||
// Creative Commons | ||
locals.ccURL = 'https://creativecommons.org/' + (theme.creative_commons.license === 'zero' ? 'publicdomain/zero/1.0/' : 'licenses/' + theme.creative_commons.license + '/4.0/') + (theme.creative_commons.language || ''); | ||
// PJAX | ||
locals.pjax = theme.pjax ? ' pjax' : ''; | ||
}); |
@@ -13,11 +13,4 @@ /* global hexo */ | ||
if (!filters.exturl && !filters.lazyload) return; | ||
const cheerio = require('cheerio'); | ||
const $ = cheerio.load(data.content, { | ||
decodeEntities: false | ||
}); | ||
if (filters.lazyload) { | ||
$('img').each((i, o) => { | ||
let src = $(o).attr('src'); | ||
$(o).attr('data-src', src).removeAttr('src'); | ||
}); | ||
data.content = data.content.replace(/(<img[^>]*) src=/img, '$1 data-src='); | ||
} | ||
@@ -27,25 +20,15 @@ if (filters.exturl) { | ||
var siteHost = url.parse(config.url).hostname || config.url; | ||
$('a').each((i, o) => { | ||
var href = $(o).attr('href'); | ||
data.content = data.content.replace(/<a[^>]* href="([^"]+)"[^>]*>([^<]+)<\/a>/img, (match, href, html) => { | ||
// Exit if the href attribute doesn't exists. | ||
if (!href) return; | ||
if (!href) return match; | ||
var data = url.parse(href); | ||
// Exit if the url has same host with `config.url`, which means it's an internal link. | ||
var link = url.parse(href); | ||
if (!link.protocol || link.hostname === siteHost) return match; | ||
// Exit if the url has same host with `config.url`, which means it's an internal link | ||
if (!data.protocol || data.hostname === siteHost) return; | ||
// If title atribute filled, set it as title; if not, set url as title. | ||
var title = $(o).attr('title') || href; | ||
var encoded = Buffer.from(href).toString('base64'); | ||
$(o).replaceWith(() => { | ||
return $(`<span class="exturl" data-url="${encoded}" title="${title}">${$(o).html()}<i class="fa fa-external-link"></i></span>`); | ||
}); | ||
return `<span class="exturl" data-url="${Buffer.from(href).toString('base64')}" title="${href}">${html}<i class="fa fa-external-link"></i></span>`; | ||
}); | ||
} | ||
data.content = $.html(); | ||
}, 20); | ||
}, 0); |
@@ -55,3 +55,2 @@ /* global hexo */ | ||
let str = this.url_for(path); | ||
str = encodeURI(str); | ||
str.replace('index.html', ''); | ||
@@ -58,0 +57,0 @@ return crypto.createHash('md5').update(str).digest('hex'); |
@@ -17,3 +17,3 @@ /* global CONFIG */ | ||
window.anime({ | ||
targets : [document.documentElement, document.body], | ||
targets : document.scrollingElement, | ||
duration : 200, | ||
@@ -20,0 +20,0 @@ easing : 'linear', |
@@ -64,3 +64,3 @@ /* global NexT, CONFIG, Velocity */ | ||
NexT.utils.isMist() && logoLineTop && logoLineBottom | ||
CONFIG.scheme === 'Mist' && logoLineTop && logoLineBottom | ||
&& sequence.push( | ||
@@ -71,3 +71,3 @@ getMistLineSettings(logoLineTop, '100%'), | ||
NexT.utils.isMuse() && image && pushImageToSequence(); | ||
CONFIG.scheme === 'Muse' && image && pushImageToSequence(); | ||
@@ -86,3 +86,3 @@ title && sequence.push({ | ||
(NexT.utils.isPisces() || NexT.utils.isGemini()) && image && pushImageToSequence(); | ||
(CONFIG.scheme === 'Pisces' || CONFIG.scheme === 'Gemini') && image && pushImageToSequence(); | ||
@@ -152,3 +152,3 @@ if (sequence.length > 0) { | ||
} | ||
if (NexT.utils.isPisces() || NexT.utils.isGemini()) { | ||
if (CONFIG.scheme === 'Pisces' || CONFIG.scheme === 'Gemini') { | ||
integrator.next(); | ||
@@ -162,3 +162,3 @@ } | ||
// Only for Pisces | Gemini. | ||
if (sidebarAffixTransition && (NexT.utils.isPisces() || NexT.utils.isGemini())) { | ||
if (sidebarAffixTransition && (CONFIG.scheme === 'Pisces' || CONFIG.scheme === 'Gemini')) { | ||
Velocity(sidebarAffix, 'transition.' + sidebarAffixTransition, { | ||
@@ -165,0 +165,0 @@ display : null, |
@@ -46,3 +46,3 @@ /* global NexT, CONFIG */ | ||
if (window.getComputedStyle(this.element).display === 'none') return; | ||
let height = this.element.offsetHeight - CONFIG.sidebar.padding * 2; | ||
let height = this.element.offsetHeight - (CONFIG.sidebar.padding * 2); | ||
let offset = this.offset; | ||
@@ -49,0 +49,0 @@ let offsetTop = offset.top; |
@@ -20,3 +20,2 @@ /* global NexT, CONFIG */ | ||
if ($image.is('.post-gallery img')) { | ||
$imageWrapLink.addClass('post-gallery-img'); | ||
$imageWrapLink.attr('data-fancybox', 'gallery').attr('rel', 'gallery'); | ||
@@ -71,5 +70,3 @@ } else if ($image.is('.group-picture img')) { | ||
var target = event.currentTarget; | ||
var code = [...target.parentNode.querySelectorAll('.code .line')].map(line => { | ||
return line.innerText; | ||
}).join('\n'); | ||
var code = [...target.parentNode.querySelectorAll('.code .line')].map(line => line.innerText).join('\n'); | ||
var ta = document.createElement('textarea'); | ||
@@ -162,3 +159,3 @@ ta.style.top = window.scrollY + 'px'; // Prevent page scrolling | ||
window.anime({ | ||
targets : [document.documentElement, document.body], | ||
targets : document.scrollingElement, | ||
duration : 500, | ||
@@ -235,3 +232,3 @@ easing : 'linear', | ||
window.anime({ | ||
targets : [document.documentElement, document.body], | ||
targets : document.scrollingElement, | ||
duration : 500, | ||
@@ -324,18 +321,2 @@ easing : 'linear', | ||
isMuse: function() { | ||
return CONFIG.scheme === 'Muse'; | ||
}, | ||
isMist: function() { | ||
return CONFIG.scheme === 'Mist'; | ||
}, | ||
isPisces: function() { | ||
return CONFIG.scheme === 'Pisces'; | ||
}, | ||
isGemini: function() { | ||
return CONFIG.scheme === 'Gemini'; | ||
}, | ||
/** | ||
@@ -350,5 +331,5 @@ * Init Sidebar & TOC inner dimensions on all pages and for all schemes. | ||
var sidebarb2tHeight = CONFIG.back2top.enable && CONFIG.back2top.sidebar ? document.querySelector('.back-to-top').offsetHeight : 0; | ||
var sidebarSchemePadding = CONFIG.sidebar.padding * 2 + sidebarNavHeight + sidebarb2tHeight; | ||
var sidebarSchemePadding = (CONFIG.sidebar.padding * 2) + sidebarNavHeight + sidebarb2tHeight; | ||
// Margin of sidebar b2t: 8px -10px -20px, brings a different of 12px. | ||
if (NexT.utils.isPisces() || NexT.utils.isGemini()) sidebarSchemePadding += (sidebarOffset * 2) - 12; | ||
if (CONFIG.scheme === 'Pisces' || CONFIG.scheme === 'Gemini') sidebarSchemePadding += (sidebarOffset * 2) - 12; | ||
// Initialize Sidebar & TOC Height. | ||
@@ -373,3 +354,3 @@ var sidebarWrapperHeight = document.body.offsetHeight - sidebarSchemePadding + 'px'; | ||
NexT.utils.initSidebarDimension(); | ||
if (!this.isDesktop() || this.isPisces() || this.isGemini()) return; | ||
if (!this.isDesktop() || CONFIG.scheme === 'Pisces' || CONFIG.scheme === 'Gemini') return; | ||
// Expand sidebar on post detail page by default, when post has a toc. | ||
@@ -401,3 +382,19 @@ var display = CONFIG.page.sidebar; | ||
} | ||
}, | ||
loadComments: function(element, callback) { | ||
if (!CONFIG.comments.lazyload || !element) { | ||
callback(); | ||
return; | ||
} | ||
let intersectionObserver = new IntersectionObserver((entries, observer) => { | ||
let entry = entries[0]; | ||
if (entry.isIntersecting) { | ||
callback(); | ||
observer.disconnect(); | ||
} | ||
}); | ||
intersectionObserver.observe(element); | ||
return intersectionObserver; | ||
} | ||
}; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Copyleft License
License(Experimental) Copyleft license information was found.
Found 1 instance in 1 package
Mixed license
License(Experimental) Package contains multiple licenses.
Found 1 instance in 1 package
Non-permissive License
License(Experimental) A license not known to be considered permissive was found.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Misc. License Issues
License(Experimental) A package's licensing information has fine-grained problems.
Found 1 instance in 1 package
Copyleft License
License(Experimental) Copyleft license information was found.
Found 1 instance in 1 package
Non-permissive License
License(Experimental) A license not known to be considered permissive was found.
Found 1 instance in 1 package
0
1133046
298
5
4904