mirror of
https://github.com/getpelican/pelican.git
synced 2025-10-15 20:28:56 +02:00
Apply typogrify on the title.
As it is done when reading the file, we need to remove html tags for the permalink and the slug (this is done here for the notmyidea and simple themes). While modifying the themes I also replaced the `pagename` template tag with `article.url` (`pagename` was an empty variable, no more used ?).
This commit is contained in:
parent
acf9b0597d
commit
4a0d4461e1
4 changed files with 53 additions and 42 deletions
|
|
@ -8,6 +8,7 @@ import logging
|
|||
from codecs import open as _open
|
||||
from datetime import datetime
|
||||
from itertools import groupby
|
||||
from jinja2 import Markup
|
||||
from operator import attrgetter
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
|
@ -44,6 +45,7 @@ def slugify(value):
|
|||
|
||||
Took from django sources.
|
||||
"""
|
||||
value = Markup(value).striptags()
|
||||
if type(value) == unicode:
|
||||
import unicodedata
|
||||
value = unicodedata.normalize('NFKD', value).encode('ascii', 'ignore')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue