Hugo:我如何测试文件路径

问题描述 投票:0回答:0

在 Hugo 中,我想更新站点地图模板,以便在either (a) sitemap_exclude 参数设置为 true,或 (b) 文件位于特定目录下时排除文件。

目前测试是:

{{ range .Data.Pages }}{{ 如果 ne .Params.sitemap_exclude true }}

如何同时排除 foobar 目录下的文件?

P.

templates sitemap hugo
© www.soinside.com 2019 - 2024. All rights reserved.