Follow-up of
/forum/general/automatically-translate-urls-set-default-route-to-match-the-title-t6382?u=metbril
@pamtbaau:
Do you have a sample to force the default route override with a combined pattern of date and slug?
Current frontmatter:
---
slug: hello-world
date: 2018-08-06
---
New frontmatter:
---
slug: hello-world
date: 2018-08-06
routes:
default: '/2018/08/06/hello-world'
---
I need a generic function, that also works when slug is not explicitly specified in the frontmatter, but determined from the folder name.
And if possible it should retain any existing canonical or aliases.
https://learn.getgrav.org/content/routing#page-level-route-overrides
And the same for date. If it is not explicitly then it should use the modified date, just like Grav does.
This would be a workaround for simulating Wordpress permalinks.