Writing categories in YAML; new Twig filters (v5.1)

Submitted by plepe on

From now on, it's possible to write categories in YAML format. This is much easier than JSON and allows for comments. You can find a few example categories in the documentation on Github. There's a repository with these examples in the OpenStreetBrowser Development environment, which you can fork (you can load this under the big ➕ icon on OpenStreetBrowser).

Also, there are a two new Twig filters:

  • 'wikipediaAbstract', which loads and displays an abstract from Wikipedia, e.g.: {{ "en:London"|wikipediaAbstract }} or {{ "Q42"|wikipediaAbstract }}.
  • 'wikidataEntity', which loads an entity from Wikidata as structured data, e.g. {% set data = "Q42"|wikidataEntity %}{{ data.labels.en.value }} -> "Douglas Adams".