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
|
from pelican.utils import slugify, truncate_html_words
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -53,6 +54,9 @@ class Page(object):
|
||||||
else:
|
else:
|
||||||
self.date_format = settings['DEFAULT_DATE_FORMAT']
|
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.
|
# store the settings ref.
|
||||||
self._settings = settings
|
self._settings = settings
|
||||||
|
|
||||||
|
|
@ -74,10 +78,6 @@ class Page(object):
|
||||||
def summary(self):
|
def summary(self):
|
||||||
return truncate_html_words(self.content, 50)
|
return truncate_html_words(self.content, 50)
|
||||||
|
|
||||||
@property
|
|
||||||
def locale_date(self):
|
|
||||||
return self.date.strftime(self.date_format)
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class Article(Page):
|
class Article(Page):
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,4 @@
|
||||||
|
# -*- coding: utf-8 -*-
|
||||||
from operator import attrgetter
|
from operator import attrgetter
|
||||||
from itertools import chain
|
from itertools import chain
|
||||||
from functools import partial
|
from functools import partial
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,4 @@
|
||||||
|
# -*- coding: utf-8 -*-
|
||||||
from docutils import core
|
from docutils import core
|
||||||
from markdown import Markdown
|
from markdown import Markdown
|
||||||
import re
|
import re
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,4 @@
|
||||||
|
# -*- coding: utf-8 -*-
|
||||||
import os
|
import os
|
||||||
import locale
|
import locale
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@ This is a super article !
|
||||||
#########################
|
#########################
|
||||||
|
|
||||||
:tags: foo, bar, foobar
|
:tags: foo, bar, foobar
|
||||||
:date: 2010-10-02 10:14
|
:date: 2010-12-02 10:14
|
||||||
:category: yeah
|
:category: yeah
|
||||||
:author: Alexis Métaireau
|
:author: Alexis Métaireau
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@ GITHUB_URL = 'http://github.com/ametaireau/'
|
||||||
DISQUS_SITENAME = "blog-notmyidea"
|
DISQUS_SITENAME = "blog-notmyidea"
|
||||||
PDF_GENERATOR = False
|
PDF_GENERATOR = False
|
||||||
REVERSE_CATEGORY_ORDER = True
|
REVERSE_CATEGORY_ORDER = True
|
||||||
LOCALE = 'en_US.utf8'
|
LOCALE = 'fr_FR.utf8'
|
||||||
|
|
||||||
LINKS = (('Biologeek', 'http://biologeek.org'),
|
LINKS = (('Biologeek', 'http://biologeek.org'),
|
||||||
('Filyb', "http://filyb.info/"),
|
('Filyb', "http://filyb.info/"),
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue