pre-requirement
- node.js >= 8.10, recommand >=10.0
- npm
- git
for more detail, please visit: https://hexo.io/zh-tw/docs/
setup
$ npm install -g hexo-cli
install theme - Inside
$ npm i hexo-theme-inside
for more detail, please visit: https://github.com/ikeq/hexo-theme-inside
quick qtart
modify the global _config.yml
theme: inside
theme configuration
- create a config file named
_config.inside.yml - Copy theme config yml
for more detail, please visit: https://blog.oniuo.com/theme-inside
setup for github action
-
create a new repo named ‘
username.github.io’ where username is your account name of github -
install dependency
$ npm i hexo-deployer-git -
modify the section
deployinside_config.yml, be sure to modify theusername
for more detail, please visit: https://hexo.io/zh-tw/docs/github-pages.html#專案頁面
# Deployment
## Docs: https://hexo.io/docs/one-command-deployment
deploy:
type: 'git'
repo: 'https://github.com/username/username.github.io'
branch: 'main'
usage
create a new post
$ hexo new "My New Post"
More info: Writing
run server
$ hexo server
$ hexo s
More info: Server
generate static files
$ hexo generate
$ hexo g
More info: Generating
clean the workspace
$ hexo clean
$ hexo cl
deploy to remote sites, ex. github
$ hexo deploy
$ hexo d
More info: Deployment
generate & deploy
$ hedo g -d
command one-liner
## for local preview
$ hexo cl && hexo g && hexo s
## for git push to github
$ hexo cl && hexo g && hexo d