docker run --rm -it \
-v $(pwd):/src \
-p 1313:1313 \
klakegg/hugo:0.105.0-asciidoctor-onbuild \
server --buildFuture --buildDrafts
git checkout -b my_new_post
docker run --rm -it \
-v $(pwd):/src \
klakegg/hugo:0.105.0-asciidoctor-onbuild \
new content/post/my_new_post.adoc
Run this locally to check the state of the local copy.
mkdir /tmp/hugo_public && \
docker run --rm -it -v $(pwd):/src -v /tmp/hugo_public:/tmp/public klakegg/hugo:0.105.0-asciidoctor-onbuild --buildFuture --buildDrafts -d /tmp/public && \
docker run -v /tmp/hugo_public:/check ghcr.io/untitaker/hyperlink:0.1.26 /check &&
rm -rf /tmp/hugo_public
Link checking is also configuring as an action for any PR.
The theme used (story) is no longer maintained, and needed fixing to work with versions > 0.86. When built, it threw these errors:
hugo v0.96.0+extended darwin/amd64 BuildDate=unknown
ERROR 2022/04/01 11:15:15 render of "page" failed: "/Users/rmoff/git/rmoff-blog/themes/story/layouts/_default/baseof.html:12:10": execute of template failed: template: _default/single.html:12:10: executing "_default/single.html" at <.Hugo.Generator>: can't evaluate field Hugo in type *hugolib.pageState
ERROR 2022/04/01 11:15:15 render of "page" failed: "/Users/rmoff/git/rmoff-blog/themes/story/layouts/_default/baseof.html:12:10": execute of template failed: template: _default/single.html:12:10: executing "_default/single.html" at <.Hugo.Generator>: can't evaluate field Hugo in type *hugolib.pageState
ERROR 2022/04/01 11:15:15 render of "page" failed: "/Users/rmoff/git/rmoff-blog/themes/story/layouts/_default/baseof.html:12:10": execute of template failed: template: _default/single.html:12:10: executing "_default/single.html" at <.Hugo.Generator>: can't evaluate field Hugo in type *hugolib.pageState
ERROR 2022/04/01 11:15:15 render of "page" failed: "/Users/rmoff/git/rmoff-blog/themes/story/layouts/_default/baseof.html:12:10": execute of template failed: template: _default/single.html:12:10: executing "_default/single.html" at <.Hugo.Generator>: can't evaluate field Hugo in type *hugolib.pageState
Error: Error building site: failed to render pages: render of "page" failed: "/Users/rmoff/git/rmoff-blog/themes/story/layouts/_default/baseof.html:12:10": execute of template failed: template: _default/single.html:12:10: executing "_default/single.html" at <.Hugo.Generator>: can't evaluate field Hugo in type *hugolib.pageState
Built in 1800 ms
I fixed it by removing the .HugoGenerator
code and it works just fine now.