Start with Hugo
Install Hugo
install from brew
brew install hugo
check version
hugo version
Create new website
new hugo website folder
hugo new site website-hugo
cd website-hugo
download theme (here we use LeaveIT)
git clone https://github.com/liuzc/LeaveIt.git themes/LeaveIt
copy themes/LeaveIt/layouts to current root folder
cp -r themes/LeaveIt/layouts .
copy resources from theme/LeaveIt/exampleSite to current root folder
cp -r themes/LeaveIt/exampleSite/static/ static/
cp -r themes/LeaveIt/exampleSite/content/ content/
cp -r themes/LeaveIt/exampleSite/resources/ resources/
cp -r themes/LeaveIt/exampleSite/config.toml .
run local website
hugo server -D
| EN
-------------------+-----
Pages | 47
Paginator pages | 0
Non-page files | 6
Static files | 2
Processed images | 0
Aliases | 13
Sitemaps | 1
Cleaned | 0
then go to http://localhost:1313/
Create new posts
create under content/posts
hugo new posts/my-first-post.md
Start with Github
Create repo on Github
create one private repo website-hugo and one public repo lucileee5657.github.io
Run command to create the /public folder
hugo
Connect /public to the public repo lucileee5657.github.io on github
cd public
git init
git remote add origin https://github.com/lucileee5657/lucileee5657.github.io.git
git add .
git commit -m "initial commit"
git push -u origin master
Connect local website_hugo to the private repo website_hugo on github
cd ../
git init
git remote add origin https://github.com/lucileee5657/lucileee5657.github.io.git
git add .
git commit -m "initial commit"
git push -u origin master
Note: remote: Support for password authentication was removed on August 13, 2021. Please use a personal access token instead. remote: Please see https://github.blog/2020-12-15-token-authentication-requirements-for-git-operations/ for more information.
Then go to https://lucileee5657.github.io/ to see your website