Hugo v0.20 リリース
Hugo0.20は長い間求められてきた強力なカスタム出力フォーマットを実装しています。Huboは単なる「RSSフィードを追加した静的HTML」ではありません。カレンダー、電子ブックフォーマット、Google AMP、JSON検索インデックス等にも使えます。 #2828
Hugo 0.20 introduces the powerful and long sought after feature Custom Output Formats; Hugo isn’t just that “static HTML with an added RSS feed” anymore. Say hello to calendars, e-book formats, Google AMP, and JSON search indexes, to name a few ( #2828 ).
Other Highlights
- 多言語用の設定ファイルのフォーマットが
YAML
からTOML
に変更されました。 #3200 @bogem has also contributed TOML as an alternative and much simpler format for language/i18n files (#3200). A feature you will appreciate when you start to work on larger translations.
EmacsのOrg-mode用フォーマットの処理に重要な更新があります。#3126 また基本的な脚注のサポートが追加されました。
Also, there have been some important updates in the Emacs Org-mode handling: @chaseadamsio has fixed the newline-handling ( #3126 ) and @clockoon has added basic footnote support.
ドキュメントの再構築が進行してて、もうすぐ完成します。素晴らしい!
Worth mentioning is also the ongoing work that @rdwatters and @budparr is doing to re-do the gohugo.io site, including a total restructuring and partial rewrite of the documentation. It is getting close to finished, and it looks fantastic!
Notes
- 組み込みテンプレートのRSSが全文の
.Content
から.Summary
に変更されました。これはいくらか影響がある変更ですが、殆どの人がRSSフィードに期待している内容です。もし全文が必要な場合は独自のRSSテンプレートで提供できます。 RSS description in the built-in template is changed from full .Content to .Summary. This is a somewhat breaking change, but is what most people expect from their RSS feeds. If you want full content, please provide your own RSS template.
廃止予定だった
.RRSlink
が削除されました。.RSSLink
を使用してください。The deprecated .RSSlink is now removed. Use .RSSLink.
.RSSUri
も廃止され、将来のバージョンで削除されます。これはOutputFormat定義に置き換えることができます。RSSUri is deprecated and will be removed in a future Hugo version, replace it with an output format definition.
.Site.GetParam
が削除されました。.Site.Param
を使用してください。The deprecated .Site.GetParam is now removed, use .Site.Param.
コマンドパラメーターとして設定された
baseURL
の最後にスラッシュが無い場合でも追加しないようにし、サイトの設定と一貫性のある動きになりました。 #3262Hugo does no longer append missing trailing slash to baseURL set as a command line parameter, making it consistent with how it behaves from site config. #3262
Enhancements
- Hugo0.20はGo1.8.1でビルドできます。
Hugo 0.20 is built with Go 1.8.1.
Add .Site.Params.mainSections that defaults to the section with the most pages. Plan is to get themes to use this instead of the hardcoded blog in where clauses. #3206
ファイルの拡張子を設定できるようになりました。 #320
File extension is now configurable. #320
テンプレート関数の
markdownify
のパフォーマンスが改善されました。 #3292Impove markdownify template function performance. #3292
Add taxonomy terms’ pages to .Data.Pages. #2826
RSSの
description
は.Content
から.Summary
に変更されました。Change RSS description from full .Content to .Summary.
--cleanDestinationDir
に指定された.
は無視する。 #3202Ignore “.” dirs in hugo --cleanDestinationDir #3202
jekyll
からインポートする時、2006-01-02
と2006-1-2
の両書式を許可する。 #2738Allow jekyll import to accept both 2006-01-02 and 2006-1-2 date format #2738
デフォルトの
rssLimit
を制限なしに。 #3145Raise the default rssLimit #3145
セクションリストとシングルテンプレートの検索順を結合。 #3116
Unify section list vs single template lookup order #3116
Go組み込みのテンプレート関数
print
,printf
,println
を使用できるように。 #3139Allow apply to be used with the built-in Go template funcs print, printf and println. #3139
デフォルトで対応している拡張子や設定方法などは OutputFormats で確認出来る。
カスタムアウトプットフォーマットはなかなか便利そう。 RSSやAMPは当然として、.ics
で更新状況を配信したり、 .csv
で事前にデータを吐いておいてCIでゴニョゴニョしたりと遊べそうな機能ですな。