https://qiita.com/nyu___nS/items/3fca57ce133be69835ba https://hexo.io/docs/front-matter.html
$ npm install
$ npm run build
$ npx hexo server
git clone --depth 1 https://github.com/hexojs/hexo-theme-light themes/light
npx hexo new [layout] <title>
npx hexo new draft example_draft_tilte
npx hexo new post example_post_title
_config.yml を編集する。
new_post_name: :year/:month/:day/:title.md
参考:https://cloudpack.media/6499
Layout | Path |
---|---|
post | source/_posts |
page | source |
draft | source/_drafts |
git worktree add public gh-pages
npx hexo generate
cd public
git add -A
git commit -m "Publishing to gh-pages"
cd ../
git push origin gh-pages
↓ gh-pages 更新一発コマンド
# Linux
npx hexo generate && cd public && git add -A && git commit -m "Publishing to gh-pages" && cd ../ && git push origin gh-pages
# Windows
npx hexo generate ; cd public ; git add -A ; git commit -m "Publishing to gh-pages" ; cd ../ ; git push origin gh-pages
参考:Hugoで1からテーマを作ってGitHub Pagesにデプロイする
git checkout --orphan gh-pages
npm run clean
git worktree prune
git worktree add public gh-pages
npm run build
cd public/
git add -A
git commit -m "comment"
cd ../
git push origin gh-pages