After the estimated time entry selection may close one day, I used hexo framework and next theme, originally planned to adopt jekyll found there hexo framework is based on node.js, the former is required Ruby language, I found no basis for it, but also more interested in the view from this.
hexo comes with default theme is landscape, then spent a time on the topic, had finally selected yilia, because Baidu out a lot of this tutorial, then read several pv uv vv in this article how to get tangled, and we used more He said the comment was found not integrated.
Then search for the related programs, suddenly discover next, there is also the official website, better integrated, so immediately turned to his arms, is to write articles, do not want too much to toss, so the following tutorial begins.
Installation nodejs install git
- node official website Download https://nodejs.org/en/download/
- git official website Download https://git-scm.com/downloads
I note here is carried out under the windows user
Software installation is not in the details described. Generally the default installation, replaced most installation path must choose which to install npm, checked by default when you install node. When you install git, are generally installed by default, git is integrated by msys
Cmd to open the address bar enter cmd in the search box, enter cmd to open a directory or you can also prompt more intelligent with the windows poweshell
node version verification
|
|
npm version
|
|
git version
|
|
If you have tips above indicate a successful installation, If not, generally environmental variables, specific issues, specific solutions.
Installation and hexo next topic
- hexo official website https://hexo.io/zh-cn/
- next topic official website tutorial http://theme-next.iissnan.com/getting-started.html#select-scheme
1. Install hexo
12 $ npm install hexo-cli -gNpm install HEXO-util $ -g # installation hexo-util next topic need to use2. Verify hexo
123456789101112 $ Hexo- -vhexo-cli: 1.0.2os: Windows_NT 10.0.14393 win32 x64http_parser: 2.7.0node: 6.10.0v8: 5.1.281.93uv: 1.9.1zlib: 1.2.8ares: 1.10.1-DEVicu: 58.2modules: 48openssl: 1.0.2k3. Create blog
123456 $ Cd ~ / myblog # ~ represents the current directory you can create your favorite directory, then cmd to navigate to the directory.$ Hexo init # initialization, clears the entire directory with caution$ Npm install to install the required dependencies$ hexo server # 可以简化为hexo s 有下面信息这表示启动okINFO Start processingINFO Hexo is running at http://localhost:4000/. Press Ctrl+C to stop.
然后地址栏输入http://localhost:4000/ 即可看到一个初始化页面
4.主题的应用
1 $ git clone https://github.com/iissnan/hexo-theme-next themes/next
一个是根目录下的hexo的_config.yml文件,一个是根目录/themes/next 主题文件的_config.yml文件,请注意区分
这种以yml结尾的配置文件,是yaml格式的配置文件格式,相应的有toml,json,xml,ini等
修改hexo的_config.yml文件
- site部分下 language: zh-Hans 其他选项请自己更改
- Extensions部分下 theme: next 表示使用themes下的next主题
修改next主题文件的_config.yml文件
- Schemes部分请设置为scheme: Pisces 默认为scheme: Muse 不太好看,第三个好看
- 其余教程请移步 http://theme-next.iissnan.com/getting-started.html
然后 Ctrl+C 关闭先前的,然后重新运行 hexo s
然后刷新页面 就能看见新主题页面这里我的
原文:大专栏 第一篇博客,hexo的安装