Using localized slug with template tags
dallyh opened this issue · comments
Setting a slug field to be localized according to the README works correctly, that is when the pattern mentioned in the readme is uses, everything works fine.
However, when I combine localize
with some template tags, the filename is wrong. I don't currently know if this is a bug or intended behavior.
This setting slug: "{{year}}-{{month}}-{{day}}-{{title | localize}}"
produces the same filenames for both locales set (cs, en) and that is 2024-06-06-testovaci-post-z-cms.md
I tested this a little bit more, and having localize
in every tag produces the correct result slug: "{{year | localize}}-{{month | localize}}-{{day | localize}}-{{title | localize}}"
, however the year
etc. are template tags and are not taken from any field, so this could create some confusion.
Maybe just a note in the readme could help, or perhaps localize
should work when combined with template tags without adding it inside those tags.
Thanks for your thorough testing! Will fix.
The fix landed in v0.34.2!