You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
chore: document running the site via Docker (#444)
Add a README section describing how to serve the site with the `hugomods/hugo`
image.
Closes#443
Signed-off-by: Gabriele Bartolini <gabriele.bartolini@enterprisedb.com>
Signed-off-by: Marco Nenciarini <marco.nenciarini@enterprisedb.com>
Co-authored-by: Marco Nenciarini <marco.nenciarini@enterprisedb.com>
Copy file name to clipboardExpand all lines: README.md
+35Lines changed: 35 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -41,6 +41,41 @@ npm install && npm run prod
41
41
42
42
This will compile the css file into `assets/css/output.css`. This file is ignored by git, so it is generated each build. If you make changes to `assets/css/main.css` you will need to restart the hugo server (e.g. stop it and run `npm run prod`) to pick up the changes. This is a temporary fix while Hugo & Tailwind JIT learn how to play nicely together.
43
43
44
+
### Using Docker
45
+
46
+
If you'd rather not install Hugo and Node.js locally, you can serve the
47
+
site with the
48
+
[`hugomods/hugo`](https://hub.docker.com/r/hugomods/hugo) image (the
49
+
`-node-` variant is required because this site builds CSS through
Node permission policy so `browserslist` (loaded by `postcss-preset-env`)
74
+
can walk parent directories looking for its config.
75
+
- To serve without drafts, replace `npm run dev` with `npm run prod`.
76
+
- The image tag pins Hugo `0.161.1`; bump it as the project's Hugo version
77
+
advances.
78
+
44
79
### CSS
45
80
46
81
CSS is partly built by hugo & partly built outside of hugo by `npm run css`, which is called by `npm run dev|prod`. If you start to use a new Tailwind class restarting hugo is required (stop the server and `npm run dev`), if you edit `assets/style.css` it should compile in correctly without restart. This is to mitigate [this issue](https://github.com/gohugoio/hugo/issues/8343).
0 commit comments