hexo & Next 使用教程
2018-01-08 17:49
423 查看
1、初始化博客
hexo init myBlog cd myBlog npm install # 安装依赖
目录结构
. ├── _config.yml ├── package.json ├── scaffolds ├── source | ├── _drafts | └── _posts └── themes
2、新建博客
hexo new blog_title # hexo new 博客标题
生成文章格式
--- title: blog_title # 博客标题 date: 2018-01-01 # 博客生成的时间 --- # 写博客内容 something of blog
3、查看博客
http://localhost:4000
链接:hexo中文网站
4、使用Next.Mist博客主题
# 进入博客目录 myBlog git clone https://github.com/theme-next/hexo-theme-next themes/next cd themes/next git pull # 更新主题
5、配置next主题
在站点的 source/_data 目录下新建 next.yml 文件(_data目录可能需要新建)迁移站点配置文件和主题配置文件中的配置到 next.yml 中
使用 –config source/_data/next.yml 参数启动服务器, 生成或者部署。
例如: hexo clean –config source/_data/next.yml && hexo g –config source/_data/next.yml
在站点配置文件_config.yml中可以将语言切换成中文
language: zh-Hans
创建一个名为 tags 页面
hexo new page “tags”
编辑标签页, 设置页面类型为tags
title: All tags
date: 2014-12-22 12:39:04
type: “tags”
添加 tags 到主题配置文件 _config.yml 里。分类(categories)同理
menu:
home: /
archives: /archives
tags: /tags
详情可以参考Next官方教程
6、本地4000端口调试
hexo server --config source/_data/next.yml
7、发布并部署博客
hexo generate --deploy --config source/_data/next.yml
相关文章推荐
- 使用GPRS 让你的iPhone能上网能通话教程
- 新手必看 WinSCP软件详细使用教程
- 新手终极宝典 iTunes使用教程精华大全
- 新版iPhone PC Suite完全详细使用教程
- Touchpad Windows版详细使用教程
- ZiPhone GUI一键软破工具详细使用教程
- [软件教程]专业屏幕捕捉软件 HyperSnap-DX 使用教程
- 使用On Error Resume Next语句,On Error Goto 0语句,Err对象来处理"运行时错误"
- Unix&Linux大学教程: 12 使用shell:变量和选项
- [转]轻松掌握Ajax.net系列教程十二:使用TabContainer&TabPanel
- Sensor Simulator 使用教程 && 软件编译后自动关闭问题
- TweenGroup 教程 & 使用
- Android中级教程之(三)----->Intent的使用
- 比分先知道 iScores球赛信息详细使用教程
- iPhone必用 installer软件详细使用教程
- Unix&Linux大学教程:13 使用shell:命令和定制
- Total Video视频转换软件使用教程
- Struts框架中 's Tiles使用入门教程
- Dev-C++ 安装&使用教程
- iPhone LumaQQ聊天软件详细使用教程