Skip to content

JS helper functions; Dynamic URLs

Latest

Choose a tag to compare

@julvo julvo released this 15 Sep 10:20
  • Use JavaScript helper function inside the templates, e.g.
    {{ .Routes | fn `routes => routes.filter(r => r.Meta.tags?.includes("some_tag"))` }}
  • Use create multiple routes from a single source file by using a variable name in the source filename, e.g. [tag].html and providing values for that variable in the front matter, e.g.
---
tag: ["a", "b", "c"]
---