hexo n "我的博客" == hexo new "我的博客" #新建文章
hexo p == hexo publish
hexo g == hexo generate#生成
hexo s == hexo server #啟動服務(wù)預(yù)覽
hexo d == hexo deploy#部署
服務(wù)器
hexo server #Hexo 會監(jiān)視文件變動并自動更新,您無須重啟服務(wù)器剥汤。
hexo server -s #靜態(tài)模式
hexo server -p 5000 #更改端口
hexo server -i 192.168.1.1 #自定義 IP
hexo clean #清除緩存 網(wǎng)頁正常情況下可以忽略此條命令
hexo g #生成靜態(tài)網(wǎng)頁
hexo d #開始部署
hexo new "postName" #新建文章
hexo new page "pageName" #新建頁面
hexo generate #生成靜態(tài)頁面至public目錄
hexo server #開啟預(yù)覽訪問端口(默認(rèn)端口4000颠放,'ctrl + c'關(guān)閉server)
hexo deploy #將.deploy目錄部署到GitHub
hexo new [layout] <title>
hexo new photo "My Gallery"
hexo new "Hello World" --lang tw
變量
描述
layout
布局
title
標(biāo)題
date
文件建立日期
title: 使用Hexo搭建個人博客
layout: post
date: 2017-09-10 19:07:43
comments: true
categories: Blog
tags: [Hexo]
keywords: Hexo, Blog
description: 給Hexo點(diǎn)贊。
模版(Scaffold)
變量
描述
layout
布局
title
標(biāo)題
date
文件建立日期
設(shè)置文章摘要
以上是文章摘要 <!--more--> 以下是余下全文
寫作
hexo new page <title>
hexo new post <title>
變量
描述
:title
標(biāo)題
:year
建立的年份(4 位數(shù))
:month
建立的月份(2 位數(shù))
:i_month
建立的月份(去掉開頭的零)
:day
建立的日期(2 位數(shù))
:i_day
建立的日期(去掉開頭的零)
推送到服務(wù)器上
hexo n #寫文章
hexo g #生成
hexo d #部署 #可與hexo g合并為 hexo d -g