zola icon indicating copy to clipboard operation
zola copied to clipboard

Add slugify.paths_keep_dates option. Update docs.

Open DerSaidin opened this issue 1 year ago • 2 comments

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

DerSaidin avatar Aug 07 '22 01:08 DerSaidin

Can you rebase the PR?

Keats avatar Aug 09 '22 17:08 Keats

(oops, deleted the next branch in my fork when I synced it)

Rebased.

DerSaidin avatar Aug 10 '22 15:08 DerSaidin

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?

DerSaidin avatar Aug 20 '22 02:08 DerSaidin

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

Keats avatar Aug 24 '22 20:08 Keats