- 追加された行はこの色です。
- 削除された行はこの色です。
#author("2020-06-11T06:14:26+00:00","default:wikiwriter","wikiwriter")
#author("2020-06-12T06:50:19+00:00","default:wikiwriter","wikiwriter")
&tag(Hugo/hugo-icarus-theme);
*目次 [#p070b149]
#contents
*関連ページ [#m595166b]
*参考情報 [#v53d38c2]
-blog用のモダンなテーマ
-[[digitalcraftsman/hugo-icarus-theme: Port of Ruipeng Zhang's Hexo theme Icarus to Hugo.:https://github.com/digitalcraftsman/hugo-icarus-theme]]
-[[Hugo v0.55 で Hugo Icarus テーマ を使う · プログラミング日誌:https://antennal.net/blog/hugo-icarus-theme-1/]]
*修正 [#ab1198cc]
-2020/06/11(木)現在、Hugo v0.55で使用すると警告が発生。
**「Page's .Hugo is deprecated」 [#kd5ce4ea]
-head.htmlの「.Hugo.Generator」を「hugo.Generator」に修正。
**「Page.RSSLink is deprecated」 [#hb9c57ea]
-「.RSSLink」をヘッダでは「.Site.Home.AlternativeOutputFormats.Get "RSS"」に、ヘッダ以外では 「.OutputFormats.Get "RSS"」 に変更する。
-head.html
{{ with .Site.Home.AlternativeOutputFormats.Get "JSON" }}
<link href="{{ .Permalink }}" rel="alternate" type="application/rss+xml" title="{{ $.Site.Title }}" />
<link href="{{ .Permalink }}" rel="feed" type="application/rss+xml" title="{{ $.Site.Title }}" />
{{ end }}
-profile.html
<td><a href="{{ .OutputFormats.Get "RSS" }}" target="_blank" title="RSS"><i class="fa fa-rss"></i></a></td>
**「Page.UniqueID is deprecated」 [#p2d0f57f]
-article_footer.html
<a data-url="{{ .Permalink }}" data-id="{{ .File.UniqueID }}" class="article-share-link">
-これだけだと .File.UniqueID on zero object.がでるので結局以下のようにした。
{{ $currentID := "" }}
{{ with .File }}{{ $currentID = .UniqueID }}{{ end }}
<a data-url="{{ .Permalink }}" data-id="{{ $currentID }}" class="article-share-link">
<i class="fa fa-share"></i>
{{with .Site.Data.l10n.articles.share}}{{.}}{{end}}
</a>
*トラブルシューティング [#pecda116]
**「 render of "page" failed: execute of template failed: template:」エラーが発生 [#e9538372]
-hugo server -Dで起動するといかのようなエラーが発生。
#pre{{
ERROR 2020/06/10 14:08:53 render of "page" failed: execute of template failed: template: _default/single.html:2:7: executing "main" at <partial "single_article" .>: error calling partial: execute of template failed: template: partials/single_article.html:7:11: executing "partials/single_article.html" at <partial "article_header" .>: error calling partial: "/Users/sora/work/hugoBasicExample/themes/hugo-icarus-theme/layouts/partials/article_header.html:12:87": execute of template failed: template: partials/article_header.html:12:87: executing "partials/article_header.html" at <.Site.Params.date_format>: invalid value; expected string
}}
-非常に読みづらいけど一番のポイントは最後の「.Site.Params.date_format>: invalid value; expected string」ってところ。
-[[Hugo v0.55 で Hugo Icarus テーマ を使う · プログラミング日誌:https://antennal.net/blog/hugo-icarus-theme-1/]]にあるように、exampleSite/config.tomlの内容をconfig.tomlにマージしないといけない(上記の場合、date_formatの設定が無い事が直接の原因)。
**サイドバーの「RECENTS」などの文字が表示されない。 [#t004d6dd]
-data/l10n.tomlを作成する。
-exampleSiteの下にサンプルが存在する。