- You can edit files directly on GitHub -- no cloning or other installation necessary! Note that images won't render in preview mode when you're editing on GitHub, this is normal, the file path is purposely set up under
static/images/for Hugo, the site's compilation tool. When you're done editing content, save your commit(s) and the website will be updated within a couple minutes. Click on this build badge to see the site's automated deployment process with Travis CI.
- OR, if you want to edit locally (benefit: see the final website rendered on your browser in real time before saving commits and publishing), install Hugo on your machine. Mac OS:
brew install hugo. Windows:
choco install hugo -confirm. Linux:
snap install hugo. Then, install
make(generally available on macOS with XCode installed, and on Linux by default).
- Refer to general Hugo tips/documentation as needed to orient yourself to the tool. You have plenty of fancy static compiler customizations/templating/site variables available to make the site even more awesome.
- To see the website as you're editing locally (automatically rebuilds when you
change project files), run
make develop. Navigate to
localhost:1313in a browser to see what the site looks like rendered as you're editing it.
Where to edit the site (directory/file structure)
- For the homepage, edit
/layouts/_default/index.html(in plain HTML). For all other content, edit the files in
/content/posts/*.md(in Markdown). You'll see the server rebuild the site whenever you save changes to a file. The
config.tomlfile has special parameters used throughout the site that you can modify.
- For quick CSS modifications, edit
static/css/style.css. It's best to do this locally since you can see the changes before pushing to GitHub.
- When you're ready to push your changes, either commit directly on GitHub, or locally stop the server and run
make publish(or, just push the commits on your own). This will commit the source code to https://github.com/stopipv/web, and trigger an automatic build/deploy cycle on Travis CI. Check the site after a few minutes for the update (you can view the build progress live by clicking the green badge at the top of this README).
- To make a new page, run
hugo new post/newPageName.md. Be sure to set
draft: falsein the file before publishing!