前のページ

サイトの構築に手間取った話

時短のはずが三日かかる失態

雑感

三日三晩かけて、ようやくサイトのひな型ができた。結局人気テーマのStack 以外には移れず。
Github の使い方が分からずに勘でやっていたら、指示通りにすべきところをすっ飛ばしていたり、Hugoの実行ファイルに通常版とextended 版があるのに気付かず詰まったりしていた。

英語の解説は目が滑って良くない。

Hugo のタグ機能

どういうわけか、こういったポストの記事にタグを設定しようとすると、わけのわからないエラーが出てデプロイに失敗する。
解決策が分からないため放置。

1
2
3
4
21:07:37.812	Error: error building site: render: failed to render pages: render of "page" failed: "/opt/buildhome/.cache/hugo_cache/modules/filecache/modules/pkg/mod/github.com/!cai!jimmy/hugo-theme-stack/[email protected]/layouts/_default/baseof.html:4:12": execute of template failed: template: _default/single.html:4:12: executing "_default/single.html" at <partial "head/head.html" .>: error calling partial: "/opt/buildhome/.cache/hugo_cache/modules/filecache/modules/pkg/mod/github.com/!cai!jimmy/hugo-theme-stack/[email protected]/layouts/partials/head/head.html:15:4": execute of template failed: template: partials/head/head.html:15:4: executing "partials/head/head.html" at <partial "head/opengraph/include.html" .>: error calling partial: "/opt/buildhome/.cache/hugo_cache/modules/filecache/modules/pkg/mod/github.com/!cai!jimmy/hugo-theme-stack/[email protected]/layouts/partials/head/opengraph/include.html:1:3": execute of template failed: template: partials/head/opengraph/include.html:1:3: executing "partials/head/opengraph/include.html" at <partial "head/opengraph/provider/base" .>: error calling partial: "/opt/buildhome/.cache/hugo_cache/modules/filecache/modules/pkg/mod/github.com/!cai!jimmy/hugo-theme-stack/[email protected]/layouts/partials/head/opengraph/provider/base.html:22:21": execute of template failed: template: partials/head/opengraph/provider/base.html:22:21: executing "partials/head/opengraph/provider/base.html" at <.Params.tags>: range can't iterate over Blog
21:07:37.818	Failed: Error while executing user command. Exited with error code: 1
21:07:37.828	Failed: build command exited with code: 1
21:07:38.858	Failed: error occurred while running build command

という具合。

Cloudflare Pages

プレビュー側で依然としてデプロイに失敗するので、もうあきらめて、自動デプロイをOFFにした。
解決策を知っている方、教えてください……m(__)m

Licensed under CC BY-NC-SA 4.0
Hugo で構築されています。
テーマ StackJimmy によって設計されています。