Hello World
Frankenadrixias'Homepage
欢迎来到 Hexo!这是你的第一篇文章。查看文档以了解更多信息。如果你在使用 Hexo 时遇到任何问题,你可以在故障排除 中找到答案,也可以在 GitHub 上问我。
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.
Quick Start
安装 nodejs,然后通过 npm 安装 hexo 1
npm install -g hexo-cli
安装公式渲染器,然后再安装
pandoc 1
2npm un hexo-renderer-marked
npm i hexo-renderer-pandoc
安装图片渲染器 1
2npm i hexo-renderer-marked --save
npm i hexo-asset-img --save
启用下列设置,资源图片将会被自动解析为其对应文章的路径。
1
2
3
4
5_config.yml
post_asset_folder: true
marked:
prependRoot: true
postAsset: true
1 | 例如:image.jpg 位置为 /2022/01/02/blog-test/image.jpg, |
创建公钥,安装 git 部署插件,部署到 github 服务器 1
2
3ssh-keygen -t rsa -C {key_name}
npm install hexo-deployer-git --save
hexo clean && hexo g && hexo deploy
具体细节
新建博文 Create a new post
More info: Writing
1
$ hexo new "My New Post"
运行本地服务器 Run server
More info: Server
1
$ hexo server
生成静态页面 Generate static files
More info: Generating
1
$ hexo generate
部署到远程服务器 Deploy to remote sites
More info: Deployment
1
$ hexo deploy