hexo n "我的博客" == hexo new "我的博客"#新建文章 hexo p == hexo publish hexo g == hexo generate#生成 hexo s == hexo server #启动服务预览 hexo d == hexo deploy#部署
服务器
1 2 3 4 5 6 7
hexo server #Hexo 会监视文件变动并自动更新,您无须重启服务器。 hexo server -s #静态模式 hexo server -p 5000 #更改端口 hexo server -i 192.168.1.1 #自定义 IP hexo clean #清除缓存 网页正常情况下可以忽略此条命令 hexo g #生成静态网页 hexo d #开始部署
hexo new "postName"#新建文章 hexo new page "pageName"#新建页面 hexo generate #生成静态页面至public目录 hexo server #开启预览访问端口(默认端口4000,'ctrl + c'关闭server) hexo deploy #将.deploy目录部署到GitHub
hexo new [layout] <title> hexo new photo "My Gallery" hexo new "Hello World" --lang tw
变量
描述
layout
布局
title
标题
date
建立
1 2 3 4 5 6 7 8 9 10
title: 使用Hexo搭建个人博客 layout: post date: 2014-03-03 19:07:43 comments: true categories: Blog tags: [Hexo] keywords: Hexo, Blog description: 暮色匆匆去,音消尘也无 模版(Scaffold) hexo new photo "My Gallery"
设置文章摘要
以上是文章摘要 以下是余下全文
写作
1 2
hexo new page <title> hexo new post <title>
变量
描述
:title
标题
:year
建立的年份(4 位数)
:month
建立的月份(2 位数)
:i_month
建立的月份(去掉开头的零)
:day
建立的日期(2 位数)
:i_day
建立的日期(去掉开头的零)
推送到服务器上
1 2 3
hexo n #写文章 hexo g #生成 hexo d #部署 #可与hexo g合并为 hexo d -g
xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance
安装备份插件 参考网址: https://github.com/coneycode/hexo-git-backup Update if you install with --save, you must remove firstly when you update it. $ npm remove hexo-git-backup $ npm install hexo-git-backup --save -------------------------------------- 安装主题 参考网址: https://github.com/chaooo/hexo-theme-BlueLake git clone https://github.com/chaooo/hexo-theme-BlueLake.git themes/BlueLake ------------------------------------- 生成、部署 hexo g hexo d hexo b hexo server -p 5000 【本地查看】或者 hexo s -p 5000