Hugo Cheat Sheet
May 17, 2018 1 min read- Content
- Posting
hugo new blog/2018/my-first-post.md
hugo new notes/2020/how-to.md
- Font Awesome
<i class="fas fa-lemon" aria-hidden="true"></i>
- List all files in a directory in 1 column (bash only)
ls -1
- Posting
- Testing
hugo server
http://localhost:1313
Build
- Remove old files
rmdir /S /Q public
- Build site
hugo -b https://www.tehlemon.com
Remove unused theme files
rmdir /S /Q public\fonts del public\images\avatar.png del public\images\[email protected]
Push to production repo
cd public set /p commitmsg="Enter a commit message: " git add --all . git commit -m "%commitmsg%" git push origin master
- Remove old files
Theming
- Adding Pages
- Add to nav.html in
/layouts/partials/
- Add to config.toml
- Add folder to
/content/
- Add to nav.html in
- Adding Pages