😍
failed to resolve output format "headers" from site config の対処
wowchemy をクローンしたリポジトリでhugo serverしたときに、以下のエラーが出た場合
Error: from config: failed to resolve output format "headers" from site config
config/_default/config.yamlを開き、outputsの項目を[RSS, JSON, WebAppManifest]に(一時的に)書き換える
outputs:
home: [RSS, JSON, WebAppManifest]
その後、hugo コマンドから go modules を更新する
$ hugo mod clean
$ hugo mod get -u ./...
$ hugo mod tidy
更新が完了したら、config/_default/config.yamlで書き換えていた項目をもとに戻す
outputs:
home: [HTML, RSS, JSON, WebAppManifest, headers, redirects]
これでhugo serverが動くようになった
つまりポイント
config の outputs は書き換える必要がある。書き換えていないとエラーが出続ける。
$ hugo mod clean
Error: from config: failed to resolve output format "headers" from site config
Discussion