Hello World
Welcome to Hexo! This is your very first post. Check documentation for more info. If you get any problems when using Hexo, you can find the answer in troubleshooting or you can ask me on GitHub.
基本操作
创建博客
$ hexo new "My New Post" |
More info: Writing
预览
$ hexo server --debug |
More info: Server
发布
$ hexo g -d |
More info: Generating Deployment
支持图片
设置 Typora 将图片复制到指定目录
修改 hexo 全局配置文件
_config.yml
中的配置:post_asset_folder: true
安装
hexo-asset-image
插件修复博客图片路径问题。npm install hexo-image-link --save
支持公式
安装 hexo-renderer-kramed
npm uninstall hexo-renderer-marked --save |
打开next 主题配置开关
mathjax: |
文章开头声明支持公式
mathjax: true |
其他配置
关闭代码的行号
highlight: |
关闭 TOC 的序号
主题配置number
设为false。
toc: |
问题
找不到 git 插件
ERROR Deployer not found: git |
解决方案:安装 hexo-deployer-git
blog git:(master) ✗ npm install hexo-deployer-git --save |
git 鉴权失败
fatal: 'https://github.com/WhiteTeeth/whiteteeth.github.io.git/' 鉴权失败 |
解决方案:修改 _config.yml
中的 deploy repo 路径,改用 ssh 方式
deploy: |