Tag: Hugo/hugo-icarus-theme
関連ページ†
参考情報†
- 2020/06/11(木)現在、Hugo v0.55で使用すると警告が発生。
「Page's .Hugo is deprecated」†
- head.htmlの「.Hugo.Generator」を「hugo.Generator」に修正。
「Page.RSSLink is deprecated」†
- 「.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」†
- 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>
トラブルシューティング†
「 render of "page" failed: execute of template failed: template:」エラーが発生†
サイドバーの「RECENTS」などの文字が表示されない。†
- data/l10n.tomlを作成する。
- exampleSiteの下にサンプルが存在する。
font-awesomeのアイコンフォントがロードできない。†
- font-awesome.min.cssから以下のように指定している部分でエラー。クロスオリジンのエラーかブラウザのバグ?
url('../fonts/fontawesome-webfont.eot?v=4.6.3')
- とりあえずstatic/.htaccessを作成して回避。
# Allow access from all domains for webfonts.
# Alternatively you could only whitelist your
# subdomains like "subdomain.example.com".
<IfModule mod_headers.c>
<FilesMatch "\.(ttf|ttc|otf|eot|woff|font.css|css)$">
Header set Access-Control-Allow-Origin "*"
</FilesMatch>
</IfModule>