Skip to content

rmoff/rmoff-blog

Repository files navigation

rmoff’s Blog (source)

Build and Deploy to GitHub Pages
Check External Links

This is the source for https://rmoff.net, built using Hugo and hosted via GitHub pages.

Running locally

docker run --rm -it \
  -v $(pwd):/src \
  -p 1313:1313 \
  klakegg/hugo:0.105.0-asciidoctor-onbuild \
  server --buildFuture --buildDrafts

Creating a new post

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.

Theme

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.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •