Closed javorszky closed 3 years ago
Also handle these sort of links:
https://www.youtube.com/watch?v=m8iMGFjVgGg
to become:
https://www.youtube-nocookie.com/embed/m8iMGFjVgGg
Also yeah the filter should be straight forward to setup, examples of the ones I've added are here: https://github.com/jsoxford/jsnotoxfordsite/blob/main/.eleventy.js#L29-L43
They are then just used when outputting a value, e.g. you might have a filter called yt
and use it like:
{{ stream | yt }}
Source: https://github.com/jsoxford/jsnotoxfordsite/pull/13#pullrequestreview-588041785
Turn
into
Make a filter for it per https://www.11ty.dev/docs/filters/