mirror of
https://github.com/getpelican/pelican.git
synced 2025-10-15 20:28:56 +02:00
Fix #65. Unicode, grr. Thanks Bruno Bord.
This commit is contained in:
parent
816d2cd4b4
commit
06246d1aa4
6 changed files with 9 additions and 6 deletions
|
|
@ -1,3 +1,4 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
from pelican.utils import slugify, truncate_html_words
|
||||
|
||||
|
||||
|
|
@ -53,6 +54,9 @@ class Page(object):
|
|||
else:
|
||||
self.date_format = settings['DEFAULT_DATE_FORMAT']
|
||||
|
||||
if hasattr(self, 'date'):
|
||||
self.locale_date = self.date.strftime(self.date_format).decode('utf')
|
||||
|
||||
# store the settings ref.
|
||||
self._settings = settings
|
||||
|
||||
|
|
@ -74,10 +78,6 @@ class Page(object):
|
|||
def summary(self):
|
||||
return truncate_html_words(self.content, 50)
|
||||
|
||||
@property
|
||||
def locale_date(self):
|
||||
return self.date.strftime(self.date_format)
|
||||
|
||||
|
||||
|
||||
class Article(Page):
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
from operator import attrgetter
|
||||
from itertools import chain
|
||||
from functools import partial
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
from docutils import core
|
||||
from markdown import Markdown
|
||||
import re
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
import os
|
||||
import locale
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ This is a super article !
|
|||
#########################
|
||||
|
||||
:tags: foo, bar, foobar
|
||||
:date: 2010-10-02 10:14
|
||||
:date: 2010-12-02 10:14
|
||||
:category: yeah
|
||||
:author: Alexis Métaireau
|
||||
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ GITHUB_URL = 'http://github.com/ametaireau/'
|
|||
DISQUS_SITENAME = "blog-notmyidea"
|
||||
PDF_GENERATOR = False
|
||||
REVERSE_CATEGORY_ORDER = True
|
||||
LOCALE = 'en_US.utf8'
|
||||
LOCALE = 'fr_FR.utf8'
|
||||
|
||||
LINKS = (('Biologeek', 'http://biologeek.org'),
|
||||
('Filyb', "http://filyb.info/"),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue