Hugo download
Install Hugo
Create a blog folder
hugo new site blog
baseURL = "https://<your-github-account>.github.io/"
hugo new about.md
hugo new post/first.md
cd themes
git clone https://github.com/xxx/xxx.git
hugo server --buildDrafts --watch
themes
deploy to github
git init
git remote add origin git@github.com:<your-github-account>/blog.git
git rm -r public
git submodule add git@github.com:<your-github-account>/<your-github-account>.github.io.git public
git add .
git commit -m "Hugo content update"
git push -u origin master
hugo --buildDrafts
cd public
git add .
git commit -m "Blog update"
git push origin master
set workdir=%~dp0
set current=%date:~0,4%-%date:~5,2%-%date:~8,2% %time:~0,2%:%time:~3,2%:%time:~6,2%
cd %workdir%
git add -A
git commit -m "Hugo content update %current%"
git push -u origin master
hugo --buildDrafts
cd public
git add -A
git commit -m "Blog update %current%"
git push origin master
#!/bin/bash
workdir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
cd $workdir
git add -A
git commit -m "Hugo content update `date`"
hugo --buildDrafts
cd public
git add -A
git commit -m "Blog update `date`"
git push origin master