mirror of
https://github.com/getpelican/pelican.git
synced 2025-10-15 20:28:56 +02:00
fixed aliased replacements were broken when using ARTICLE_PERMALINK_STRUCTURE
This commit is contained in:
parent
28e13be3a4
commit
fc3ca7ea0e
1 changed files with 4 additions and 4 deletions
|
|
@ -236,7 +236,7 @@ class ArticlesGenerator(Generator):
|
||||||
add_to_url = u''
|
add_to_url = u''
|
||||||
if 'ARTICLE_PERMALINK_STRUCTURE' in self.settings:
|
if 'ARTICLE_PERMALINK_STRUCTURE' in self.settings:
|
||||||
article_permalink_structure = self.settings['ARTICLE_PERMALINK_STRUCTURE']
|
article_permalink_structure = self.settings['ARTICLE_PERMALINK_STRUCTURE']
|
||||||
article_permalink_structure = article_permalink_structure.lstrip('/')
|
article_permalink_structure = article_permalink_structure.lstrip('/').replace('%(', "%%(")
|
||||||
|
|
||||||
# try to substitute any python datetime directive
|
# try to substitute any python datetime directive
|
||||||
add_to_url = article.date.strftime(article_permalink_structure)
|
add_to_url = article.date.strftime(article_permalink_structure)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue