iPhoneで Grafanaの グラフを 参照できる アプリ Grafanizer 作ってます。 詳しくは こちらへ

Hugo 0.25 リリースノート 適当和訳

Sep 13, 2017  
#hugo #doc
原文 https://github.com/gohugoio/hugo/releases/tag/v0.25
その他のリリースノート和訳

Hugo v0.25 リリース

Hugo 0.25 は Kinder Surprise です!作業しているページを自動的に開きます。ページクエリで AND と OR の完全なサポートを追加します。言語ごとにテンプレートを作成できるようになりました。

Hugo 0.25 is the Kinder Surprise: It automatically opens the page you're working on in the browser, it adds full AND and OR support in page queries, and you can now have templates per language.

Hugoは hugo server --navigateToChanged で起動すると、保存時に変更した箇所まで自動的に移動します。これはサイト全体の編集に非常に役立ちます。このバージョンの他にもう一つの非常に便利な機能は AND(intersect) と OR(union) の合成フィルターサポートです。

If you start with hugo server --navigateToChanged, Hugo will navigate to the relevant page on save (see animated GIF). This is extremely useful for site-wide edits. Another very useful feature in this version is the added support for AND (intersect) and OR (union) filters when combined with where.

Example:

{{ $pages := where .Site.RegularPages "Type" "not in" (slice "page" "about") }}
{{ $pages := $pages | union (where .Site.RegularPages "Params.pinned" true) }}
{{ $pages := $pages | intersect (where .Site.RegularPages "Params.images" "!=" nil) }}

上記は、pate でも about でもないタイプのページと Params.pinned されていないページから Params.images が設定されいるページを除外して取り出します。

The above fetches regular pages not of page or about type unless they are pinned. And finally, we exclude all pages with no images set in Page params.

強化

テンプレート

  • Add Pages support to intersect (AND) and union(ÒR). This makes the where template func even more powerful. ccdd08d5 @bep #3174
  • math.Log 関数の追加。これはタグクラウドを作るのに非常に有用です。
  • Add math.Log function. This is very handy for creating tag clouds. 34c56677 @artem-sidorenko
  • Add WebP images support 8431c8d3 @bep #3529
  • Only show post's own keywords in schema.org da72805a @brunoamaral #2635#2646
  • Disqusのテンプレートを微調整 (#3655) eccb0647 @yihui
  • Simplify the Disqus template a little bit (#3655) eccb0647 @yihui
  • Improve the built-in Disqus template (#3639) 2e1e4934 @yihui

以下省略


ブラウザのサポートも目を引くが、ANDとORのサポートが非常に役立ちそう。

ってか、2ヶ月前に書いといて後悔するの忘れてた...