0 Star 0 Fork 1

deerainw / next

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MIT

e x T

NexT 是一个高质量并且优雅的Hexo 主题。这是精心制作做出来的 hexo 主题。

NexT Schemes

Join the chat at https://gitter.im/iissnan/hexo-theme-next mnt-image travis-image rel-image hexo-image lic-image

实时预览 Live Preview

更多 NexT 例子点击 这里.

安装 Installation

1. 在终端切换到hexo 根目录. 在hexo目录下一定有 node_modules, source, themes 和其他文件夹:

$ cd hexo
$ ls
_config.yml  node_modules  package.json  public  scaffolds  source  themes

2. 从 github 上获取主题 。这里有几种方式来获取主题:

下载最新发布的版本 Download tagged release version

  在大多数情况下 稳定。 推荐用户下载这个。

curl-tar-wget-image

$ mkdir themes/next
$ curl -s https://api.github.com/repos/iissnan/hexo-theme-next/releases/latest | grep tarball_url | cut -d '"' -f 4 | wget -i - -O- | tar -zx -C themes/next --strip-components=1

下载标签发布版本 Download tagged release version

  您必须定义版本。从标签列表里选择版本替换v5.1.2

curl-tar-image

$ mkdir themes/next
$ curl -L https://api.github.com/repos/iissnan/hexo-theme-next/tarball/v5.1.2 | tar -zxv -C themes/next --strip-components=1

git-image

$ git clone --branch v5.1.2 https://github.com/iissnan/hexo-theme-next themes/next

下载最新的 master 分支 Download latest master branch

 可能会 不稳定, 但是包含最新的特色,推荐开发者下载.

curl-tar-image

$ mkdir themes/next
$ curl -L https://api.github.com/repos/iissnan/hexo-theme-next/tarball | tar -zxv -C themes/next --strip-components=1

git-image

$ git clone https://github.com/iissnan/hexo-theme-next themes/next

使用克隆命令,你将得到整个存储库。而且在任何时候你都可以切换到任何标签发布版本。 获取标签列表:

$ cd themes/next
$ git tag -l

v5.0.0
v5.0.1
v5.1.0
v5.1.1
v5.1.2

  例如, 你想要切换到v5.1.0 标签发布版本. 输入以下命令:

$ git checkout tags/v5.1.0
Note: checking out 'tags/v5.1.0'.

HEAD now on 1f72f68... CSS: Remove global list-style setting of ul

  如果你想切换回 master 分支的话, 输入这个命令:

$ git checkout master

3.hexo 根目录下 的配置文件_config.yml里设置主题:

theme: next

Bugs

对于那些遇到 Error: Cannot find module 'hexo-util' 问题的人, 请检查你的NPM 版本.

  • 版本 > 3: 如果仍然不行的话,请移除 node_modules 文件 然后重新安装,使用 npm install命令。
  • 版本 < 3: 请通过npm install --save-dev hexo-util命令添加hexo-util到你的站点包依赖里

更新 Update

$ cd themes/next
$ git pull

Bugs

提交您的更改或存储它们,然后才能合并。

您必须提交,存储或放弃本地更改. 看 here 是如何做的。

使用Hexo data files(#328)配置主题 Theme configurations using Hexo data files #328

目前升级 NexT 主题的时候并不是非常的流畅。若使用 git pull 的方式,很多时候可能会产生冲突;而下载新版本覆盖安装的方式又需要手动合并主题的 _config.yml 文件。

在此修改之前, NexT 建议将配置分离,一部分在 站点的配置文件中,另外一部分在主题的配置文件中。将需要自定的选项放置在 站点配置文件中,从而脱离避免更新主题时可能遇到的麻烦。这种方式是可行,但是有一些缺点:

  1. 配置分离成了两个部分
  2. 用户可能会疑惑一些选项该放置在哪里比较合适

为了解决这个问题, NexT 将会使用 Hexo 的 Data Files 。然而由于 Data Files 是在 Hexo 3 版本时引进的,所以要使用这个特性,需要 Hexo 的版本不低于 3。

若你比较喜欢 Hexo 2.x 版本,可以继续使用原先的配置方式。 NexT 保持着向下兼容。

特性 Benefits

通过这个特性,你可以将所有的主题配置放置在站点的 source/_data/next.yml 文件中。原先放置在 站点配置文件 中的选项可以迁移到新的位置,同时,主题配置文件可以不用做任何修改。若后续版本有配置相关的改动时,你仅需在 next.yml 中做相应调整即可

如何使用这个特性 How to use this feature

  1. 请先确保你所使用的 Hexo 版本在 3 以上
  2. 在站点的 source/_data 目录下新建 next.yml 文件(_data目录可能需要新建)
  3. 迁移站点配置文件和主题配置文件中的配置到 next.yml 中
  4. 使用 --config source/_data/next.yml 参数启动服务器, 生成或者部署。
      例如: hexo clean --config source/_data/next.yml && hexo g --config source/_data/next.yml

特色 Features

支持多国语言, 包括:

:cn: 简体中文 & 繁体中文
:us: 英语
:ru: 俄语
:fr: 法语
:de: 德语
:jp: 日语
:indonesia: 印度尼西亚语
:portugal: 葡萄牙语 (巴西)
:kr: 朝鲜语
:it: 意大利语
:netherlands: 荷兰语

默认语言是英语。

language: en
# language: zh-Hans
# language: zh-hk
# language: zh-tw
# language: ru
# language: fr-FR
# language: de
# language: ja
# language: id
# language: pt
# language: pt-BR
# language: ko
# language: it
# language: nl-NL

在站点配置文件_config.yml中可以将语言切换成中文

language: zh-Hans

评论支持 Comment support

NexT 已经原生支持 多说 and Disqus 评论系统。

添加以下代码到你的主题配置文件 _config.yml:

duoshuo:
  enable: true
  shortname: your-duoshuo-shortname

或者

disqus_shortname: your-disqus-shortname

标签页 Tags page

添加一个标签页面,里面包含您网站中的所有标签。

  • 创建一个名为 tags 页面

      hexo new page "tags"
  • 编辑标签页, 设置页面类型为tags.

      title: All tags
      date: 2014-12-22 12:39:04
      type: "tags"
  • 添加 tags 到主题配置文件 _config.yml 里:

      menu:
        home: /
        archives: /archives
        tags: /tags

分类页 Categories page

添加一个分类页面,里面包含您网站中的所有分类。

  • 创建一个名为 categories 页面

      hexo new page "categories"
  • 编辑分类页, 设置页面类型为 categories.

      title: All categories
      date: 2014-12-22 12:39:04
      type: "categories"
  • 添加 categories 到主题配置文件 _config.yml 里:

      menu:
        home: /
        archives: /archives
        categories: /categories

社交媒体 Social Media

NexT 可以自动添加链接到您的社交媒体帐户里:

social:
  GitHub: your-github-url
  Twitter: your-twitter-url
  Weibo: your-weibo-url
  DouBan: your-douban-url
  ZhiHu: your-zhihu-url

Feed 链接 Feed link

显示 feed 链接。

在主题配置文件_config.yml里设置rss , 如下所示:

  1. rss: false 会禁用 feed 链接。
  2. rss: 使用站点 feed 链接。这是默认的选项。

   按照插件hexo-generator-feed的README中的安装说明进行操作。在完成这个插件的配置后,Feed链接也生成好了

  1. rss: http://your-feed-url 设置你的 feed 链接.

内置5种代码高亮主题 Up to 5 code highlight themes built-in

NexT 使用的是 Tomorrow 主题 ,一共有5种主题供你选择。 Next 默认使用 normal. 下面是 normal 和 night 主题的预览:

Tomorrow Normal Preview Tomorrow Night Preview

查看更多信息点击Tomorrow 主题

配置 Configuration

NexT 的配置很少


# Menu configuration.
menu:
  home: /
  archives: /archives

# Favicon
favicon: /favicon.ico

# Avatar (put the image into next/source/images/)
# can be any image format supported by web browsers (JPEG,PNG,GIF,SVG,..)
avatar: /default_avatar.png

# Code highlight theme
# available: normal | night | night eighties | night blue | night bright
highlight_theme: normal

# Fancybox for image gallery
fancybox: true

# Specify the date when the site was setup
since: 2013

浏览器支持 Browser support

Browser support

Browser Stack

BrowserStack is a cloud-based cross-browser testing tool that enables developers to test their websites across various browsers on different operating systems and mobile devices, without requiring users to install virtual machines, devices or emulators.

贡献 Contributing

接受各种形式的贡献,包括不限于提交问题与需求,修复代码。等待您的Pull Request

Any types of contribution are welcome. Thanks.

ATTENTION! Contributors on Chinese docs needed!
Need to translate from English docs to Chinese docs.
Any help wanted!
Thank's a lot!

开发 Development

NexT 主旨在于简洁优雅且易于使用,所以首先要尽量确保 NexT 的简洁易用性。

NexT is built for easily use with elegant appearance. First things first, always keep things simple.

开发历史 Changelog

MIT License Copyright (c) 2014-2017 iissnan Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

简介

hexo 的 NexT theme,单独保存 展开 收起
MIT
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
1
https://gitee.com/deerainw/next.git
git@gitee.com:deerainw/next.git
deerainw
next
next
master

搜索帮助