zola
zola copied to clipboard
Add slugify.paths_keep_dates option. Update docs.
Manual testing:
Existing test_site/config.toml
http://127.0.0.1:1111/posts/a-post-with-dates
====
--- a/test_site/config.toml
+++ b/test_site/config.toml
@@ -18,6 +18,7 @@ extra_syntaxes_and_themes = ["syntaxes", "highlight_themes"]
[slugify]
paths = "on"
+paths_keep_dates = true
taxonomies = "on"
anchors = "on"
http://127.0.0.1:1111/posts/2016-10-08-a-post-with-dates
====
--- a/test_site/config.toml
+++ b/test_site/config.toml
@@ -17,7 +17,8 @@ highlight_theme = "custom_gruvbox"
extra_syntaxes_and_themes = ["syntaxes", "highlight_themes"]
[slugify]
-paths = "on"
+paths = "off"
+paths_keep_dates = true
taxonomies = "on"
anchors = "on"
http://127.0.0.1:1111/posts/2016-10-08_a-post-with-dates
====
--- a/test_site/config.toml
+++ b/test_site/config.toml
@@ -17,7 +17,8 @@ highlight_theme = "custom_gruvbox"
extra_syntaxes_and_themes = ["syntaxes", "highlight_themes"]
[slugify]
-paths = "on"
+paths = "safe"
+paths_keep_dates = true
taxonomies = "on"
anchors = "on"
http://127.0.0.1:1111/posts/2016-10-08_a-post-with-dates
Sanity check:
-
[x] Have you checked to ensure there aren't other open Pull Requests for the same update/change?
-
[x] Are you doing the PR on the
next
branch? -
[x] Have you created/updated the relevant documentation page(s)?
Proposal thread: https://zola.discourse.group/t/proposal-config-option-to-keep-dates-in-slugs/1405
Can you rebase the PR?
(oops, deleted the next branch in my fork when I synced it)
Rebased.
Rebased again.
I'm happy to change the name if we have a better candidate :) I guess that can also happen later - up until it is merged to master?
I'm happy to change the name if we have a better candidate :) I guess that can also happen later - up until it is merged to master?
Yep, we have time