Skip to content

Commit

Permalink
Update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
stevenjoezhang committed Aug 3, 2020
1 parent d6e9dd4 commit 2cf6755
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 14 deletions.
14 changes: 10 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,12 @@ $ git clone https://github.com/next-theme/hexo-theme-next themes/next

See [detailed installation instructions][docs-installation-url] if you want any other variant.

After the installation, open Hexo config file and set `theme` variable to `next`.

```yml
theme: next
```
## Configuration
At present, NexT encourages users to use the [Alternate Theme Config][docs-configuration-url] to configure NexT. And it's easy to customize the layout or style of NexT using [Custom Files][docs-custom-files-url].
Expand All @@ -57,7 +63,7 @@ However, you can bypass merge conflicts (error message like **«Commit your chan

## Plugins

Plugins extend and expand the functionality of NexT. There are two types of plugins: core plugins and third-party plugins. The core plugins are required by the basic functions of NexT. Third-party plugins are loaded from jsDelivr CDN by default, and they provide a large number of optional features.
Plugins extend and expand the functionality of NexT. There are two types of plugins: core plugins and third-party plugins. The core plugins are required by the basic functions of NexT. Third-party plugins provide a large number of optional features.

Configuring these plugins is very easy. For example, if you want to enable `pjax` on your site, just set `pjax` to `true` in NexT config file:

Expand All @@ -69,16 +75,16 @@ pjax: true

### Configure CDN

If you want to specify the CDN provider for any plugins, you need to set / update the CDN URL.
Third-party plugins are loaded from [jsDelivr](https://www.jsdelivr.com) CDN by default. We also provide other optional CDNs, including the famous [UNPKG](https://unpkg.com) and [CDNJS](https://cdnjs.com).

For example, if you want to set the CDN URL for `mediumzoom`, go to NexT config and see:
For example, if you want to use `unpkg` instead of `jsdelivr` as the default CDN provider, you need to edit the following settings in NexT config file:

```yml
vendors:
# ...
# Some contents...
# ...
mediumzoom: # Set or update mediumzoom CDN URL.
plugins: unpkg
```

## Update
Expand Down
6 changes: 4 additions & 2 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -857,20 +857,22 @@ canvas_ribbon:
# Remember to use the https protocol of CDN links when you enable https on your site.
vendors:
# The CDN provider of NexT internal scripts.
# Available values: local, jsdelivr, unpkg
# Available values: local | jsdelivr | unpkg
internal: local
# The default CDN provider of third-party plugins.
# Available values: local, jsdelivr, unpkg, cdnjs
# Available values: local | jsdelivr | unpkg | cdnjs
# Dependencies for `plugins: local`: https://github.com/next-theme/plugins
plugins: jsdelivr

# In the following settings, you can specify the CDN link for each plugin.
# If left blank, the default CDN provider set by `plugins` option will be used.

# Anime.js
# For more information: https://animejs.com
anime:

# Font Awesome
# For more information: https://fontawesome.com
fontawesome:

# Prism
Expand Down
14 changes: 10 additions & 4 deletions docs/ru/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,12 @@ $ git clone https://github.com/next-theme/hexo-theme-next themes/next

See [detailed installation instructions][docs-installation-url] if you want any other variant.

After the installation, open Hexo config file and set `theme` variable to `next`.

```yml
theme: next
```
## Configuration
At present, NexT encourages users to use the [Alternate Theme Config][docs-configuration-url] to configure NexT. And it's easy to customize the layout or style of NexT using [Custom Files][docs-custom-files-url].
Expand All @@ -57,7 +63,7 @@ However, you can bypass merge conflicts (error message like **«Commit your chan

## Плагины

Plugins extend and expand the functionality of NexT. There are two types of plugins: core plugins and third-party plugins. The core plugins are required by the basic functions of NexT. Third-party plugins are loaded from jsDelivr CDN by default, and they provide a large number of optional features.
Plugins extend and expand the functionality of NexT. There are two types of plugins: core plugins and third-party plugins. The core plugins are required by the basic functions of NexT. Third-party plugins provide a large number of optional features.

Configuring these plugins is very easy. Например, Вы хотите использовать `pjax` для своего сайта. Открываем конфиг NexT'а и находим:

Expand All @@ -69,16 +75,16 @@ pjax: true

### Configure CDN

If you want to specify the CDN provider for any plugins, you need to set / update the CDN URL.
Third-party plugins are loaded from [jsDelivr](https://www.jsdelivr.com) CDN by default. We also provide other optional CDNs, including the famous [UNPKG](https://unpkg.com) and [CDNJS](https://cdnjs.com).

For example, if you want to set the CDN URL for `mediumzoom`, go to NexT config and see:
For example, if you want to use `unpkg` instead of `jsdelivr` as the default CDN provider, you need to edit the following settings in NexT config file:

```yml
vendors:
# ...
# Some contents...
# ...
mediumzoom: # Set or update mediumzoom CDN URL.
plugins: unpkg
```

## Обновление
Expand Down
14 changes: 10 additions & 4 deletions docs/zh-CN/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,12 @@ $ git clone https://github.com/next-theme/hexo-theme-next themes/next

此外,如果你想要使用其他方式,请参见[详细安装步骤][docs-installation-url]

安装完成后,在 Hexo 配置文件中将 `theme` 设置为 `next`

```yml
theme: next
```
## 配置
目前 NexT 鼓励用户使用 [Alternate Theme Config][docs-configuration-url] 进行配置。并且可以轻松地通过 [Custom Files][docs-custom-files-url] 自定义主题的布局和样式。
Expand All @@ -57,7 +63,7 @@ $ git clone https://github.com/next-theme/hexo-theme-next themes/next

## 插件

插件丰富和拓展了 NexT 的功能。这些插件分为两种:核心插件和第三方插件。核心插件被 NexT 的基础功能所依赖。第三方插件默认通过 jsDelivr 的 CDN 服务加载,它们提供了大量的可选功能
插件丰富和拓展了 NexT 的功能。这些插件分为两种:核心插件和第三方插件。核心插件被 NexT 的基础功能所依赖。第三方插件提供了大量的可选功能

配置这些插件非常简单。例如,你想要在你的站点中使用 `pjax` 插件,请进入 NexT 配置文件,启用 `pjax` 配置项:

Expand All @@ -69,16 +75,16 @@ pjax: true

### 设置 CDN

如果你想要通过自定义 CDN 而不是默认的 jsDelivr 来加载插件脚本,那么需要设置相关的 CDN 链接
第三方插件默认通过 [jsDelivr](https://www.jsdelivr.com) CDN 服务加载。我们也提供了其它的 CDN 服务供选择,包括著名的 [UNPKG](https://unpkg.com) 和 [CDNJS](https://cdnjs.com)

例如,你想要为 `mediumzoom` 插件设置 CDN 地址,进入 NexT 配置文件并找到如下内容
例如,你想要使用 `unpkg` 代替 `jsdelivr` 作为默认的 CDN 提供商,你需要在 NexT 配置文件中进行如下设置

```yml
vendors:
# ...
# Some contents...
# ...
mediumzoom: # Set or update mediumzoom CDN URL.
plugins: unpkg
```

## 更新
Expand Down

0 comments on commit 2cf6755

Please sign in to comment.