Quick Start
-
- Open iTerm2
-
control+command+h
to open the tab with hugo profile
-
addblog
to create a new blog post, hugo command will create a new post tesmplate and subl command will help open it.
-
- Note: Blog Title should not contain space and strip out
menu = "main"
in the template.
- Note: Blog Title should not contain space and strip out
-
deployblog
to deploy newest update to github.
Detail
create blog shell script:
echo "Blog Title: "
read Title
cd /Users/DanielGong/HugoSite/testsite
hugo new post/$Title.md
subl /Users/DanielGong/HugoSite/testsite/content/post/$Title.md
eploy blog shell script:
echo "-------Begin-------"
cd /Users/DanielGong/HugoSite/testsite
hugo --theme=gs-hyde --baseUrl="http://danigong.github.io/"
cd public
git add -A
git commit -m "auto_commit"
git push origin master
echo "-------Done-------"
customize command:
Add alias addblog="xxx.sh"
into .bashrc
file. Then source ~/.bashrc