This is the site source.
- Install Docker
- Clone this repository
- If you are using HTTPS (not SSH), you'll need to update the submodule reference in your clone to the theme directory to HTTPS as well. See this answer.
- Run
git submodule update --init --recursive
to initialize the theme submodule after cloning. - Run
docker-compose up -d
. - Run
docker-compose exec web bash
. - In the bash prompt that appears, run
yarn install
. This only needs to be run when installing new packages. - Run
yarn start
. - Visit http://localhost:5000
- Run
docker build . -t prod-image
. - Run
docker run -dit -p 80:80 -p 443:443 --name prod prod-image
. - Run
docker exec -it prod nginx
.
See other scripts in package.json.
VS Code (this will use the workspace settings defined in .vscode/settings.json) with ESLint, Prettier, and stylelint extensions installed. Linting and formatting will automatically run with a git hook, but these give you faster feedback.
To pull in submodule changes:
$ git submodule update --remote --merge
$ git commit -a -m "submodule updated"
To push changes made in theme submodule (while within themes/featherweight directory):
$ git commit -a -m "updates"
$ git push origin HEAD:<branch-name-in-theme-repo>
Embed Responsively will give you YouTube/Vimeo embed codes that work responsively (see 1up-media.html template partial for example).
Photos are not automatically resized when added through Netlify CMS, so resize/crush them before uploading.
Getting familiar with Go templates is very handy for working with Hugo. Here's a good tutorial.
Pretty printing Hugo variables for debug: https://gist.github.com/kaushalmodi/afb6c3e5098eccc028bddc91cf1eb53a
Find the right syntax for your YAML multiline strings - https://yaml-multiline.info/