+++ date = "2019-10-21" tags = ["hugo"] title = "hugoでちょっとハマったところ" slug = "hugo" +++ content/post以下の記事一覧を表示したいけど、`content/post/_index.html`のリンクは表示したくない`.mainSections`のと、古い順`.Reverse`に表示したい場合。 ```html {{ range first 100 (where site.RegularPages.Reverse "Type" "in" site.Params.mainSections) }} ``` なんか、次の記事へのリンクが`.Paginate`とか`.Paginator.HasPrev`で取得できず、エラーがgolangのバグっぽかったので、`.PrevInSection .NextInSection`を使った。 ```html {{ if or .PrevInSection .NextInSection }} {{ end }} ```