hexo-theme-next README

The project's README from github.com/iissnan/hexo-theme-next. As one markdown file: README.md.

This repository is no longer maintained! :warning:

The community-maintained version is here: NexT v6 and v7 :triangular_flag_on_post:

NexT

NexT is a high quality elegant Hexo theme. It is crafted from scratch, with love.

gitter-image mnt-image travis-image rel-image hexo-image lic-image

Live Preview

More NexT examples here.

Installation

1. Change dir to hexo root directory. There must be node_modules, source, themes and other directories:

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

2. Get theme from GitHub. There are several variants to do it:

Download latest release version.

At most cases stable. Recommended for most users.

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.

You must define version. Replace v5.1.2 with any version from tags list.

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

Download latest master branch.

May be unstable, but includes latest features. Recommended for developers.

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

Clone command will give you the whole repository. And in any time you can switch to any tagged release.
Get tags list:

$ cd themes/next
$ git tag -l
…
v5.0.0
v5.0.1
v5.1.0
v5.1.1
v5.1.2

For example, you want to switch on v5.1.0 tagged release version. Input the following command:

$ 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

And if you want to switch back on master branch, input this command:

$ git checkout master

3. Set theme in main hexo root config _config.yml file:

theme: next

Bugs

For those who also encounter Error: Cannot find module 'hexo-util' issue, please check your NPM version.

Update

$ cd themes/next
$ git pull

Bugs

Commit your changes or stash them before you can merge

You must Commit, Stash or Discard local changes. See here how to do it.

Theme configurations using Hexo data files (#328)

Currently, it is not smooth to update NexT theme from pulling or downloading new releases. It is quite often running into conflict status when updating NexT theme via git pull, or need to merge configurations manually when upgrading to new releases.

At present, NexT encourages users to store some options in site's _config.yml and other options in theme's _config.yml. This approach is applicable, but has some drawbacks:

  1. Configurations are splited into two pieces
  2. Users maybe confuse which place should be for options

In order to resolve this issue, NexT will take advantage of Hexo Data files. Because Data files is introduced in Hexo 3, so you need upgrade Hexo to 3.0 (or above) to use this feature.

If you prefer Hexo 2.x, you can still use the old approach for configurations. NexT is still compatible with Hexo 2.x.

Benefits

With this feature, now you can put all your configurations into one place (source/_data/next.yml), you don't need to touch next/_config.yml. If there are any new options in new releases, you just need to copy those options from next/_config.yml, paste into _data/next.yml and set their values to whatever you want.

How to use this feature

  1. Please ensure you are using Hexo 3 (or above)
  2. Create an file named next.yml in site's source/_data directory (create _data directory if it did not exist)
  3. Copy NexT theme options both in site's _config.yml and theme's _config.yml into next.yml.
  4. Use --config source/_data/next.yml parameter to start server, generate or deploy.
    For example: hexo clean --config source/_data/next.yml && hexo g --config source/_data/next.yml.

Features

Multiple languages support, including:

:cn: Simplified Chinese & Traditional Chinese.
:us: English
:ru: Russian
:fr: French
:de: German
:jp: Japanese
:indonesia: Indonesian
:portugal: Portuguese (Brazil)
:kr: Korean
:it: Italian
:netherlands: Dutch
:vietnam: Vietnamese

Default language is English.

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
# language: vi

Set language field as following in site _config.yml to change to Chinese.

language: zh-Hans

Comment support.

NexT has native support for DuoShuo and Disqus comment systems.

Add the following snippets to your _config.yml:

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

OR

disqus_shortname: your-disqus-shortname

Tags page.

Add a tags page contains all tags in your site.

Categories page.

Add a categories page contains all categories in your site.

Social Media

NexT can automatically add links to your Social Media accounts:

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

Show a feed link.

Set rss field in theme's _config.yml, as the following value:

  1. rss: false will totally disable feed link.

  2. rss: use sites' feed link. This is the default option.

    Follow the installation instruction in the plugin's README. After the configuration is done for this plugin, the feed link is ready too.

  3. rss: http://your-feed-url set specific feed link.

Up to 5 code highlight themes built-in.

NexT uses Tomorrow Theme with 5 themes for you to choose from. Next use normal by default. Have a preview about normal and night:

Tomorrow Normal Preview Tomorrow Night Preview

Head over to Tomorrow Theme for more details.

Configuration

NexT comes with few configurations.


# 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-image

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

Contribution is welcome, feel free to open an issue and fork. Waiting for your pull request.

hexo-theme-next (iissnan/hexo-theme-next)

Searching Database…

这是什么东西?NexT 是 Hexo 的一款高品质、优雅的主题。Hexo 是一个静态网站生成器,NexT 是最受欢迎的 Hexo 主题之一,在 GitHub 上获得了超过 15000 颗星。
NexT 是一个完整的博客引擎,还是只是套在 Hexo 上面的一层外观设计?只是外观设计这一层:把它放进现有 Hexo 站点的 themes 文件夹,然后在站点的 _config.yml 里加一行 theme: next 启用它即可。网站本身仍由 Hexo 来生成。
怎么把它安装到我的 Hexo 站点上?在 Hexo 站点根目录下,从 GitHub 获取主题并放入 themes/next——可以用最新正式版(稳定,推荐大多数用户使用)、某个指定的 tag 版本,或用 master 分支获取最新功能——然后在 _config.yml 中设置 theme: next。
我需要哪个版本的 Hexo?还有其他前置条件吗?Hexo 2.x 仍然可以用,但推荐的数据文件配置方式需要 Hexo 3.0 或更高版本。有一个已知的坑:某些 NPM 版本会报 'Cannot find module hexo-util' 错误——请检查你的 NPM 版本并重新安装 node_modules。
这个版本的主题还在维护吗?不在了——这个仓库已停止维护。项目以社区维护的 NexT 版本继续发展,新用户应该改用那个版本。
它实际长什么样——有没有不同的外观风格可选?内置四种 scheme:Muse、Mist、Pisces 和 Gemini,每种在 README 里都有在线演示站点链接,你可以在安装前先挑选喜欢的样式。
读者能在我的文章下面留言评论吗?可以——NexT 原生支持 DuoShuo 和 Disqus 评论系统,只需在 _config.yml 里加一段配置就能启用其中之一。
主题一更新就和我的修改冲突——NexT 是怎么处理配置的?把你的自定义配置放到数据文件里:在站点的 source/_data 目录下创建 next.yml(需要 Hexo 3+),把想要的选项复制进去,然后用 --config source/_data/next.yml 运行 Hexo。主题自带的配置保持不动,拉取更新时就不用再手动合并了。
它自带哪些界面语言?内置十三种语言:英语(默认)、简体中文和繁体中文、俄语、法语、德语、日语、韩语、意大利语、荷兰语、越南语、印尼语和巴西葡萄牙语——通过站点配置里的 language 字段切换。
Creator
iissnan
Size
13.1 MB
Stars
15.8K
Age
11y
Commits · 90 Days