Skip to content

Commit 8209d41

Browse files
authored
Use filename as slug source (#261)
By default, the title of the article is used as the slug, if the title is changed, the slug will be updated, and the URL of the article will be changed, leading to a 404. Our previous blog used the filename as the slug, I like that. If we agree, I can set slug explicitly for the articles that are already published or maybe create a redirect.
1 parent b8ffdb6 commit 8209d41

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

pelicanconf.py

+1
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@
6868
STATIC_PATHS = ['images']
6969

7070
# URL settings
71+
SLUGIFY_SOURCE = "basename"
7172
PAGE_URL = '{slug}/'
7273
PAGE_SAVE_AS = '{slug}/index.html'
7374
ARTICLE_URL = 'blog/{date:%Y}/{date:%m}/{slug}/'

0 commit comments

Comments
 (0)