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

  1. create a config file named _config.inside.yml
  2. Copy theme config yml

for more detail, please visit: https://blog.oniuo.com/theme-inside

setup for github action

  1. create a new repo named ‘username.github.io’ where username is your account name of github

  2. install dependency

    $ npm i hexo-deployer-git
  3. modify the section deploy inside _config.yml, be sure to modify the username
    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