hexo 使用速查手册
hexo 使用速查手册
markdown 行末两个空格插入空行
系统篇
源文件
https://hexo.io/docs/setup#source
Front Matter
layout: false don’t process my post
title:
date:
updated:
comments:
tags:
categories:
permalink:
keywords:
toc_max_depth
reward
mathjax
资源文件夹
asset folder https://hexo.io/docs/asset-folders
自动化部署
deployment: npm install hexo-deployer-git —save
写作篇
创建新页面
new command
scaffold
read more
插入公式
math
Emoji
emoji
标签
官方标签
https://hexo.io/docs/tag-plugins
block quote https://hexo.io/docs/tag-plugins#Block-Quote
code block https://hexo.io/docs/tag-plugins#Code-Block
iframe https://hexo.io/docs/tag-plugins#iframe
image https://hexo.io/docs/tag-plugins#Image
link https://hexo.io/docs/tag-plugins#Link
include code https://hexo.io/docs/tag-plugins#Include-Code
include posts https://hexo.io/docs/tag-plugins#Include-Posts
include assets https://hexo.io/docs/tag-plugins#Include-Assets
raw https://hexo.io/docs/tag-plugins#Raw
post excerpt https://hexo.io/docs/tag-plugins#Post-Excerpt
主题标签
next
https://theme-next.org/docs/tag-plugins/
centered quote https://theme-next.org/docs/tag-plugins/#Centered-Quote
include raw https://theme-next.org/docs/tag-plugins/#Include-Raw
pdf https://github.com/theme-next/theme-next-pdf
tabs https://theme-next.org/docs/tag-plugins/tabs
note https://theme-next.org/docs/tag-plugins/note
label https://theme-next.org/docs/tag-plugins/label
button https://theme-next.org/docs/tag-plugins/button
mermaid https://theme-next.org/docs/tag-plugins/mermaid
group picture https://theme-next.org/docs/tag-plugins/group-pictures
github-emoji https://github.com/theme-next/hexo-filter-emoji
附录1 hexo 命令行参数
Usage: hexo \
Commands:
clean Remove generated files and cache.deploy Deploy your website.
Options:
—setup Setup without deployment
-g, —generate Generate before deploymentgenerate Generate static files.
Options:
-b, —bail Raise an error if any unhandled exception is thrown during generation
-d, —deploy Deploy after generated
-f, —force Force regenerate
-w, —watch Watch file changesnew Create a new post.
Arguments:
layout Post layout. Use post, page, draft or whatever you want.
title Post title. Wrap it with quotations to escape.Options: -p, --path Post path. Customize the path of the post. -r, --replace Replace the current post if existed. -s, --slug Post slug. Customize the URL of the post.
init Create a new Hexo folder.
Arguments:
destination Folder path. Initialize in current folder if not specifiedOptions: --no-clone Copy files instead of cloning from GitHub --no-install Skip npm install
server Start the server.
Options:
-i, —ip Override the default server IP. Bind to all IP address by default.
-l, —log [format] Enable logger. Override log format.
-o, —open Immediately open the server url in your default web browser.
-p, —port Override the default port.
-s, —static Only serve static files.BELOW ARE NOW VERY USEFUL
config Get or set configurations.
Arguments:
name Setting name. Leave it blank if you want to show all configurations.
value New value of a setting. Leave it blank if you just want to show a single configuration.help Get help on a command.
list List the information of the site
Arguments:
type Available types: page, post, route, tag, categorymigrate Migrate your site from other system to Hexo.
Arguments:
type Migrator type.publish Moves a draft post from _drafts to _posts folder.
Arguments:
filename Draft filename. “hello-world” for example.
layout Post layout. Use post, page, draft or whatever you want.render Render files with renderer plugins.
Options:
—engine Specify render engine
—output Output destination. Result will be printed in the terminal if the output destination is not set.
—pretty Prettify JSON outputversion Display version information.
附录2 TroubleShooting
- tag 未关闭
1 | FATAL Something's wrong. Maybe you can find the solution here: https://hexo.io/docs/troubleshooting.html |