New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

hexo-theme-next

Package Overview
Dependencies
Maintainers
1
Versions
93
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hexo-theme-next - npm Package Compare versions

Comparing version 6.0.6 to 6.1.0

.github/CODE_OF_CONDUCT.md

125

.github/CONTRIBUTING.md

@@ -1,5 +0,124 @@

Before submitting an issue, please search for the issue [here](https://github.com/theme-next/hexo-theme-next/issues?utf8=%E2%9C%93&q=) to find if the issue is already reported.
<div align="right">Language: :us:
<a title="Chinese" href="../docs/zh-CN/CONTRIBUTING.md">:cn:</a>
<a title="Russian" href="../docs/ru/CONTRIBUTING.md">:ru:</a></div>
Also, you can search for answers on the [«NexT» Documentation Site](https://theme-next.org/docs/):
# <div align="center"><a title="Go to homepage" href="https://theme-next.org"><img align="center" width="56" height="56" src="https://raw.githubusercontent.com/theme-next/hexo-theme-next/master/source/images/logo.svg?sanitize=true"></a> e x T</div>
- FAQs (Work in progress)
First of all, thanks for taking the time to contribute and help make our project even better than it is today! The following is a set of guidelines for contributing to [Theme-Next](https://github.com/theme-next) and its libs submodules. These are mostly guidelines, not rules. Use your best judgment, and feel free to propose changes to this document in a pull request.
## Table Of Contents
[How Can I Contribute?](#how-can-i-contribute)
* [Before Submitting An Issue](#before-submitting-an-issue)
* [Reporting Bugs](#reporting-bugs)
* [Suggesting Enhancements](#suggesting-enhancements)
* [Submitting a Pull Request](#submitting-a-pull-request)
[Style Guides](#style-guides)
* [Coding Rules](#coding-rules)
* [Coding Standards](#coding-standards)
* [Commit Messages Rules](#commit-messages-rules)
<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.
<a name="before-submitting-an-issue"></a>
### 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 (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.
<a name="reporting-bugs"></a>
### Reporting Bugs
Before creating bug reports, please check [this list](#before-submitting-an-issue) as you might find out that you don't need to create one. After you've determined the repository your bug is related to, create an issue on that repository and provide the information as many details as possible by filling in [the required template](ISSUE_TEMPLATE.md).
Following these guidelines helps maintainers and the community understand your report :pencil:, reproduce the behavior, and find related reports:
* Use a clear and descriptive title for the issue to identify the problem.
* Provide more context by answering these questions:
* Can you reproduce the problem? Can you reliably reproduce the issue? If not, provide details about how often the problem happens and under which conditions it normally happens.
* Did the problem start happening recently or was this always a problem?
* If the problem started happening recently, can you reproduce the problem in an older version of Next? What's the most recent version in which the problem doesn't happen? You can download older versions of Next from [the releases page](https://github.com/theme-next/hexo-theme-next/releases).
* Which version of Node, Hexo and Next are you using? You can get the exact version by running `node -v`, `hexo version` in your terminal, or copy the contents in site's`package.json`.
* Which packages do you have installed? You can get that list by copying the contents in site's`package.json`.
* Describe the exact steps which reproduce the problem in as many details as possible. When listing steps, don't just say what you did, but explain how you did it, e.g. which command exactly you used. If you're providing snippets in the issue, use [Markdown code blocks](https://help.github.com/articles/creating-and-highlighting-code-blocks/) or [a permanent link to a code snippet](https://help.github.com/articles/creating-a-permanent-link-to-a-code-snippet/), or a [Gist link](https://gist.github.com/).
* Provide specific examples to demonstrate the steps. Include links to files (screenshots or GIFs) or live demo.
* Describe the behavior you observed after following the steps and point out what exactly is the problem with that behavior.
* Explain which behavior you expected to see instead and why.
### Suggesting Enhancements
Before creating enhancement suggestions, please check [this list](#before-submitting-an-issue) as you might find out that you don't need to create one. After you've determined the repository your enhancement suggestion is related to, create an issue on that repository and provide the information as many details as possible by filling in [the required template](ISSUE_TEMPLATE.md).
Following these guidelines helps maintainers and the community understand your suggestion :pencil: and find related suggestions.
* Use a clear and descriptive title for the issue to identify the suggestion.
* Describe the current behavior and explain which behavior you expected to see instead and Explain why this enhancement would be useful to most users.
* Provide specific examples to demonstrate the suggestion. Include links to files (screenshots or GIFs) or live demo.
### Submitting a Pull Request
Before creating a Pull Request (PR), please check [this list](#before-submitting-an-issue) as you might find out that you don't need to create one. After you've determined the repository your pull request is related to, create a pull request on that repository. The detailed document of creating a pull request can be found [here](https://help.github.com/articles/creating-a-pull-request/).
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.
```bash
$ 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.
```bash
$ 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.
```bash
$ 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::
* Follow our [Coding Rules](#coding-rules) and [commit message conventions](#commit-messages-rules).
* Use a clear and descriptive title for the issue to identify the pull request. Do not include issue numbers in the PR title.
* Fill in [the required template](PULL_REQUEST_TEMPLATE.md) as many details as possible.
* All features or bug fixes must be tested in all schemes. And provide specific examples to demonstrate the pull request. Include links to files (screenshots or GIFs) or live demo.
## Style Guides
### Coding Rules
This project and everyone participating in it is governed by the [Code of Conduct](CODE_OF_CONDUCT.md) to keep open and inclusive. By participating, you are expected to uphold this code.
### Coding Standards
### Commit Messages Rules
We have very precise rules over how our git commit messages can be formatted. Each commit message consists of a `type` and a `subject`. This leads to more
readable messages that are easy to follow when looking through the project history.
- `type` describes the meaning of this commit including but not limited to the following items, and capitalize the first letter.
* `build`: Changes that affect the build system or external dependencies
* `ci`: Changes to our CI configuration files and scripts
* `docs`: Documentation only changes
* `feat`: A new feature
* `fix`: A bug fix
* `perf`: A code change that improves performance
* `refactor`: A code change that neither fixes a bug nor adds a feature
* `style`: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)
* `revert`: Revert some existing commits
* `release`: Commit a release for a conventional changelog project
- The `subject` contains a succinct description of the change, like `Update code highlighting in readme.md`.
* no dot (.) at the end.
* use the imperative, present tense: "change" not "changed" nor "changes".

2

bower.json
{
"name": "theme-next",
"version": "6.0.6",
"version": "6.1.0",
"homepage": "https://theme-next.org",

@@ -5,0 +5,0 @@ "authors": [

@@ -24,3 +24,3 @@ <div align="right">Язык: <a title="Английский" href="../../README.md">:us:</a>

* :pisces: Pisces тема: [Vi](http://notes.iissnan.com) | [Acris](https://acris.me) | [Rainy](https://rainylog.com)
* :gemini: Gemini тема: [Ivan.Nginx](https://almostover.ru) | [Alynx](http://sh.alynx.xyz) | [Raincal](https://raincal.com)
* :gemini: Gemini тема: [Ivan.Nginx](https://almostover.ru) | [Raincal](https://raincal.com) | [Dandy](https://dandyxu.me)

@@ -27,0 +27,0 @@ Больше примеров «NexT» [здесь](https://github.com/iissnan/hexo-theme-next/issues/119).

@@ -1,29 +0,3 @@

NexT主题使用的Leancloud访客统计插件存在重大安全漏洞,拥有不良企图的人利用该漏洞可随意更改访客数量或一定程度上增删数据库记录。
在配置前,请升级NexT至**v6.0.6**以上。
该漏洞由[我](https://github.com/LEAFERx/)独立发现,并由[Ivan.Nginx](https://github.com/ivan-nginx)确认。
- 有关的issue:[#25](https://github.com/theme-next/hexo-theme-next/issues/25)
- 有关的pr: [#137](https://github.com/theme-next/hexo-theme-next/pull/137)
- 有关的插件:[hexo-leancloud-counter-security](https://github.com/theme-next/hexo-leancloud-counter-security)
经过讨论后,我们认为该漏洞必须由使用者手动修复。本文给出了修复方法。
**注意:所有使用该插件而未经修复的NexT站点或使用类似方法集成Leancloud访客统计功能的站点都被认为是不安全的,请尽快修复。**
---
原文链接:https://leaferx.online/2018/02/11/lc-security/
---
为方便起见,本文将复述从头开始配置Leancloud访客统计插件的过程。
本文部分内容参考自Doublemine的[为NexT主题添加文章阅读量统计功能](https://notes.wanghao.work/2015-10-21-%E4%B8%BANexT%E4%B8%BB%E9%A2%98%E6%B7%BB%E5%8A%A0%E6%96%87%E7%AB%A0%E9%98%85%E8%AF%BB%E9%87%8F%E7%BB%9F%E8%AE%A1%E5%8A%9F%E8%83%BD.html#%E9%85%8D%E7%BD%AELeanCloud)。
对于已经完成该部分配置的用户,请自行对照本文步骤进行修复。
在配置前,请升级NexT至**v6.0.5**以上。
在配置过程中请注意**博客配置文件**和**主题配置文件**的区别。

@@ -37,11 +11,11 @@

![1](https://dn-cqha0xyi.qbox.me/fc0c048a1e25dc3d10aa.jpg)
![1](https://lc-cqha0xyi.cn-n1.lcfile.com/fc0c048a1e25dc3d10aa.jpg)
- 接着,点击图示`1`处,创建应用:
![2](https://dn-cqha0xyi.qbox.me/33a56b754753a5d34b01.jpg)
![2](https://lc-cqha0xyi.cn-n1.lcfile.com/33a56b754753a5d34b01.jpg)
- 在弹出窗口`1`处输入应用名称(可随意输入,可更改,为演示方便取名为test),并选择`2`处“开发版”,然后点击`3`处创建:
![3](https://dn-cqha0xyi.qbox.me/649ccfc6f12015d1eefb.jpg)
![3](https://lc-cqha0xyi.cn-n1.lcfile.com/649ccfc6f12015d1eefb.jpg)

@@ -53,15 +27,15 @@ 到这里应用创建完成。

![4](https://dn-cqha0xyi.qbox.me/d0889df29841661e0b9e.jpg)
![4](https://lc-cqha0xyi.cn-n1.lcfile.com/d0889df29841661e0b9e.jpg)
- 如图,点击侧边栏`1`处创建Class:
![5](https://dn-cqha0xyi.qbox.me/b0fbc81bd6c19fa09a46.jpg)
![5](https://lc-cqha0xyi.cn-n1.lcfile.com/b0fbc81bd6c19fa09a46.jpg)
- 在弹出窗口`1`处填入`Counter`,勾选`2`处无限制,并点击`3`处创建Class:
![6](https://dn-cqha0xyi.qbox.me/ae6154d6a55f02f11ebf.jpg)
![6](https://lc-cqha0xyi.cn-n1.lcfile.com/ae6154d6a55f02f11ebf.jpg)
- 此时类已创建完成。接下来点击图示`1`处进入设置,然后点击`2`处进入应用Key:
![8](https://dn-cqha0xyi.qbox.me/9501a6372918dd9a8a92.jpg)
![8](https://lc-cqha0xyi.cn-n1.lcfile.com/9501a6372918dd9a8a92.jpg)

@@ -72,3 +46,3 @@ - 粘贴`App ID`和`App Key`到**NexT主题配置文件**`_config.yml`对应位置。此时配置文件应如下:

enable: true
security: true
security: true
app_id: <<your app id>>

@@ -80,3 +54,3 @@ app_key: <<your app key>>

![9](https://dn-cqha0xyi.qbox.me/0e537cc4bec2e185201d.jpg)
![9](https://lc-cqha0xyi.cn-n1.lcfile.com/0e537cc4bec2e185201d.jpg)

@@ -88,7 +62,7 @@ 到这里内容均与Doublemine的[为NexT主题添加文章阅读量统计功能](https://notes.wanghao.work/2015-10-21-%E4%B8%BANexT%E4%B8%BB%E9%A2%98%E6%B7%BB%E5%8A%A0%E6%96%87%E7%AB%A0%E9%98%85%E8%AF%BB%E9%87%8F%E7%BB%9F%E8%AE%A1%E5%8A%9F%E8%83%BD.html#%E9%85%8D%E7%BD%AELeanCloud)这篇文章相同,只不过截图为新版的Leancloud的界面。

![10](https://dn-cqha0xyi.qbox.me/d7056dfeeef7c5d66318.jpg)
![10](https://lc-cqha0xyi.cn-n1.lcfile.com/d7056dfeeef7c5d66318.jpg)
- 点击`1`处创建函数:
![11](https://dn-cqha0xyi.qbox.me/2737841bbc2bdd572ae0.jpg)
![11](https://lc-cqha0xyi.cn-n1.lcfile.com/2737841bbc2bdd572ae0.jpg)

@@ -109,15 +83,15 @@ - 在弹出窗口选择`1`处`Hook`类型,然后`2`处选择`beforeUpdate`,`3`处选择刚才建立的`Counter`类。在`4`中粘贴下方代码后,点`5`处保存。

![12](https://dn-cqha0xyi.qbox.me/a8e13418ed1d9405315b.jpg)
![12](https://lc-cqha0xyi.cn-n1.lcfile.com/a8e13418ed1d9405315b.jpg)
- 点击保存后应出现类似红框处函数。此时点击`1`处部署:
![13](https://dn-cqha0xyi.qbox.me/ca56bf2e5fc2a1343565.jpg)
![13](https://lc-cqha0xyi.cn-n1.lcfile.com/ca56bf2e5fc2a1343565.jpg)
- 在弹出窗口点击`1`处部署:
![14](https://dn-cqha0xyi.qbox.me/17548c13b3b23c71d845.jpg)
![14](https://lc-cqha0xyi.cn-n1.lcfile.com/17548c13b3b23c71d845.jpg)
- 等待出现红框处的成功部署信息后,点击`1`处关闭:
![15](https://dn-cqha0xyi.qbox.me/d2f50de6cefea9fd0ed3.jpg)
![15](https://lc-cqha0xyi.cn-n1.lcfile.com/d2f50de6cefea9fd0ed3.jpg)

@@ -153,4 +127,4 @@

app_key: <<your app key>
username:
password:
username:
password:
```

@@ -167,3 +141,3 @@

将`<<username>>`和`<<password>>`替换为你自己的用户名和密码(不必与leancloud的账号)相同。此用户名和密码将在hexo部署时使用。
将`<<username>>`和`<<password>>`替换为你自己的用户名和密码(不必与leancloud的账号相同)。此用户名和密码将在hexo部署时使用。

@@ -189,23 +163,23 @@ - 打开**博客配置文件**`_config.yml`,将`<<username>>`和`<<password>>`替换为你刚刚设置的用户名和密码:

![16](https://dn-cqha0xyi.qbox.me/99faa5a0e7160e66d506.jpg)
![16](https://lc-cqha0xyi.cn-n1.lcfile.com/99faa5a0e7160e66d506.jpg)
- 点击`1`处进入Counter表,依次点击`2` `3`,打开权限设置:
![17](https://dn-cqha0xyi.qbox.me/b72a9e64579f5b71749d.jpg)
![17](https://lc-cqha0xyi.cn-n1.lcfile.com/b72a9e64579f5b71749d.jpg)
- 点击`1`add_fields后选择`2`指定用户, 并将下两栏留空:
![18](https://dn-cqha0xyi.qbox.me/14a8cb37062693d768ad.jpg)
![18](https://lc-cqha0xyi.cn-n1.lcfile.com/14a8cb37062693d768ad.jpg)
- 点击`1`create后选择`2`指定用户, 在`3`处键入用户名,点击`4`处后点击`5`处添加:
![19](https://dn-cqha0xyi.qbox.me/d91714cfd703ef42b94c.jpg)
![19](https://lc-cqha0xyi.cn-n1.lcfile.com/d91714cfd703ef42b94c.jpg)
完成此步操作后,界面应与图示类似:
![20](https://dn-cqha0xyi.qbox.me/c05e7ec9218820baf412.jpg)
![20](https://lc-cqha0xyi.cn-n1.lcfile.com/c05e7ec9218820baf412.jpg)
- 点击`1`delete后选择`2`指定用户, 并将下两栏留空:
![21](https://dn-cqha0xyi.qbox.me/c37b6e20726cfb1d3197.jpg)
![21](https://lc-cqha0xyi.cn-n1.lcfile.com/c37b6e20726cfb1d3197.jpg)

@@ -216,2 +190,6 @@ 至此权限已设置完成,数据库记录只能在本地增删。

如果在**博客配置文件**中留空username或password,则在部署过程中程序会要求输入。
如果在**博客配置文件**中留空username或password,则在部署过程中程序会要求输入。
---
原文链接:https://leaferx.online/2018/02/11/lc-security/

@@ -24,3 +24,3 @@ <div align="right">语言: <a title="英语" href="../../README.md">:us:</a>

* :pisces: Pisces 主题: [Vi](http://notes.iissnan.com) | [Acris](https://acris.me) | [Rainy](https://rainylog.com)
* :gemini: Gemini 主题: [Ivan.Nginx](https://almostover.ru) | [Alynx](http://sh.alynx.xyz) | [Raincal](https://raincal.com)
* :gemini: Gemini 主题: [Ivan.Nginx](https://almostover.ru) | [Raincal](https://raincal.com) | [Dandy](https://dandyxu.me)

@@ -54,2 +54,19 @@ 更多 «NexT» 的例子参见[这里](https://github.com/iissnan/hexo-theme-next/issues/119)。

### 例外
如果你使用的插件脚本依赖 CDN,那么需要替换你的 CDN 链接:
例如,假如你使用了 `fancybox` 插件并且配置了 CDN 加载链接,进入 Next 配置文件,你会看到如下内容:
```yml
vendors:
# ...
# Some contents...
# ...
fancybox: # Set or update fancybox cdn url.
fancybox_css: # Set or update fancybox cdn url.
```
通过替换 CDN 链接来替换 [插件列表](https://github.com/theme-next) 项目来升级。
## 更新

@@ -56,0 +73,0 @@

{
"name": "hexo-theme-next",
"version": "6.0.6",
"version": "6.1.0",
"description": "Elegant and powerful theme for Hexo",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -24,3 +24,3 @@ <div align="right">Language: :us:

* :pisces: Pisces scheme: [Vi](http://notes.iissnan.com) | [Acris](https://acris.me) | [Rainy](https://rainylog.com)
* :gemini: Gemini scheme: [Ivan.Nginx](https://almostover.ru) | [Alynx](http://sh.alynx.xyz) | [Raincal](https://raincal.com)
* :gemini: Gemini scheme: [Ivan.Nginx](https://almostover.ru) | [Raincal](https://raincal.com) | [Dandy](https://dandyxu.me)

@@ -27,0 +27,0 @@ More «NexT» examples [here](https://github.com/iissnan/hexo-theme-next/issues/119).

@@ -207,3 +207,3 @@ /* global NexT: true */

var partPath = '';
for (i = 0; i < path.length; i++) {
for (var i = 0; i < path.length; i++) {
if (path[i] !== '') {

@@ -210,0 +210,0 @@ partPath += '/' + path[i];

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

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc