Improve post slug: date + time + title
Slug format: 2026-06-18-1430-arrived-in-tokyo
- Eliminates one-post-per-day collision (BUG TC-P.10)
- URL is stable after creation (time baked in, title change doesn't affect it)
- regex_replace strips non-alphanumeric chars; trim('-') cleans edges
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -86,7 +86,7 @@ form:
|
||||
-
|
||||
add-page-by-form:
|
||||
parent: '/tracker'
|
||||
slug: "{{ form.value.date|date('Y-m-d') }}"
|
||||
slug: "{{ form.value.date|date('Y-m-d-Hi') }}-{{ form.value.title|lower|regex_replace('/[^a-z0-9]+/', '-')|trim('-') }}"
|
||||
template: 'entry'
|
||||
frontmatter:
|
||||
title: '{{ form.value.title }}'
|
||||
|
||||
Reference in New Issue
Block a user