diff --git a/docs/contribute.rst b/docs/contribute.rst
index fcf8d5c0..0090dd07 100644
--- a/docs/contribute.rst
+++ b/docs/contribute.rst
@@ -39,6 +39,14 @@ The tests live in "pelican/tests" and you can run them using the
$ unit2 discover
+If you have made changes that affect the output of a pelican generated weblog,
+then you should update the output used by functional tests.
+To do so, you can use the 2 following commands::
+
+ $ LC_ALL="C" pelican -o tests/output/custom/ -s samples/pelican.conf.py \
+ samples/content/
+ $ LC_ALL="C" USER="Dummy Author" pelican -o tests/output/basic/ samples/content/
+
Coding standards
================
diff --git a/docs/faq.rst b/docs/faq.rst
index a3829d65..3eec6e84 100644
--- a/docs/faq.rst
+++ b/docs/faq.rst
@@ -49,3 +49,14 @@ install it. You can do so by typing::
In case you don't have pip installed, consider installing it via::
$ (sudo) easy_install pip
+
+How do I assign custom templates on a per page basis?
+=====================================================
+
+It's as simple as adding an extra line of metadata to any pages or articles you
+want to have it's own template.
+
+ :template: template_name
+
+Then just make sure to have the template installed in to your theme as
+``template_name.html``.
\ No newline at end of file
diff --git a/docs/fr/configuration.rst b/docs/fr/configuration.rst
index fadaf258..895802d6 100644
--- a/docs/fr/configuration.rst
+++ b/docs/fr/configuration.rst
@@ -133,8 +133,12 @@ Pelican est fournit avec :doc:`pelican-themes`, un script permettant de gérer l
Paramètres divers
=================
-FALLBACK_ON_FS_DATE :
- Si *True*, Pelican se basera sur le *mtime* du fichier s'il n'y a pas de date spécifiée dans le fichier de l'article ;
+DEFAULT_DATE:
+ Date par défaut à utiliser si l'information de date n'est pas spécifiée
+ dans les metadonnées de l'article.
+ Si 'fs', Pelican se basera sur le *mtime* du fichier.
+ Si c'est un tuple, il sera passé au constructeur datetime.datetime pour
+ générer l'objet datetime utilisé par défaut.
KEEP_OUTPUT DIRECTORY :
Ne génère que les fichiers modifiés et n'efface pas le repertoire de sortie ;
diff --git a/docs/settings.rst b/docs/settings.rst
index 3c557e87..0a1af584 100644
--- a/docs/settings.rst
+++ b/docs/settings.rst
@@ -33,9 +33,13 @@ Setting name (default value) What doe
`DISPLAY_PAGES_ON_MENU` (``True``) Whether to display pages on the menu of the
template. Templates may or not honor this
setting.
-`FALLBACK_ON_FS_DATE` (``True``) If True, Pelican will use the file system
+`DEFAULT_DATE` (``fs``) The default date you want to use.
+ If 'fs', Pelican will use the file system
timestamp information (mtime) if it can't get
date information from the metadata.
+ If tuple object, it will instead generate the
+ default datetime object by passing the tuple to
+ the datetime.datetime constructor.
`JINJA_EXTENSIONS` (``[]``) A list of any Jinja2 extensions you want to use.
`DELETE_OUTPUT_DIRECTORY` (``False``) Delete the content of the output directory before
generating new files.
diff --git a/pelican/contents.py b/pelican/contents.py
index b8bb0993..a5e3be8f 100644
--- a/pelican/contents.py
+++ b/pelican/contents.py
@@ -21,6 +21,7 @@ class Page(object):
:param content: the string to parse, containing the original content.
"""
mandatory_properties = ('title',)
+ default_template = 'page'
def __init__(self, content, metadata=None, settings=None,
filename=None):
@@ -44,6 +45,9 @@ class Page(object):
# also keep track of the metadata attributes available
self.metadata = local_metadata
+ #default template if it's not defined in page
+ self.template = self._get_template()
+
# default author to the one in settings if not defined
if not hasattr(self, 'author'):
if 'AUTHOR' in settings:
@@ -153,9 +157,16 @@ class Page(object):
url = property(functools.partial(get_url_setting, key='url'))
save_as = property(functools.partial(get_url_setting, key='save_as'))
+ def _get_template(self):
+ if hasattr(self, 'template') and self.template is not None:
+ return self.template
+ else:
+ return self.default_template
+
class Article(Page):
mandatory_properties = ('title', 'date', 'category')
+ default_template = 'article'
class Quote(Page):
diff --git a/pelican/generators.py b/pelican/generators.py
index 3706a70c..0258543e 100644
--- a/pelican/generators.py
+++ b/pelican/generators.py
@@ -168,11 +168,9 @@ class ArticlesGenerator(Generator):
def generate_articles(self, write):
"""Generate the articles."""
- article_template = self.get_template('article')
for article in chain(self.translations, self.articles):
- write(article.save_as,
- article_template, self.context, article=article,
- category=article.category)
+ write(article.save_as, self.get_template(article.template),
+ self.context, article=article, category=article.category)
def generate_direct_templates(self, write):
"""Generate direct templates pages"""
@@ -223,10 +221,10 @@ class ArticlesGenerator(Generator):
def generate_drafts(self, write):
"""Generate drafts pages."""
- article_template = self.get_template('article')
for article in self.drafts:
- write('drafts/%s.html' % article.slug, article_template,
- self.context, article=article, category=article.category)
+ write('drafts/%s.html' % article.slug,
+ self.get_template(article.template), self.context,
+ article=article, category=article.category)
def generate_pages(self, writer):
"""Generate the pages on the disk"""
@@ -273,9 +271,13 @@ class ArticlesGenerator(Generator):
if category != '':
metadata['category'] = Category(category, self.settings)
- if 'date' not in metadata and self.settings['FALLBACK_ON_FS_DATE']:
+ if 'date' not in metadata and self.settings['DEFAULT_DATE']:
+ if self.settings['DEFAULT_DATE'] == 'fs':
metadata['date'] = datetime.datetime.fromtimestamp(
- os.stat(f).st_ctime)
+ os.stat(f).st_ctime)
+ else:
+ metadata['date'] = datetime.datetime(
+ *self.settings['DEFAULT_DATE'])
signals.article_generate_context.send(self, metadata=metadata)
article = Article(content, metadata, settings=self.settings,
@@ -415,7 +417,6 @@ class PagesGenerator(Generator):
(repr(unicode.encode(page.status, 'utf-8')),
repr(f)))
-
self.pages, self.translations = process_translations(all_pages)
self.hidden_pages, self.hidden_translations = process_translations(hidden_pages)
@@ -425,7 +426,7 @@ class PagesGenerator(Generator):
def generate_output(self, writer):
for page in chain(self.translations, self.pages,
self.hidden_translations, self.hidden_pages):
- writer.write_file(page.save_as, self.get_template('page'),
+ writer.write_file(page.save_as, self.get_template(page.template),
self.context, page=page,
relative_urls=self.settings.get('RELATIVE_URLS'))
diff --git a/pelican/settings.py b/pelican/settings.py
index 17efea58..41b8baa9 100644
--- a/pelican/settings.py
+++ b/pelican/settings.py
@@ -29,7 +29,7 @@ _DEFAULT_CONFIG = {'PATH': '.',
'DISPLAY_PAGES_ON_MENU': True,
'PDF_GENERATOR': False,
'DEFAULT_CATEGORY': 'misc',
- 'FALLBACK_ON_FS_DATE': True,
+ 'DEFAULT_DATE': 'fs',
'WITH_FUTURE_DATES': True,
'CSS_FILE': 'main.css',
'REVERSE_ARCHIVE_ORDER': False,
diff --git a/samples/pelican.conf.py b/samples/pelican.conf.py
index bffe57f6..e55e0c0b 100755
--- a/samples/pelican.conf.py
+++ b/samples/pelican.conf.py
@@ -8,8 +8,9 @@ GITHUB_URL = 'http://github.com/ametaireau/'
DISQUS_SITENAME = "blog-notmyidea"
PDF_GENERATOR = False
REVERSE_CATEGORY_ORDER = True
-LOCALE = ""
+LOCALE = "C"
DEFAULT_PAGINATION = 4
+DEFAULT_DATE = (2012, 03, 02, 14, 01, 01)
FEED_RSS = 'feeds/all.rss.xml'
CATEGORY_FEED_RSS = 'feeds/%s.rss.xml'
diff --git a/tests/TestPages/hidden_page_with_template.rst b/tests/TestPages/hidden_page_with_template.rst
new file mode 100644
index 00000000..36104a09
--- /dev/null
+++ b/tests/TestPages/hidden_page_with_template.rst
@@ -0,0 +1,11 @@
+This is a test hidden page with a custom template
+#################################################
+
+:status: hidden
+:template: custom
+
+The quick brown fox jumped over the lazy dog's back.
+
+This page is hidden
+
+This page has a custom template to be called when rendered
diff --git a/tests/TestPages/page_with_template.rst b/tests/TestPages/page_with_template.rst
new file mode 100644
index 00000000..9388dc2f
--- /dev/null
+++ b/tests/TestPages/page_with_template.rst
@@ -0,0 +1,8 @@
+This is a test page with a preset template
+##########################################
+
+:template: custom
+
+The quick brown fox jumped over the lazy dog's back.
+
+This article has a custom template to be called when rendered
diff --git a/tests/content/article_with_template.rst b/tests/content/article_with_template.rst
new file mode 100644
index 00000000..eb55738c
--- /dev/null
+++ b/tests/content/article_with_template.rst
@@ -0,0 +1,8 @@
+Article with template
+#####################
+
+:template: custom
+
+This article has a custom template to be called when rendered
+
+This is some content. With some stuff to "typogrify".
diff --git a/tests/output/basic/a-markdown-powered-article.html b/tests/output/basic/a-markdown-powered-article.html
index 32a863d6..bfa09fdf 100644
--- a/tests/output/basic/a-markdown-powered-article.html
+++ b/tests/output/basic/a-markdown-powered-article.html
@@ -31,30 +31,35 @@
-
content
+ bar
cat1
- bar
+ misc
yeah
-
-
-
-
-
-
+
+
+
+
+
+
+
Wed 20 April 2011
- By bruno
+ By Dummy Author
In cat1 .
@@ -62,11 +67,11 @@
-
You're mutually oblivious.
-
-
+ You're mutually oblivious.
+
+
-
+
diff --git a/tests/output/basic/archives.html b/tests/output/basic/archives.html
index 840dfa02..dac96a47 100644
--- a/tests/output/basic/archives.html
+++ b/tests/output/basic/archives.html
@@ -31,11 +31,11 @@
- content
+ bar
cat1
- bar
+ misc
yeah
@@ -48,28 +48,28 @@
Fri 15 October 2010
- Unbelievable !
+ Unbelievable !
Wed 20 October 2010
- Oh yeah !
+ Oh yeah !
Thu 02 December 2010
- This is a super article !
+ This is a super article !
Thu 17 February 2011
- Article 1
+ Article 1
Thu 17 February 2011
- Article 2
+ Article 2
Thu 17 February 2011
- Article 3
+ Article 3
Wed 20 April 2011
- A markdown powered article
+ A markdown powered article
Wed 29 February 2012
- Second article
+ Second article
diff --git a/tests/output/basic/article-1.html b/tests/output/basic/article-1.html
index c1199371..ab1d71d7 100644
--- a/tests/output/basic/article-1.html
+++ b/tests/output/basic/article-1.html
@@ -31,30 +31,35 @@
- content
+ bar
cat1
- bar
+ misc
yeah
-
-
-
-
-
-
+
+
+
+
+
+
+
Thu 17 February 2011
- By bruno
+ By Dummy Author
In cat1 .
@@ -62,12 +67,12 @@
-
Article 1
+
Article 1
-
-
+
+
-
+
diff --git a/tests/output/basic/article-2.html b/tests/output/basic/article-2.html
index 62dd0368..52cfff0d 100644
--- a/tests/output/basic/article-2.html
+++ b/tests/output/basic/article-2.html
@@ -31,30 +31,35 @@
- content
+ bar
cat1
- bar
+ misc
yeah
-
-
-
-
-
-
+
+
+
+
+
+
+
Thu 17 February 2011
- By bruno
+ By Dummy Author
In cat1 .
@@ -62,12 +67,12 @@
-
Article 2
+
Article 2
-
-
+
+
-
+
diff --git a/tests/output/basic/article-3.html b/tests/output/basic/article-3.html
index 9fd6df0a..ef97a56d 100644
--- a/tests/output/basic/article-3.html
+++ b/tests/output/basic/article-3.html
@@ -31,30 +31,35 @@
- content
+ bar
cat1
- bar
+ misc
yeah
-
-
-
-
-
-
+
+
+
+
+
+
+
Thu 17 February 2011
- By bruno
+ By Dummy Author
In cat1 .
@@ -62,12 +67,12 @@
-
Article 3
+
Article 3
-
-
+
+
-
+
diff --git a/tests/output/basic/author/alexis-metaireau.html b/tests/output/basic/author/alexis-metaireau.html
index ab68482d..ad7b8bee 100644
--- a/tests/output/basic/author/alexis-metaireau.html
+++ b/tests/output/basic/author/alexis-metaireau.html
@@ -31,11 +31,11 @@
- content
+ bar
cat1
- bar
+ misc
yeah
@@ -88,7 +88,6 @@ YEAH !
-
@@ -96,7 +95,8 @@ YEAH !
@@ -115,18 +115,19 @@ YEAH !
- Multi-line metadata should be supported
-as well as
inline markup .
+
Multi-line metadata should be supported
+as well as inline markup .
+
read more
-
-
-
+
+
+
diff --git a/tests/output/basic/author/bruno.html b/tests/output/basic/author/dummy-author.html
similarity index 81%
rename from tests/output/basic/author/bruno.html
rename to tests/output/basic/author/dummy-author.html
index 1e2dc655..54c81100 100644
--- a/tests/output/basic/author/bruno.html
+++ b/tests/output/basic/author/dummy-author.html
@@ -1,7 +1,7 @@
- A Pelican Blog - bruno
+ A Pelican Blog - Dummy Author
@@ -31,11 +31,11 @@
- content
+ bar
cat1
- bar
+ misc
yeah
@@ -57,7 +57,7 @@
- By bruno
+ By Dummy Author
In cat1 .
@@ -77,7 +77,6 @@
-
@@ -85,7 +84,8 @@
@@ -96,7 +96,7 @@
- By bruno
+ By Dummy Author
In cat1 .
@@ -112,7 +112,6 @@
-
@@ -120,7 +119,8 @@
@@ -131,7 +131,7 @@
- By bruno
+ By Dummy Author
In cat1 .
@@ -147,7 +147,6 @@
-
@@ -155,7 +154,8 @@
@@ -166,7 +166,7 @@
- By bruno
+ By Dummy Author
In cat1 .
@@ -182,7 +182,6 @@
-
@@ -190,7 +189,8 @@
@@ -201,10 +201,10 @@
- By bruno
+ By Dummy Author
-
In content .
+
In misc .
tags: foo bar baz
@@ -222,7 +222,6 @@ Translations:
-
@@ -230,7 +229,8 @@ Translations:
@@ -241,10 +241,10 @@ Translations:
- By bruno
+ By Dummy Author
-
In content .
+
In misc .
@@ -257,10 +257,10 @@ Translations:
-
-
-
+
+
+
diff --git a/tests/output/basic/categories.html b/tests/output/basic/categories.html
index 5ffb220d..d13d0b92 100644
--- a/tests/output/basic/categories.html
+++ b/tests/output/basic/categories.html
@@ -31,11 +31,11 @@
-
content
+
bar
cat1
-
bar
+
misc
yeah
@@ -44,13 +44,13 @@
diff --git a/tests/output/basic/category/bar.html b/tests/output/basic/category/bar.html
index b268dd53..a80656a5 100644
--- a/tests/output/basic/category/bar.html
+++ b/tests/output/basic/category/bar.html
@@ -31,11 +31,11 @@
-
content
+
bar
cat1
-
bar
+
misc
yeah
@@ -85,8 +85,8 @@ YEAH !
-
+
diff --git a/tests/output/basic/category/cat1.html b/tests/output/basic/category/cat1.html
index e92fd0df..3d062ac7 100644
--- a/tests/output/basic/category/cat1.html
+++ b/tests/output/basic/category/cat1.html
@@ -31,11 +31,11 @@
-
content
+
bar
cat1
-
bar
+
misc
yeah
@@ -57,7 +57,7 @@
- By bruno
+ By Dummy Author
In cat1 .
@@ -77,7 +77,6 @@
-
@@ -85,7 +84,8 @@
@@ -96,7 +96,7 @@
- By bruno
+ By Dummy Author
In cat1 .
@@ -112,7 +112,6 @@
-
@@ -120,7 +119,8 @@
@@ -131,7 +131,7 @@
- By bruno
+ By Dummy Author
In cat1 .
@@ -147,7 +147,6 @@
-
@@ -155,7 +154,8 @@
@@ -166,7 +166,7 @@
- By bruno
+ By Dummy Author
In cat1 .
@@ -182,10 +182,10 @@
-
-
-
+
+
+
diff --git a/tests/output/basic/category/content.html b/tests/output/basic/category/content.html
index 0eec912c..19ceef2c 100644
--- a/tests/output/basic/category/content.html
+++ b/tests/output/basic/category/content.html
@@ -31,11 +31,11 @@
-
content
+
bar
cat1
-
bar
+
content
yeah
@@ -57,7 +57,7 @@
- By bruno
+ By Dummy Author
In content .
@@ -102,7 +102,7 @@ Translations:
- By bruno
+ By Dummy Author
In content .
diff --git a/tests/output/basic/category/misc.html b/tests/output/basic/category/misc.html
new file mode 100644
index 00000000..ff344111
--- /dev/null
+++ b/tests/output/basic/category/misc.html
@@ -0,0 +1,147 @@
+
+
+
+
A Pelican Blog - misc
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Wed 29 February 2012
+
+
+
+
+ By Dummy Author
+
+
+In misc .
+tags: foo bar baz
+
+
+Translations:
+
+ fr
+
+
+ This is some article, in english
+
+
+
+
+
+
+ Other articles
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Fri 15 October 2010
+
+
+
+
+ By Dummy Author
+
+
+In misc .
+
+
+
+
+
Or completely awesome. Depends the needs.
+
+
read more
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Proudly powered by Pelican , which takes great advantage of Python .
+
+
+ The theme is by Smashing Magazine , thanks!
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/tests/output/basic/category/yeah.html b/tests/output/basic/category/yeah.html
index ccb531f1..1d4d7f04 100644
--- a/tests/output/basic/category/yeah.html
+++ b/tests/output/basic/category/yeah.html
@@ -31,11 +31,11 @@
-
content
+
bar
cat1
-
bar
+
misc
yeah
@@ -86,8 +86,8 @@
-
+
diff --git a/tests/output/basic/drafts/a-draft-article.html b/tests/output/basic/drafts/a-draft-article.html
index 59b6223f..af0f2476 100644
--- a/tests/output/basic/drafts/a-draft-article.html
+++ b/tests/output/basic/drafts/a-draft-article.html
@@ -31,44 +31,49 @@
-
content
+
bar
cat1
-
bar
+
misc
yeah
-
-
-
-
-
-
-
- Fri 02 March 2012
+
+
+
+
+
+
+
+
+ Sat 19 May 2012
- By bruno
+ By Dummy Author
-In content .
+In misc .
-
This is a draft article, it should live under the /drafts/ folder and not be
+
This is a draft article, it should live under the /drafts/ folder and not be
listed anywhere else.
-
-
+
+
-
+
diff --git a/tests/output/basic/feeds/all-en.atom.xml b/tests/output/basic/feeds/all-en.atom.xml
index c9fe8270..b532e454 100644
--- a/tests/output/basic/feeds/all-en.atom.xml
+++ b/tests/output/basic/feeds/all-en.atom.xml
@@ -1,9 +1,9 @@
-A Pelican Blog ../. 2012-02-29T00:00:00Z Second article 2012-02-29T00:00:00Z bruno .././second-article.html <p>This is some article, in english</p>
- A markdown powered article 2011-04-20T00:00:00Z bruno .././a-markdown-powered-article.html <p>You're mutually oblivious.</p> Article 1 2011-02-17T00:00:00Z bruno .././article-1.html <p>Article 1</p>
- Article 2 2011-02-17T00:00:00Z bruno .././article-2.html <p>Article 2</p>
- Article 3 2011-02-17T00:00:00Z bruno .././article-3.html <p>Article 3</p>
- This is a super article ! 2010-12-02T10:14:00Z Alexis Métaireau .././this-is-a-super-article.html <p>Some content here !</p>
+A Pelican Blog .././ 2012-02-29T00:00:00Z Second article 2012-02-29T00:00:00Z Dummy Author tag:../.,2012-02-29:second-article.html <p>This is some article, in english</p>
+ A markdown powered article 2011-04-20T00:00:00Z Dummy Author tag:../.,2011-04-20:a-markdown-powered-article.html <p>You're mutually oblivious.</p> Article 1 2011-02-17T00:00:00Z Dummy Author tag:../.,2011-02-17:article-1.html <p>Article 1</p>
+ Article 2 2011-02-17T00:00:00Z Dummy Author tag:../.,2011-02-17:article-2.html <p>Article 2</p>
+ Article 3 2011-02-17T00:00:00Z Dummy Author tag:../.,2011-02-17:article-3.html <p>Article 3</p>
+ This is a super article ! 2010-12-02T10:14:00Z Alexis Métaireau tag:../.,2010-12-02:this-is-a-super-article.html <p>Some content here !</p>
<div class="section" id="this-is-a-simple-title">
<h2>This is a simple title</h2>
<p>And here comes the cool <a class="reference external" href="http://books.couchdb.org/relax/design-documents/views">stuff</a>.</p>
@@ -15,11 +15,11 @@
</pre>
<p>→ And now try with some utf8 hell: ééé</p>
</div>
- Oh yeah ! 2010-10-20T10:14:00Z Alexis Métaireau .././oh-yeah.html <div class="section" id="why-not">
+ Oh yeah ! 2010-10-20T10:14:00Z Alexis Métaireau tag:../.,2010-10-20:oh-yeah.html <div class="section" id="why-not">
<h2>Why not ?</h2>
<p>After all, why not ? It's pretty simple to do it, and it will allow me to write my blogposts in rst !
YEAH !</p>
<img alt="alternate text" src="pictures/Sushi.jpg" style="width: 600px; height: 450px;" />
</div>
- Unbelievable ! 2010-10-15T20:30:00Z bruno .././unbelievable.html <p>Or completely awesome. Depends the needs.</p>
+ Unbelievable ! 2010-10-15T20:30:00Z Dummy Author tag:../.,2010-10-15:unbelievable.html <p>Or completely awesome. Depends the needs.</p>
\ No newline at end of file
diff --git a/tests/output/basic/feeds/all-fr.atom.xml b/tests/output/basic/feeds/all-fr.atom.xml
index 606e5186..274bd548 100644
--- a/tests/output/basic/feeds/all-fr.atom.xml
+++ b/tests/output/basic/feeds/all-fr.atom.xml
@@ -1,4 +1,4 @@
-A Pelican Blog ../. 2012-03-02T14:01:01Z Trop bien ! 2012-03-02T14:01:01Z bruno .././oh-yeah-fr.html <p>Et voila du contenu en français</p>
- Deuxième article 2012-02-29T00:00:00Z bruno .././second-article-fr.html <p>Ceci est un article, en français.</p>
+A Pelican Blog .././ 2012-05-19T23:55:50Z Trop bien ! 2012-05-19T23:55:50Z Dummy Author tag:../.,2012-05-19:oh-yeah-fr.html <p>Et voila du contenu en français</p>
+ Deuxième article 2012-02-29T00:00:00Z Dummy Author tag:../.,2012-02-29:second-article-fr.html <p>Ceci est un article, en français.</p>
\ No newline at end of file
diff --git a/tests/output/basic/feeds/all.atom.xml b/tests/output/basic/feeds/all.atom.xml
index 3bb7d2fd..a0fb9144 100644
--- a/tests/output/basic/feeds/all.atom.xml
+++ b/tests/output/basic/feeds/all.atom.xml
@@ -1,9 +1,9 @@
-A Pelican Blog ../. 2012-02-29T00:00:00Z Second article 2012-02-29T00:00:00Z bruno .././second-article.html <p>This is some article, in english</p>
- A markdown powered article 2011-04-20T00:00:00Z bruno .././a-markdown-powered-article.html <p>You're mutually oblivious.</p> Article 1 2011-02-17T00:00:00Z bruno .././article-1.html <p>Article 1</p>
- Article 2 2011-02-17T00:00:00Z bruno .././article-2.html <p>Article 2</p>
- Article 3 2011-02-17T00:00:00Z bruno .././article-3.html <p>Article 3</p>
- This is a super article ! 2010-12-02T10:14:00Z Alexis Métaireau .././this-is-a-super-article.html <p>Some content here !</p>
+A Pelican Blog .././ 2012-02-29T00:00:00Z Second article 2012-02-29T00:00:00Z Dummy Author tag:../.,2012-02-29:second-article.html <p>This is some article, in english</p>
+ A markdown powered article 2011-04-20T00:00:00Z Dummy Author tag:../.,2011-04-20:a-markdown-powered-article.html <p>You're mutually oblivious.</p> Article 1 2011-02-17T00:00:00Z Dummy Author tag:../.,2011-02-17:article-1.html <p>Article 1</p>
+ Article 2 2011-02-17T00:00:00Z Dummy Author tag:../.,2011-02-17:article-2.html <p>Article 2</p>
+ Article 3 2011-02-17T00:00:00Z Dummy Author tag:../.,2011-02-17:article-3.html <p>Article 3</p>
+ This is a super article ! 2010-12-02T10:14:00Z Alexis Métaireau tag:../.,2010-12-02:this-is-a-super-article.html <p>Some content here !</p>
<div class="section" id="this-is-a-simple-title">
<h2>This is a simple title</h2>
<p>And here comes the cool <a class="reference external" href="http://books.couchdb.org/relax/design-documents/views">stuff</a>.</p>
@@ -15,11 +15,11 @@
</pre>
<p>→ And now try with some utf8 hell: ééé</p>
</div>
- Oh yeah ! 2010-10-20T10:14:00Z Alexis Métaireau .././oh-yeah.html <div class="section" id="why-not">
+ Oh yeah ! 2010-10-20T10:14:00Z Alexis Métaireau tag:../.,2010-10-20:oh-yeah.html <div class="section" id="why-not">
<h2>Why not ?</h2>
<p>After all, why not ? It's pretty simple to do it, and it will allow me to write my blogposts in rst !
YEAH !</p>
<img alt="alternate text" src="pictures/Sushi.jpg" style="width: 600px; height: 450px;" />
</div>
- Unbelievable ! 2010-10-15T20:30:00Z bruno .././unbelievable.html <p>Or completely awesome. Depends the needs.</p>
+ Unbelievable ! 2010-10-15T20:30:00Z Dummy Author tag:../.,2010-10-15:unbelievable.html <p>Or completely awesome. Depends the needs.</p>
\ No newline at end of file
diff --git a/tests/output/basic/feeds/bar.atom.xml b/tests/output/basic/feeds/bar.atom.xml
index 6ce45518..15708734 100644
--- a/tests/output/basic/feeds/bar.atom.xml
+++ b/tests/output/basic/feeds/bar.atom.xml
@@ -1,5 +1,5 @@
-A Pelican Blog ../. 2010-10-20T10:14:00Z Oh yeah ! 2010-10-20T10:14:00Z Alexis Métaireau .././oh-yeah.html <div class="section" id="why-not">
+A Pelican Blog .././ 2010-10-20T10:14:00Z Oh yeah ! 2010-10-20T10:14:00Z Alexis Métaireau tag:../.,2010-10-20:oh-yeah.html <div class="section" id="why-not">
<h2>Why not ?</h2>
<p>After all, why not ? It's pretty simple to do it, and it will allow me to write my blogposts in rst !
YEAH !</p>
diff --git a/tests/output/basic/feeds/cat1.atom.xml b/tests/output/basic/feeds/cat1.atom.xml
index f66c2e73..383c8ab7 100644
--- a/tests/output/basic/feeds/cat1.atom.xml
+++ b/tests/output/basic/feeds/cat1.atom.xml
@@ -1,5 +1,5 @@
-A Pelican Blog ../. 2011-04-20T00:00:00Z A markdown powered article 2011-04-20T00:00:00Z bruno .././a-markdown-powered-article.html <p>You're mutually oblivious.</p> Article 1 2011-02-17T00:00:00Z bruno .././article-1.html <p>Article 1</p>
- Article 2 2011-02-17T00:00:00Z bruno .././article-2.html <p>Article 2</p>
- Article 3 2011-02-17T00:00:00Z bruno .././article-3.html <p>Article 3</p>
+A Pelican Blog .././ 2011-04-20T00:00:00Z A markdown powered article 2011-04-20T00:00:00Z Dummy Author tag:../.,2011-04-20:a-markdown-powered-article.html <p>You're mutually oblivious.</p> Article 1 2011-02-17T00:00:00Z Dummy Author tag:../.,2011-02-17:article-1.html <p>Article 1</p>
+ Article 2 2011-02-17T00:00:00Z Dummy Author tag:../.,2011-02-17:article-2.html <p>Article 2</p>
+ Article 3 2011-02-17T00:00:00Z Dummy Author tag:../.,2011-02-17:article-3.html <p>Article 3</p>
\ No newline at end of file
diff --git a/tests/output/basic/feeds/content.atom.xml b/tests/output/basic/feeds/content.atom.xml
index 0cf53aa7..1fa740b4 100644
--- a/tests/output/basic/feeds/content.atom.xml
+++ b/tests/output/basic/feeds/content.atom.xml
@@ -1,4 +1,4 @@
-A Pelican Blog ../. 2012-02-29T00:00:00Z Second article 2012-02-29T00:00:00Z bruno .././second-article.html <p>This is some article, in english</p>
- Unbelievable ! 2010-10-15T20:30:00Z bruno .././unbelievable.html <p>Or completely awesome. Depends the needs.</p>
+A Pelican Blog .././ 2012-02-29T00:00:00Z Second article 2012-02-29T00:00:00Z Dummy Author tag:../.,2012-02-29:second-article.html <p>This is some article, in english</p>
+ Unbelievable ! 2010-10-15T20:30:00Z Dummy Author tag:../.,2010-10-15:unbelievable.html <p>Or completely awesome. Depends the needs.</p>
\ No newline at end of file
diff --git a/tests/output/basic/feeds/misc.atom.xml b/tests/output/basic/feeds/misc.atom.xml
new file mode 100644
index 00000000..db33d39b
--- /dev/null
+++ b/tests/output/basic/feeds/misc.atom.xml
@@ -0,0 +1,4 @@
+
+A Pelican Blog .././ 2012-02-29T00:00:00Z Second article 2012-02-29T00:00:00Z Dummy Author tag:../.,2012-02-29:second-article.html <p>This is some article, in english</p>
+ Unbelievable ! 2010-10-15T20:30:00Z Dummy Author tag:../.,2010-10-15:unbelievable.html <p>Or completely awesome. Depends the needs.</p>
+
\ No newline at end of file
diff --git a/tests/output/basic/feeds/yeah.atom.xml b/tests/output/basic/feeds/yeah.atom.xml
index 7fd8e9f2..e9bb26d0 100644
--- a/tests/output/basic/feeds/yeah.atom.xml
+++ b/tests/output/basic/feeds/yeah.atom.xml
@@ -1,5 +1,5 @@
-A Pelican Blog ../. 2010-12-02T10:14:00Z This is a super article ! 2010-12-02T10:14:00Z Alexis Métaireau .././this-is-a-super-article.html <p>Some content here !</p>
+A Pelican Blog .././ 2010-12-02T10:14:00Z This is a super article ! 2010-12-02T10:14:00Z Alexis Métaireau tag:../.,2010-12-02:this-is-a-super-article.html <p>Some content here !</p>
<div class="section" id="this-is-a-simple-title">
<h2>This is a simple title</h2>
<p>And here comes the cool <a class="reference external" href="http://books.couchdb.org/relax/design-documents/views">stuff</a>.</p>
diff --git a/tests/output/basic/index.html b/tests/output/basic/index.html
index 8a2091b9..fe6c2279 100644
--- a/tests/output/basic/index.html
+++ b/tests/output/basic/index.html
@@ -31,11 +31,11 @@
- content
+ bar
cat1
- bar
+ misc
yeah
@@ -57,10 +57,10 @@
- By bruno
+ By Dummy Author
-In content .
+In misc .
tags: foo bar baz
@@ -83,7 +83,6 @@ Translations:
-
@@ -91,7 +90,8 @@ Translations:
@@ -102,7 +102,7 @@ Translations:
- By bruno
+ By Dummy Author
In cat1 .
@@ -117,7 +117,6 @@ Translations:
-
@@ -125,7 +124,8 @@ Translations:
@@ -136,7 +136,7 @@ Translations:
- By bruno
+ By Dummy Author
In cat1 .
@@ -152,7 +152,6 @@ Translations:
-
@@ -160,7 +159,8 @@ Translations:
@@ -171,7 +171,7 @@ Translations:
- By bruno
+ By Dummy Author
In cat1 .
@@ -187,7 +187,6 @@ Translations:
-
@@ -195,7 +194,8 @@ Translations:
@@ -206,7 +206,7 @@ Translations:
- By bruno
+ By Dummy Author
In cat1 .
@@ -222,7 +222,6 @@ Translations:
-
@@ -230,7 +229,8 @@ Translations:
@@ -249,15 +249,15 @@ Translations:
- Multi-line metadata should be supported
-as well as
inline markup .
+
Multi-line metadata should be supported
+as well as inline markup .
+
read more
-
@@ -265,7 +265,8 @@ as well as
inline markup .
@@ -302,7 +303,6 @@ YEAH !
-
@@ -310,7 +310,8 @@ YEAH !
@@ -321,10 +322,10 @@ YEAH !
- By bruno
+ By Dummy Author
-
In content .
+
In misc .
@@ -337,10 +338,10 @@ YEAH !
-
-
-
+
+
+
diff --git a/tests/output/basic/oh-yeah-fr.html b/tests/output/basic/oh-yeah-fr.html
index 55eec103..4856347f 100644
--- a/tests/output/basic/oh-yeah-fr.html
+++ b/tests/output/basic/oh-yeah-fr.html
@@ -31,33 +31,38 @@
-
content
+
bar
cat1
-
bar
+
misc
yeah
-
-
-
-
-
-
-
- Fri 02 March 2012
+
+
+
+
+
+
+
+
+ Sat 19 May 2012
- By bruno
+ By Dummy Author
-In content .
+In misc .
@@ -67,12 +72,12 @@ Translations:
-
Et voila du contenu en français
+
Et voila du contenu en français
-
-
+
+
-
+
diff --git a/tests/output/basic/oh-yeah.html b/tests/output/basic/oh-yeah.html
index 4b650e7d..bd0c75ee 100644
--- a/tests/output/basic/oh-yeah.html
+++ b/tests/output/basic/oh-yeah.html
@@ -31,23 +31,28 @@
- content
+ bar
cat1
- bar
+ misc
yeah
-
-
-
-
-
-
+
+
+
+
+
+
+
Wed 20 October 2010
@@ -67,17 +72,17 @@ Translations:
-
+
Why not ?
After all, why not ? It's pretty simple to do it, and it will allow me to write my blogposts in rst !
YEAH !
-
-
+
+
-
+
diff --git a/tests/output/basic/pages/this-is-a-test-hidden-page.html b/tests/output/basic/pages/this-is-a-test-hidden-page.html
new file mode 100644
index 00000000..4412d600
--- /dev/null
+++ b/tests/output/basic/pages/this-is-a-test-hidden-page.html
@@ -0,0 +1,70 @@
+
+
+
+ This is a test hidden page
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ This is a test hidden page
+
+ This is great for things like error(404) pages
+Anyone can see this page but it's not linked to anywhere!
+
+
+
+
+
+
+
+ Proudly powered by Pelican , which takes great advantage of Python .
+
+
+ The theme is by Smashing Magazine , thanks!
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/tests/output/basic/pages/this-is-a-test-page.html b/tests/output/basic/pages/this-is-a-test-page.html
index 0162232c..14a78a29 100644
--- a/tests/output/basic/pages/this-is-a-test-page.html
+++ b/tests/output/basic/pages/this-is-a-test-page.html
@@ -31,11 +31,11 @@
- content
+ bar
cat1
- bar
+ misc
yeah
diff --git a/tests/output/basic/second-article-fr.html b/tests/output/basic/second-article-fr.html
index 704971d2..a3701245 100644
--- a/tests/output/basic/second-article-fr.html
+++ b/tests/output/basic/second-article-fr.html
@@ -31,33 +31,38 @@
- content
+ bar
cat1
- bar
+ misc
yeah
-
-
-
-
-
-
+
+
+
+
+
+
+
Wed 29 February 2012
- By bruno
+ By Dummy Author
-In content .
+In misc .
tags: foo bar baz
@@ -67,12 +72,12 @@ Translations:
-
Ceci est un article, en français.
+
Ceci est un article, en français.
-
-
+
+
-
+
diff --git a/tests/output/basic/second-article.html b/tests/output/basic/second-article.html
index 94043446..cbae942b 100644
--- a/tests/output/basic/second-article.html
+++ b/tests/output/basic/second-article.html
@@ -31,33 +31,38 @@
- content
+ bar
cat1
- bar
+ misc
yeah
-
-
-
-
-
-
+
+
+
+
+
+
+
Wed 29 February 2012
- By bruno
+ By Dummy Author
-In content .
+In misc .
tags: foo bar baz
@@ -67,12 +72,12 @@ Translations:
-
This is some article, in english
+
This is some article, in english
-
-
+
+
-
+
diff --git a/tests/output/basic/tag/bar.html b/tests/output/basic/tag/bar.html
index 4afb4bfd..47a427cb 100644
--- a/tests/output/basic/tag/bar.html
+++ b/tests/output/basic/tag/bar.html
@@ -31,11 +31,11 @@
- content
+ bar
cat1
- bar
+ misc
yeah
@@ -49,7 +49,7 @@
-
+
Wed 29 February 2012
@@ -57,19 +57,19 @@
- By bruno
+ By Dummy Author
-In content .
+In misc .
tags: foo bar baz
Translations:
- en
+ fr
- Ceci est un article, en français.
+ This is some article, in english
@@ -83,7 +83,6 @@ Translations:
-
@@ -91,7 +90,8 @@ Translations:
@@ -102,28 +102,27 @@ Translations:
- By bruno
+ By Dummy Author
-
In content .
+
In misc .
tags: foo bar baz
Translations:
-
fr
+
en
-
This is some article, in english
+
Ceci est un article, en français.
-
read more
+
read more
-
@@ -131,7 +130,8 @@ Translations:
@@ -150,15 +150,15 @@ Translations:
- Multi-line metadata should be supported
-as well as
inline markup .
+
Multi-line metadata should be supported
+as well as inline markup .
+
read more
-
@@ -166,7 +166,8 @@ as well as
inline markup .
@@ -203,10 +204,10 @@ YEAH !
-
-
-
+
+
+
diff --git a/tests/output/basic/tag/baz.html b/tests/output/basic/tag/baz.html
index b8df58e3..d5c2904f 100644
--- a/tests/output/basic/tag/baz.html
+++ b/tests/output/basic/tag/baz.html
@@ -31,11 +31,11 @@
-
content
+
bar
cat1
-
bar
+
misc
yeah
@@ -49,7 +49,7 @@
-
+
Wed 29 February 2012
@@ -57,19 +57,19 @@
- By bruno
+ By Dummy Author
-In content .
+In misc .
tags: foo bar baz
Translations:
- en
+ fr
- Ceci est un article, en français.
+This is some article, in english
@@ -83,7 +83,6 @@ Translations:
-
@@ -91,7 +90,8 @@ Translations:
@@ -102,31 +102,31 @@ Translations:
- By bruno
+ By Dummy Author
-
In content .
+
In misc .
tags: foo bar baz
Translations:
-
fr
+
en
-
This is some article, in english
+
Ceci est un article, en français.
-
read more
+
read more
-
-
-
+
+
+
diff --git a/tests/output/basic/tag/foo.html b/tests/output/basic/tag/foo.html
index 20cf293a..ba5ee57d 100644
--- a/tests/output/basic/tag/foo.html
+++ b/tests/output/basic/tag/foo.html
@@ -31,11 +31,11 @@
- content
+ bar
cat1
- bar
+ misc
yeah
@@ -49,7 +49,7 @@
-
+
Wed 29 February 2012
@@ -57,19 +57,19 @@
- By bruno
+ By Dummy Author
-In content .
+In misc .
tags: foo bar baz
Translations:
- en
+ fr
- Ceci est un article, en français.
+This is some article, in english
@@ -83,7 +83,6 @@ Translations:
-
@@ -91,7 +90,8 @@ Translations:
@@ -102,28 +102,27 @@ Translations:
- By bruno
+ By Dummy Author
-
In content .
+
In misc .
tags: foo bar baz
Translations:
-
fr
+
en
-
This is some article, in english
+
Ceci est un article, en français.
-
read more
+
read more
-
@@ -131,7 +130,8 @@ Translations:
@@ -150,18 +150,19 @@ Translations:
- Multi-line metadata should be supported
-as well as
inline markup .
+
Multi-line metadata should be supported
+as well as inline markup .
+
read more
-
-
-
+
+
+
diff --git a/tests/output/basic/tag/foobar.html b/tests/output/basic/tag/foobar.html
index 0a5eeb3b..782a0128 100644
--- a/tests/output/basic/tag/foobar.html
+++ b/tests/output/basic/tag/foobar.html
@@ -31,11 +31,11 @@
- content
+ bar
cat1
- bar
+ misc
yeah
@@ -86,8 +86,8 @@
-
+
diff --git a/tests/output/basic/tag/oh.html b/tests/output/basic/tag/oh.html
index 563c0f2e..675e12cc 100644
--- a/tests/output/basic/tag/oh.html
+++ b/tests/output/basic/tag/oh.html
@@ -31,11 +31,11 @@
- content
+ bar
cat1
- bar
+ misc
yeah
@@ -85,8 +85,8 @@ YEAH !
-
+
diff --git a/tests/output/basic/tag/yeah.html b/tests/output/basic/tag/yeah.html
index 4b18b7e3..312523a0 100644
--- a/tests/output/basic/tag/yeah.html
+++ b/tests/output/basic/tag/yeah.html
@@ -31,11 +31,11 @@
- content
+ bar
cat1
- bar
+ misc
yeah
@@ -85,8 +85,8 @@ YEAH !
-
+
diff --git a/tests/output/basic/theme/css/main.css b/tests/output/basic/theme/css/main.css
index 28c98b99..dce9e247 100644
--- a/tests/output/basic/theme/css/main.css
+++ b/tests/output/basic/theme/css/main.css
@@ -111,6 +111,13 @@ cite {}
q {}
+div.note {
+ float: right;
+ margin: 5px;
+ font-size: 85%;
+ max-width: 300px;
+}
+
/* Tables */
table {margin: .5em auto 1.5em auto; width: 98%;}
@@ -305,6 +312,7 @@ img.left, figure.left {float: right; margin: 0 0 2em 2em;}
.social a[type$='atom+xml'], .social a[type$='rss+xml'] {background-image: url('../images/icons/rss.png');}
.social a[href*='twitter.com'] {background-image: url('../images/icons/twitter.png');}
.social a[href*='linkedin.com'] {background-image: url('../images/icons/linkedin.png');}
+ .social a[href*='gitorious.org'] {background-image: url('../images/icons/gitorious.org');}
/*
About
diff --git a/tests/output/basic/theme/css/wide.css b/tests/output/basic/theme/css/wide.css
index 3376f4c7..88fd59ce 100644
--- a/tests/output/basic/theme/css/wide.css
+++ b/tests/output/basic/theme/css/wide.css
@@ -4,13 +4,17 @@ body {
font:1.3em/1.3 "Hoefler Text","Georgia",Georgia,serif,sans-serif;
}
-.body, #banner nav, #banner nav ul, #about, #featured, #content{
- width: inherit;
+.post-info{
+ display: none;
}
#banner nav {
+ display: none;
-moz-border-radius: 0px;
- margin-bottom: 0px;
+ margin-bottom: 20px;
+ overflow: hidden;
+ font-size: 1em;
+ background: #F5F4EF;
}
#banner nav ul{
@@ -19,10 +23,11 @@ body {
#banner nav li{
float: right;
+ color: #000;
}
-#banner nav li:first-child a {
- -moz-border-radius: 0px;
+#banner nav li a {
+ color: #000;
}
#banner h1 {
diff --git a/tests/output/basic/theme/images/icons/facebook.png b/tests/output/basic/theme/images/icons/facebook.png
new file mode 100644
index 00000000..a7914b49
Binary files /dev/null and b/tests/output/basic/theme/images/icons/facebook.png differ
diff --git a/tests/output/basic/theme/images/icons/gitorious.png b/tests/output/basic/theme/images/icons/gitorious.png
new file mode 100644
index 00000000..6485f5ec
Binary files /dev/null and b/tests/output/basic/theme/images/icons/gitorious.png differ
diff --git a/tests/output/basic/this-is-a-super-article.html b/tests/output/basic/this-is-a-super-article.html
index cb12da2d..6b890f2a 100644
--- a/tests/output/basic/this-is-a-super-article.html
+++ b/tests/output/basic/this-is-a-super-article.html
@@ -31,23 +31,28 @@
- content
+ bar
cat1
- bar
+ misc
yeah
-
-
-
-
-
-
+
+
+
+
+
+
+
Thu 02 December 2010
@@ -62,7 +67,7 @@
-
Some content here !
+
Some content here !
This is a simple title
And here comes the cool stuff .
@@ -75,10 +80,10 @@
→ And now try with some utf8 hell: ééé
-
-
+
+
-
+
diff --git a/tests/output/basic/unbelievable.html b/tests/output/basic/unbelievable.html
index 4c6e6b07..3f9cc830 100644
--- a/tests/output/basic/unbelievable.html
+++ b/tests/output/basic/unbelievable.html
@@ -31,43 +31,48 @@
- content
+ bar
cat1
- bar
+ misc
yeah
-
-
-
-
-
-
+
+
+
+
+
+
+
Fri 15 October 2010
- By bruno
+ By Dummy Author
-In content .
+In misc .
-
Or completely awesome. Depends the needs.
+
Or completely awesome. Depends the needs.
-
-
+
+
-
+
diff --git a/tests/output/custom/a-markdown-powered-article.html b/tests/output/custom/a-markdown-powered-article.html
index c001278a..d3d0f53c 100644
--- a/tests/output/custom/a-markdown-powered-article.html
+++ b/tests/output/custom/a-markdown-powered-article.html
@@ -39,23 +39,28 @@
+ yeah
+
+ misc
+
cat1
bar
- yeah
-
- content
-
-
-
-
-
-
-
+
+
+
+
+
+
+
Wed 20 April 2011
@@ -70,24 +75,24 @@
-
You're mutually oblivious.
-
-
-
-
+ You're mutually oblivious.
+
+
+
+
-
+
diff --git a/tests/output/custom/archives.html b/tests/output/custom/archives.html
index e9393667..3be563df 100644
--- a/tests/output/custom/archives.html
+++ b/tests/output/custom/archives.html
@@ -39,14 +39,14 @@
+ yeah
+
+ misc
+
cat1
bar
- yeah
-
- content
-
@@ -56,28 +56,28 @@
Fri 15 October 2010
- Unbelievable !
+ Unbelievable !
Wed 20 October 2010
- Oh yeah !
+ Oh yeah !
Thu 02 December 2010
- This is a super article !
+ This is a super article !
Thu 17 February 2011
- Article 1
+ Article 1
Thu 17 February 2011
- Article 2
+ Article 2
Thu 17 February 2011
- Article 3
+ Article 3
Wed 20 April 2011
- A markdown powered article
+ A markdown powered article
Wed 29 February 2012
- Second article
+ Second article
diff --git a/tests/output/custom/article-1.html b/tests/output/custom/article-1.html
index 4bdb8f16..4402d227 100644
--- a/tests/output/custom/article-1.html
+++ b/tests/output/custom/article-1.html
@@ -39,23 +39,28 @@
+ yeah
+
+ misc
+
cat1
bar
- yeah
-
- content
-
-
-
-
-
-
-
+
+
+
+
+
+
+
Thu 17 February 2011
@@ -70,25 +75,25 @@
-
Article 1
+
Article 1
-
-
-
-
+
+
+
+
-
+
diff --git a/tests/output/custom/article-2.html b/tests/output/custom/article-2.html
index 6a0bb442..ec6a86c8 100644
--- a/tests/output/custom/article-2.html
+++ b/tests/output/custom/article-2.html
@@ -39,23 +39,28 @@
+ yeah
+
+ misc
+
cat1
bar
- yeah
-
- content
-
-
-
-
-
-
-
+
+
+
+
+
+
+
Thu 17 February 2011
@@ -70,25 +75,25 @@
-
Article 2
+
Article 2
-
-
-
-
+
+
+
+
-
+
diff --git a/tests/output/custom/article-3.html b/tests/output/custom/article-3.html
index 8410b4f9..0d39654c 100644
--- a/tests/output/custom/article-3.html
+++ b/tests/output/custom/article-3.html
@@ -39,23 +39,28 @@
+ yeah
+
+ misc
+
cat1
bar
- yeah
-
- content
-
-
-
-
-
-
-
+
+
+
+
+
+
+
Thu 17 February 2011
@@ -70,25 +75,25 @@
-
Article 3
+
Article 3
-
-
-
-
+
+
+
+
-
+
diff --git a/tests/output/custom/author/alexis-metaireau.html b/tests/output/custom/author/alexis-metaireau.html
index 1a373e5d..b60a01ef 100644
--- a/tests/output/custom/author/alexis-metaireau.html
+++ b/tests/output/custom/author/alexis-metaireau.html
@@ -39,14 +39,14 @@
+ yeah
+
+ misc
+
cat1
bar
- yeah
-
- content
-
@@ -85,7 +85,6 @@
-
@@ -93,7 +92,8 @@
@@ -120,7 +120,6 @@
-
@@ -128,7 +127,8 @@
@@ -155,7 +155,6 @@
-
@@ -163,7 +162,8 @@
@@ -190,7 +190,9 @@
+
+
Page 1 / 2
@@ -199,9 +201,7 @@
-
-
-
+
diff --git a/tests/output/custom/author/alexis-metaireau2.html b/tests/output/custom/author/alexis-metaireau2.html
index 43ded360..cbf4387b 100644
--- a/tests/output/custom/author/alexis-metaireau2.html
+++ b/tests/output/custom/author/alexis-metaireau2.html
@@ -39,14 +39,14 @@
+
yeah
+
+
misc
+
cat1
bar
-
yeah
-
-
content
-
@@ -61,7 +61,8 @@
@@ -98,7 +99,6 @@ YEAH !
-
@@ -106,7 +106,8 @@ YEAH !
@@ -120,7 +121,7 @@ YEAH !
By
Alexis Métaireau
-
In content .
+
In misc .
tags: foo bar baz
@@ -138,7 +139,6 @@ Translations:
-
@@ -146,7 +146,8 @@ Translations:
@@ -165,15 +166,15 @@ Translations:
- Multi-line metadata should be supported
-as well as
inline markup .
+
Multi-line metadata should be supported
+as well as inline markup .
+
read more
There are comments .
-
@@ -181,7 +182,8 @@ as well as
inline markup .
@@ -195,7 +197,7 @@ as well as
inline markup .
By
Alexis Métaireau
-
In content .
+
In misc .
@@ -208,7 +210,9 @@ as well as
inline markup .
+
+
@@ -219,9 +223,7 @@ as well as inline markup .
-
-
-
+
diff --git a/tests/output/custom/categories.html b/tests/output/custom/categories.html
index a1a44e5b..74f1c16b 100644
--- a/tests/output/custom/categories.html
+++ b/tests/output/custom/categories.html
@@ -39,26 +39,26 @@
+
yeah
+
+
misc
+
cat1
bar
-
yeah
-
-
content
-
diff --git a/tests/output/custom/category/bar.html b/tests/output/custom/category/bar.html
index 809a2bdf..7860bd15 100644
--- a/tests/output/custom/category/bar.html
+++ b/tests/output/custom/category/bar.html
@@ -39,14 +39,14 @@
+
yeah
+
+
misc
+
cat1
bar
-
yeah
-
-
content
-
@@ -99,8 +99,8 @@ YEAH !
-
+
diff --git a/tests/output/custom/category/cat1.html b/tests/output/custom/category/cat1.html
index fa6c6556..b01c1ad6 100644
--- a/tests/output/custom/category/cat1.html
+++ b/tests/output/custom/category/cat1.html
@@ -39,14 +39,14 @@
+
yeah
+
+
misc
+
cat1
bar
-
yeah
-
-
content
-
@@ -85,7 +85,6 @@
-
@@ -93,7 +92,8 @@
@@ -120,7 +120,6 @@
-
@@ -128,7 +127,8 @@
@@ -155,7 +155,6 @@
-
@@ -163,7 +162,8 @@
@@ -190,16 +190,16 @@
+
+
Page 1 / 1
-
-
-
+
diff --git a/tests/output/custom/category/content.html b/tests/output/custom/category/misc.html
similarity index 94%
rename from tests/output/custom/category/content.html
rename to tests/output/custom/category/misc.html
index 16651436..0161b441 100644
--- a/tests/output/custom/category/content.html
+++ b/tests/output/custom/category/misc.html
@@ -1,7 +1,7 @@
-
Alexis' log - content
+
Alexis' log - misc
@@ -39,14 +39,14 @@
+
yeah
+
+
misc
+
cat1
bar
-
yeah
-
-
content
-
@@ -68,7 +68,7 @@
By
Alexis Métaireau
-
In content .
+
In misc .
tags: foo bar baz
@@ -91,7 +91,6 @@ Translations:
-
@@ -99,7 +98,8 @@ Translations:
@@ -113,7 +113,7 @@ Translations:
By
Alexis Métaireau
-
In content .
+
In misc .
@@ -126,16 +126,16 @@ Translations:
+
+
Page 1 / 1
-
-
-
+
diff --git a/tests/output/custom/category/yeah.html b/tests/output/custom/category/yeah.html
index 3c9af4e2..27e929c4 100644
--- a/tests/output/custom/category/yeah.html
+++ b/tests/output/custom/category/yeah.html
@@ -39,14 +39,14 @@
+
yeah
+
+
misc
+
cat1
bar
-
yeah
-
-
content
-
@@ -100,8 +100,8 @@
-
+
diff --git a/tests/output/custom/drafts/a-draft-article.html b/tests/output/custom/drafts/a-draft-article.html
index 99f5ad68..35264ed6 100644
--- a/tests/output/custom/drafts/a-draft-article.html
+++ b/tests/output/custom/drafts/a-draft-article.html
@@ -39,23 +39,28 @@
+
yeah
+
+
misc
+
cat1
bar
-
yeah
-
-
content
-
-
-
-
-
-
-
+
+
+
+
+
+
+
Fri 02 March 2012
@@ -65,31 +70,31 @@
By Alexis Métaireau
-In content .
+In misc .
-
This is a draft article, it should live under the /drafts/ folder and not be
+
This is a draft article, it should live under the /drafts/ folder and not be
listed anywhere else.
-
-
-
-
+
+
+
+
-
+
diff --git a/tests/output/custom/feeds/all-en.atom.xml b/tests/output/custom/feeds/all-en.atom.xml
index 7356cb17..db5fc2de 100644
--- a/tests/output/custom/feeds/all-en.atom.xml
+++ b/tests/output/custom/feeds/all-en.atom.xml
@@ -1,9 +1,9 @@
-Alexis' log http://blog.notmyidea.org 2012-02-29T00:00:00+01:00 Second article 2012-02-29T00:00:00+01:00 Alexis Métaireau http://blog.notmyidea.org/second-article.html <p>This is some article, in english</p>
- A markdown powered article 2011-04-20T00:00:00+02:00 Alexis Métaireau http://blog.notmyidea.org/a-markdown-powered-article.html <p>You're mutually oblivious.</p> Article 1 2011-02-17T00:00:00+01:00 Alexis Métaireau http://blog.notmyidea.org/article-1.html <p>Article 1</p>
- Article 2 2011-02-17T00:00:00+01:00 Alexis Métaireau http://blog.notmyidea.org/article-2.html <p>Article 2</p>
- Article 3 2011-02-17T00:00:00+01:00 Alexis Métaireau http://blog.notmyidea.org/article-3.html <p>Article 3</p>
- This is a super article ! 2010-12-02T10:14:00+01:00 Alexis Métaireau http://blog.notmyidea.org/this-is-a-super-article.html <p>Some content here !</p>
+Alexis' log http://blog.notmyidea.org/ 2012-02-29T00:00:00+01:00 Second article 2012-02-29T00:00:00+01:00 Alexis Métaireau tag:blog.notmyidea.org,2012-02-29:second-article.html <p>This is some article, in english</p>
+ A markdown powered article 2011-04-20T00:00:00+02:00 Alexis Métaireau tag:blog.notmyidea.org,2011-04-20:a-markdown-powered-article.html <p>You're mutually oblivious.</p> Article 1 2011-02-17T00:00:00+01:00 Alexis Métaireau tag:blog.notmyidea.org,2011-02-17:article-1.html <p>Article 1</p>
+ Article 2 2011-02-17T00:00:00+01:00 Alexis Métaireau tag:blog.notmyidea.org,2011-02-17:article-2.html <p>Article 2</p>
+ Article 3 2011-02-17T00:00:00+01:00 Alexis Métaireau tag:blog.notmyidea.org,2011-02-17:article-3.html <p>Article 3</p>
+ This is a super article ! 2010-12-02T10:14:00+01:00 Alexis Métaireau tag:blog.notmyidea.org,2010-12-02:this-is-a-super-article.html <p>Some content here !</p>
<div class="section" id="this-is-a-simple-title">
<h2>This is a simple title</h2>
<p>And here comes the cool <a class="reference external" href="http://books.couchdb.org/relax/design-documents/views">stuff</a>.</p>
@@ -15,11 +15,11 @@
</pre>
<p>→ And now try with some utf8 hell: ééé</p>
</div>
- Oh yeah ! 2010-10-20T10:14:00+02:00 Alexis Métaireau http://blog.notmyidea.org/oh-yeah.html <div class="section" id="why-not">
+ Oh yeah ! 2010-10-20T10:14:00+02:00 Alexis Métaireau tag:blog.notmyidea.org,2010-10-20:oh-yeah.html <div class="section" id="why-not">
<h2>Why not ?</h2>
<p>After all, why not ? It's pretty simple to do it, and it will allow me to write my blogposts in rst !
YEAH !</p>
<img alt="alternate text" src="pictures/Sushi.jpg" style="width: 600px; height: 450px;" />
</div>
- Unbelievable ! 2010-10-15T20:30:00+02:00 Alexis Métaireau http://blog.notmyidea.org/unbelievable.html <p>Or completely awesome. Depends the needs.</p>
+ Unbelievable ! 2010-10-15T20:30:00+02:00 Alexis Métaireau tag:blog.notmyidea.org,2010-10-15:unbelievable.html <p>Or completely awesome. Depends the needs.</p>
\ No newline at end of file
diff --git a/tests/output/custom/feeds/all-fr.atom.xml b/tests/output/custom/feeds/all-fr.atom.xml
index 27949d80..5d58742c 100644
--- a/tests/output/custom/feeds/all-fr.atom.xml
+++ b/tests/output/custom/feeds/all-fr.atom.xml
@@ -1,4 +1,4 @@
-Alexis' log http://blog.notmyidea.org 2012-03-02T14:01:01+01:00 Trop bien ! 2012-03-02T14:01:01+01:00 Alexis Métaireau http://blog.notmyidea.org/oh-yeah-fr.html <p>Et voila du contenu en français</p>
- Deuxième article 2012-02-29T00:00:00+01:00 Alexis Métaireau http://blog.notmyidea.org/second-article-fr.html <p>Ceci est un article, en français.</p>
+Alexis' log http://blog.notmyidea.org/ 2012-03-02T14:01:01+01:00 Trop bien ! 2012-03-02T14:01:01+01:00 Alexis Métaireau tag:blog.notmyidea.org,2012-03-02:oh-yeah-fr.html <p>Et voila du contenu en français</p>
+ Deuxième article 2012-02-29T00:00:00+01:00 Alexis Métaireau tag:blog.notmyidea.org,2012-02-29:second-article-fr.html <p>Ceci est un article, en français.</p>
\ No newline at end of file
diff --git a/tests/output/custom/feeds/all.atom.xml b/tests/output/custom/feeds/all.atom.xml
index ef6dbf52..8df5bbdb 100644
--- a/tests/output/custom/feeds/all.atom.xml
+++ b/tests/output/custom/feeds/all.atom.xml
@@ -1,9 +1,9 @@
-Alexis' log http://blog.notmyidea.org 2012-02-29T00:00:00+01:00 Second article 2012-02-29T00:00:00+01:00 Alexis Métaireau http://blog.notmyidea.org/second-article.html <p>This is some article, in english</p>
- A markdown powered article 2011-04-20T00:00:00+02:00 Alexis Métaireau http://blog.notmyidea.org/a-markdown-powered-article.html <p>You're mutually oblivious.</p> Article 1 2011-02-17T00:00:00+01:00 Alexis Métaireau http://blog.notmyidea.org/article-1.html <p>Article 1</p>
- Article 2 2011-02-17T00:00:00+01:00 Alexis Métaireau http://blog.notmyidea.org/article-2.html <p>Article 2</p>
- Article 3 2011-02-17T00:00:00+01:00 Alexis Métaireau http://blog.notmyidea.org/article-3.html <p>Article 3</p>
- This is a super article ! 2010-12-02T10:14:00+01:00 Alexis Métaireau http://blog.notmyidea.org/this-is-a-super-article.html <p>Some content here !</p>
+Alexis' log http://blog.notmyidea.org/ 2012-02-29T00:00:00+01:00 Second article 2012-02-29T00:00:00+01:00 Alexis Métaireau tag:blog.notmyidea.org,2012-02-29:second-article.html <p>This is some article, in english</p>
+ A markdown powered article 2011-04-20T00:00:00+02:00 Alexis Métaireau tag:blog.notmyidea.org,2011-04-20:a-markdown-powered-article.html <p>You're mutually oblivious.</p> Article 1 2011-02-17T00:00:00+01:00 Alexis Métaireau tag:blog.notmyidea.org,2011-02-17:article-1.html <p>Article 1</p>
+ Article 2 2011-02-17T00:00:00+01:00 Alexis Métaireau tag:blog.notmyidea.org,2011-02-17:article-2.html <p>Article 2</p>
+ Article 3 2011-02-17T00:00:00+01:00 Alexis Métaireau tag:blog.notmyidea.org,2011-02-17:article-3.html <p>Article 3</p>
+ This is a super article ! 2010-12-02T10:14:00+01:00 Alexis Métaireau tag:blog.notmyidea.org,2010-12-02:this-is-a-super-article.html <p>Some content here !</p>
<div class="section" id="this-is-a-simple-title">
<h2>This is a simple title</h2>
<p>And here comes the cool <a class="reference external" href="http://books.couchdb.org/relax/design-documents/views">stuff</a>.</p>
@@ -15,11 +15,11 @@
</pre>
<p>→ And now try with some utf8 hell: ééé</p>
</div>
- Oh yeah ! 2010-10-20T10:14:00+02:00 Alexis Métaireau http://blog.notmyidea.org/oh-yeah.html <div class="section" id="why-not">
+ Oh yeah ! 2010-10-20T10:14:00+02:00 Alexis Métaireau tag:blog.notmyidea.org,2010-10-20:oh-yeah.html <div class="section" id="why-not">
<h2>Why not ?</h2>
<p>After all, why not ? It's pretty simple to do it, and it will allow me to write my blogposts in rst !
YEAH !</p>
<img alt="alternate text" src="pictures/Sushi.jpg" style="width: 600px; height: 450px;" />
</div>
- Unbelievable ! 2010-10-15T20:30:00+02:00 Alexis Métaireau http://blog.notmyidea.org/unbelievable.html <p>Or completely awesome. Depends the needs.</p>
+ Unbelievable ! 2010-10-15T20:30:00+02:00 Alexis Métaireau tag:blog.notmyidea.org,2010-10-15:unbelievable.html <p>Or completely awesome. Depends the needs.</p>
\ No newline at end of file
diff --git a/tests/output/custom/feeds/all.rss.xml b/tests/output/custom/feeds/all.rss.xml
index a3f7eff9..a8be2152 100644
--- a/tests/output/custom/feeds/all.rss.xml
+++ b/tests/output/custom/feeds/all.rss.xml
@@ -1,9 +1,9 @@
-Alexis' log http://blog.notmyidea.orgWed, 29 Feb 2012 00:00:00 +0100 Second article http://blog.notmyidea.org/second-article.html<p>This is some article, in english</p>
- Alexis Métaireau Wed, 29 Feb 2012 00:00:00 +0100 http://blog.notmyidea.org/second-article.html foo bar baz A markdown powered article http://blog.notmyidea.org/a-markdown-powered-article.html<p>You're mutually oblivious.</p> Alexis Métaireau Wed, 20 Apr 2011 00:00:00 +0200 http://blog.notmyidea.org/a-markdown-powered-article.html Article 1 http://blog.notmyidea.org/article-1.html<p>Article 1</p>
- Alexis Métaireau Thu, 17 Feb 2011 00:00:00 +0100 http://blog.notmyidea.org/article-1.html Article 2 http://blog.notmyidea.org/article-2.html<p>Article 2</p>
- Alexis Métaireau Thu, 17 Feb 2011 00:00:00 +0100 http://blog.notmyidea.org/article-2.html Article 3 http://blog.notmyidea.org/article-3.html<p>Article 3</p>
- Alexis Métaireau Thu, 17 Feb 2011 00:00:00 +0100 http://blog.notmyidea.org/article-3.html This is a super article ! http://blog.notmyidea.org/this-is-a-super-article.html<p>Some content here !</p>
+Alexis' log http://blog.notmyidea.org/Wed, 29 Feb 2012 00:00:00 +0100 Second article http://blog.notmyidea.org/second-article.html<p>This is some article, in english</p>
+ Alexis Métaireau Wed, 29 Feb 2012 00:00:00 +0100 tag:blog.notmyidea.org,2012-02-29:second-article.html foo bar baz A markdown powered article http://blog.notmyidea.org/a-markdown-powered-article.html<p>You're mutually oblivious.</p> Alexis Métaireau Wed, 20 Apr 2011 00:00:00 +0200 tag:blog.notmyidea.org,2011-04-20:a-markdown-powered-article.html Article 1 http://blog.notmyidea.org/article-1.html<p>Article 1</p>
+ Alexis Métaireau Thu, 17 Feb 2011 00:00:00 +0100 tag:blog.notmyidea.org,2011-02-17:article-1.html Article 2 http://blog.notmyidea.org/article-2.html<p>Article 2</p>
+ Alexis Métaireau Thu, 17 Feb 2011 00:00:00 +0100 tag:blog.notmyidea.org,2011-02-17:article-2.html Article 3 http://blog.notmyidea.org/article-3.html<p>Article 3</p>
+ Alexis Métaireau Thu, 17 Feb 2011 00:00:00 +0100 tag:blog.notmyidea.org,2011-02-17:article-3.html This is a super article ! http://blog.notmyidea.org/this-is-a-super-article.html<p>Some content here !</p>
<div class="section" id="this-is-a-simple-title">
<h2>This is a simple title</h2>
<p>And here comes the cool <a class="reference external" href="http://books.couchdb.org/relax/design-documents/views">stuff</a>.</p>
@@ -15,11 +15,11 @@
</pre>
<p>→ And now try with some utf8 hell: ééé</p>
</div>
- Alexis Métaireau Thu, 02 Dec 2010 10:14:00 +0100 http://blog.notmyidea.org/this-is-a-super-article.html foo bar foobar Oh yeah ! http://blog.notmyidea.org/oh-yeah.html<div class="section" id="why-not">
+ Alexis Métaireau Thu, 02 Dec 2010 10:14:00 +0100 tag:blog.notmyidea.org,2010-12-02:this-is-a-super-article.html foo bar foobar Oh yeah ! http://blog.notmyidea.org/oh-yeah.html<div class="section" id="why-not">
<h2>Why not ?</h2>
<p>After all, why not ? It's pretty simple to do it, and it will allow me to write my blogposts in rst !
YEAH !</p>
<img alt="alternate text" src="pictures/Sushi.jpg" style="width: 600px; height: 450px;" />
</div>
- Alexis Métaireau Wed, 20 Oct 2010 10:14:00 +0200 http://blog.notmyidea.org/oh-yeah.html oh bar yeah Unbelievable ! http://blog.notmyidea.org/unbelievable.html<p>Or completely awesome. Depends the needs.</p>
- Alexis Métaireau Fri, 15 Oct 2010 20:30:00 +0200 http://blog.notmyidea.org/unbelievable.html
\ No newline at end of file
+ Alexis Métaireau Wed, 20 Oct 2010 10:14:00 +0200 tag:blog.notmyidea.org,2010-10-20:oh-yeah.html oh bar yeah Unbelievable ! http://blog.notmyidea.org/unbelievable.html<p>Or completely awesome. Depends the needs.</p>
+ Alexis Métaireau Fri, 15 Oct 2010 20:30:00 +0200 tag:blog.notmyidea.org,2010-10-15:unbelievable.html
\ No newline at end of file
diff --git a/tests/output/custom/feeds/bar.atom.xml b/tests/output/custom/feeds/bar.atom.xml
index 84ac9cda..9b29f6c9 100644
--- a/tests/output/custom/feeds/bar.atom.xml
+++ b/tests/output/custom/feeds/bar.atom.xml
@@ -1,5 +1,5 @@
-Alexis' log http://blog.notmyidea.org 2010-10-20T10:14:00+02:00 Oh yeah ! 2010-10-20T10:14:00+02:00 Alexis Métaireau http://blog.notmyidea.org/oh-yeah.html <div class="section" id="why-not">
+Alexis' log http://blog.notmyidea.org/ 2010-10-20T10:14:00+02:00 Oh yeah ! 2010-10-20T10:14:00+02:00 Alexis Métaireau tag:blog.notmyidea.org,2010-10-20:oh-yeah.html <div class="section" id="why-not">
<h2>Why not ?</h2>
<p>After all, why not ? It's pretty simple to do it, and it will allow me to write my blogposts in rst !
YEAH !</p>
diff --git a/tests/output/custom/feeds/bar.rss.xml b/tests/output/custom/feeds/bar.rss.xml
index bb5cb2b4..c958edbf 100644
--- a/tests/output/custom/feeds/bar.rss.xml
+++ b/tests/output/custom/feeds/bar.rss.xml
@@ -1,8 +1,8 @@
-Alexis' log http://blog.notmyidea.orgWed, 20 Oct 2010 10:14:00 +0200 Oh yeah ! http://blog.notmyidea.org/oh-yeah.html<div class="section" id="why-not">
+Alexis' log http://blog.notmyidea.org/Wed, 20 Oct 2010 10:14:00 +0200 Oh yeah ! http://blog.notmyidea.org/oh-yeah.html<div class="section" id="why-not">
<h2>Why not ?</h2>
<p>After all, why not ? It's pretty simple to do it, and it will allow me to write my blogposts in rst !
YEAH !</p>
<img alt="alternate text" src="pictures/Sushi.jpg" style="width: 600px; height: 450px;" />
</div>
- Alexis Métaireau Wed, 20 Oct 2010 10:14:00 +0200 http://blog.notmyidea.org/oh-yeah.html oh bar yeah
\ No newline at end of file
+ Alexis Métaireau Wed, 20 Oct 2010 10:14:00 +0200 tag:blog.notmyidea.org,2010-10-20:oh-yeah.html oh bar yeah
\ No newline at end of file
diff --git a/tests/output/custom/feeds/cat1.atom.xml b/tests/output/custom/feeds/cat1.atom.xml
index e0f01780..72703065 100644
--- a/tests/output/custom/feeds/cat1.atom.xml
+++ b/tests/output/custom/feeds/cat1.atom.xml
@@ -1,5 +1,5 @@
-Alexis' log http://blog.notmyidea.org 2011-04-20T00:00:00+02:00 A markdown powered article 2011-04-20T00:00:00+02:00 Alexis Métaireau http://blog.notmyidea.org/a-markdown-powered-article.html <p>You're mutually oblivious.</p> Article 1 2011-02-17T00:00:00+01:00 Alexis Métaireau http://blog.notmyidea.org/article-1.html <p>Article 1</p>
- Article 2 2011-02-17T00:00:00+01:00 Alexis Métaireau http://blog.notmyidea.org/article-2.html <p>Article 2</p>
- Article 3 2011-02-17T00:00:00+01:00 Alexis Métaireau http://blog.notmyidea.org/article-3.html <p>Article 3</p>
+Alexis' log http://blog.notmyidea.org/ 2011-04-20T00:00:00+02:00 A markdown powered article 2011-04-20T00:00:00+02:00 Alexis Métaireau tag:blog.notmyidea.org,2011-04-20:a-markdown-powered-article.html <p>You're mutually oblivious.</p> Article 1 2011-02-17T00:00:00+01:00 Alexis Métaireau tag:blog.notmyidea.org,2011-02-17:article-1.html <p>Article 1</p>
+ Article 2 2011-02-17T00:00:00+01:00 Alexis Métaireau tag:blog.notmyidea.org,2011-02-17:article-2.html <p>Article 2</p>
+ Article 3 2011-02-17T00:00:00+01:00 Alexis Métaireau tag:blog.notmyidea.org,2011-02-17:article-3.html <p>Article 3</p>
\ No newline at end of file
diff --git a/tests/output/custom/feeds/cat1.rss.xml b/tests/output/custom/feeds/cat1.rss.xml
index 0043b2fb..f5871487 100644
--- a/tests/output/custom/feeds/cat1.rss.xml
+++ b/tests/output/custom/feeds/cat1.rss.xml
@@ -1,5 +1,5 @@
-Alexis' log http://blog.notmyidea.orgWed, 20 Apr 2011 00:00:00 +0200 A markdown powered article http://blog.notmyidea.org/a-markdown-powered-article.html<p>You're mutually oblivious.</p> Alexis Métaireau Wed, 20 Apr 2011 00:00:00 +0200 http://blog.notmyidea.org/a-markdown-powered-article.html Article 1 http://blog.notmyidea.org/article-1.html<p>Article 1</p>
- Alexis Métaireau Thu, 17 Feb 2011 00:00:00 +0100 http://blog.notmyidea.org/article-1.html Article 2 http://blog.notmyidea.org/article-2.html<p>Article 2</p>
- Alexis Métaireau Thu, 17 Feb 2011 00:00:00 +0100 http://blog.notmyidea.org/article-2.html Article 3 http://blog.notmyidea.org/article-3.html<p>Article 3</p>
- Alexis Métaireau Thu, 17 Feb 2011 00:00:00 +0100 http://blog.notmyidea.org/article-3.html
\ No newline at end of file
+Alexis' log http://blog.notmyidea.org/Wed, 20 Apr 2011 00:00:00 +0200 A markdown powered article http://blog.notmyidea.org/a-markdown-powered-article.html<p>You're mutually oblivious.</p> Alexis Métaireau Wed, 20 Apr 2011 00:00:00 +0200 tag:blog.notmyidea.org,2011-04-20:a-markdown-powered-article.html Article 1 http://blog.notmyidea.org/article-1.html<p>Article 1</p>
+ Alexis Métaireau Thu, 17 Feb 2011 00:00:00 +0100 tag:blog.notmyidea.org,2011-02-17:article-1.html Article 2 http://blog.notmyidea.org/article-2.html<p>Article 2</p>
+ Alexis Métaireau Thu, 17 Feb 2011 00:00:00 +0100 tag:blog.notmyidea.org,2011-02-17:article-2.html Article 3 http://blog.notmyidea.org/article-3.html<p>Article 3</p>
+ Alexis Métaireau Thu, 17 Feb 2011 00:00:00 +0100 tag:blog.notmyidea.org,2011-02-17:article-3.html
\ No newline at end of file
diff --git a/tests/output/custom/feeds/content.atom.xml b/tests/output/custom/feeds/content.atom.xml
deleted file mode 100644
index c141a0aa..00000000
--- a/tests/output/custom/feeds/content.atom.xml
+++ /dev/null
@@ -1,4 +0,0 @@
-
-Alexis' log http://blog.notmyidea.org 2012-02-29T00:00:00+01:00 Second article 2012-02-29T00:00:00+01:00 Alexis Métaireau http://blog.notmyidea.org/second-article.html <p>This is some article, in english</p>
- Unbelievable ! 2010-10-15T20:30:00+02:00 Alexis Métaireau http://blog.notmyidea.org/unbelievable.html <p>Or completely awesome. Depends the needs.</p>
-
\ No newline at end of file
diff --git a/tests/output/custom/feeds/content.rss.xml b/tests/output/custom/feeds/content.rss.xml
deleted file mode 100644
index 9f36c97e..00000000
--- a/tests/output/custom/feeds/content.rss.xml
+++ /dev/null
@@ -1,4 +0,0 @@
-
-Alexis' log http://blog.notmyidea.orgWed, 29 Feb 2012 00:00:00 +0100 Second article http://blog.notmyidea.org/second-article.html<p>This is some article, in english</p>
- Alexis Métaireau Wed, 29 Feb 2012 00:00:00 +0100 http://blog.notmyidea.org/second-article.html foo bar baz Unbelievable ! http://blog.notmyidea.org/unbelievable.html<p>Or completely awesome. Depends the needs.</p>
- Alexis Métaireau Fri, 15 Oct 2010 20:30:00 +0200 http://blog.notmyidea.org/unbelievable.html
\ No newline at end of file
diff --git a/tests/output/custom/feeds/misc.atom.xml b/tests/output/custom/feeds/misc.atom.xml
new file mode 100644
index 00000000..cce84da9
--- /dev/null
+++ b/tests/output/custom/feeds/misc.atom.xml
@@ -0,0 +1,4 @@
+
+Alexis' log http://blog.notmyidea.org/ 2012-02-29T00:00:00+01:00 Second article 2012-02-29T00:00:00+01:00 Alexis Métaireau tag:blog.notmyidea.org,2012-02-29:second-article.html <p>This is some article, in english</p>
+ Unbelievable ! 2010-10-15T20:30:00+02:00 Alexis Métaireau tag:blog.notmyidea.org,2010-10-15:unbelievable.html <p>Or completely awesome. Depends the needs.</p>
+
\ No newline at end of file
diff --git a/tests/output/custom/feeds/misc.rss.xml b/tests/output/custom/feeds/misc.rss.xml
new file mode 100644
index 00000000..938bce29
--- /dev/null
+++ b/tests/output/custom/feeds/misc.rss.xml
@@ -0,0 +1,4 @@
+
+Alexis' log http://blog.notmyidea.org/Wed, 29 Feb 2012 00:00:00 +0100 Second article http://blog.notmyidea.org/second-article.html<p>This is some article, in english</p>
+ Alexis Métaireau Wed, 29 Feb 2012 00:00:00 +0100 tag:blog.notmyidea.org,2012-02-29:second-article.html foo bar baz Unbelievable ! http://blog.notmyidea.org/unbelievable.html<p>Or completely awesome. Depends the needs.</p>
+ Alexis Métaireau Fri, 15 Oct 2010 20:30:00 +0200 tag:blog.notmyidea.org,2010-10-15:unbelievable.html
\ No newline at end of file
diff --git a/tests/output/custom/feeds/yeah.atom.xml b/tests/output/custom/feeds/yeah.atom.xml
index 4c6eed49..802f6329 100644
--- a/tests/output/custom/feeds/yeah.atom.xml
+++ b/tests/output/custom/feeds/yeah.atom.xml
@@ -1,5 +1,5 @@
-Alexis' log http://blog.notmyidea.org 2010-12-02T10:14:00+01:00 This is a super article ! 2010-12-02T10:14:00+01:00 Alexis Métaireau http://blog.notmyidea.org/this-is-a-super-article.html <p>Some content here !</p>
+Alexis' log http://blog.notmyidea.org/ 2010-12-02T10:14:00+01:00 This is a super article ! 2010-12-02T10:14:00+01:00 Alexis Métaireau tag:blog.notmyidea.org,2010-12-02:this-is-a-super-article.html <p>Some content here !</p>
<div class="section" id="this-is-a-simple-title">
<h2>This is a simple title</h2>
<p>And here comes the cool <a class="reference external" href="http://books.couchdb.org/relax/design-documents/views">stuff</a>.</p>
diff --git a/tests/output/custom/feeds/yeah.rss.xml b/tests/output/custom/feeds/yeah.rss.xml
index c4f5512e..68e96cf9 100644
--- a/tests/output/custom/feeds/yeah.rss.xml
+++ b/tests/output/custom/feeds/yeah.rss.xml
@@ -1,5 +1,5 @@
-Alexis' log http://blog.notmyidea.orgThu, 02 Dec 2010 10:14:00 +0100 This is a super article ! http://blog.notmyidea.org/this-is-a-super-article.html<p>Some content here !</p>
+Alexis' log http://blog.notmyidea.org/Thu, 02 Dec 2010 10:14:00 +0100 This is a super article ! http://blog.notmyidea.org/this-is-a-super-article.html<p>Some content here !</p>
<div class="section" id="this-is-a-simple-title">
<h2>This is a simple title</h2>
<p>And here comes the cool <a class="reference external" href="http://books.couchdb.org/relax/design-documents/views">stuff</a>.</p>
@@ -11,4 +11,4 @@
</pre>
<p>→ And now try with some utf8 hell: ééé</p>
</div>
- Alexis Métaireau Thu, 02 Dec 2010 10:14:00 +0100 http://blog.notmyidea.org/this-is-a-super-article.html foo bar foobar
\ No newline at end of file
+ Alexis Métaireau Thu, 02 Dec 2010 10:14:00 +0100 tag:blog.notmyidea.org,2010-12-02:this-is-a-super-article.html foo bar foobar
\ No newline at end of file
diff --git a/tests/output/custom/index.html b/tests/output/custom/index.html
index 466a4db4..79882019 100644
--- a/tests/output/custom/index.html
+++ b/tests/output/custom/index.html
@@ -39,14 +39,14 @@
+ yeah
+
+ misc
+
cat1
bar
- yeah
-
- content
-
@@ -68,7 +68,7 @@
By Alexis Métaireau
-In content .
+In misc .
tags: foo bar baz
@@ -91,7 +91,6 @@ Translations:
-
@@ -99,7 +98,8 @@ Translations:
@@ -125,7 +125,6 @@ Translations:
-
@@ -133,7 +132,8 @@ Translations:
@@ -160,7 +160,6 @@ Translations:
-
@@ -168,7 +167,8 @@ Translations:
@@ -195,7 +195,9 @@ Translations:
+
+
Page 1 / 2
@@ -204,9 +206,7 @@ Translations:
-
-
-
+
diff --git a/tests/output/custom/index2.html b/tests/output/custom/index2.html
index 9262d717..d6079fd9 100644
--- a/tests/output/custom/index2.html
+++ b/tests/output/custom/index2.html
@@ -39,14 +39,14 @@
+
yeah
+
+
misc
+
cat1
bar
-
yeah
-
-
content
-
@@ -61,7 +61,8 @@
@@ -88,7 +89,6 @@
-
@@ -96,7 +96,8 @@
@@ -115,15 +116,15 @@
- Multi-line metadata should be supported
-as well as
inline markup .
+
Multi-line metadata should be supported
+as well as inline markup .
+
read more
There are comments .
-
@@ -131,7 +132,8 @@ as well as
inline markup .
@@ -168,7 +170,6 @@ YEAH !
-
@@ -176,7 +177,8 @@ YEAH !
@@ -190,7 +192,7 @@ YEAH !
By
Alexis Métaireau
-
In content .
+
In misc .
@@ -203,7 +205,9 @@ YEAH !
+
+
@@ -214,9 +218,7 @@ YEAH !
-
-
-
+
diff --git a/tests/output/custom/oh-yeah-fr.html b/tests/output/custom/oh-yeah-fr.html
index e692105b..25f67032 100644
--- a/tests/output/custom/oh-yeah-fr.html
+++ b/tests/output/custom/oh-yeah-fr.html
@@ -39,23 +39,28 @@
+
yeah
+
+
misc
+
cat1
bar
-
yeah
-
-
content
-
-
-
-
-
-
-
+
+
+
+
+
+
+
Fri 02 March 2012
@@ -65,7 +70,7 @@
By Alexis Métaireau
-In content .
+In misc .
@@ -75,25 +80,25 @@ Translations:
-
Et voila du contenu en français
+
Et voila du contenu en français
-
-
-
-
+
+
+
+
-
+
diff --git a/tests/output/custom/oh-yeah.html b/tests/output/custom/oh-yeah.html
index 6ffaad13..fc635dc7 100644
--- a/tests/output/custom/oh-yeah.html
+++ b/tests/output/custom/oh-yeah.html
@@ -39,23 +39,28 @@
+ yeah
+
+ misc
+
cat1
bar
- yeah
-
- content
-
-
-
-
-
-
-
+
+
+
+
+
+
+
Wed 20 October 2010
@@ -75,30 +80,30 @@ Translations:
-
+
Why not ?
After all, why not ? It's pretty simple to do it, and it will allow me to write my blogposts in rst !
YEAH !
-
-
-
-
+
+
+
+
-
+
diff --git a/tests/output/custom/pages/this-is-a-test-hidden-page.html b/tests/output/custom/pages/this-is-a-test-hidden-page.html
new file mode 100644
index 00000000..b5eca671
--- /dev/null
+++ b/tests/output/custom/pages/this-is-a-test-hidden-page.html
@@ -0,0 +1,125 @@
+
+
+
+ This is a test hidden page
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ This is a test hidden page
+
+ This is great for things like error(404) pages
+Anyone can see this page but it's not linked to anywhere!
+
+
+
+
+
+
+
+ Proudly powered by Pelican , which takes great advantage of Python .
+
+
+ The theme is by Smashing Magazine , thanks!
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/tests/output/custom/pages/this-is-a-test-page.html b/tests/output/custom/pages/this-is-a-test-page.html
index 27d6ec69..85161430 100644
--- a/tests/output/custom/pages/this-is-a-test-page.html
+++ b/tests/output/custom/pages/this-is-a-test-page.html
@@ -39,14 +39,14 @@
+ yeah
+
+ misc
+
cat1
bar
- yeah
-
- content
-
diff --git a/tests/output/custom/second-article-fr.html b/tests/output/custom/second-article-fr.html
index b3b12af7..9ed39cec 100644
--- a/tests/output/custom/second-article-fr.html
+++ b/tests/output/custom/second-article-fr.html
@@ -39,23 +39,28 @@
+ yeah
+
+ misc
+
cat1
bar
- yeah
-
- content
-
-
-
-
-
-
-
+
+
+
+
+
+
+
Wed 29 February 2012
@@ -65,7 +70,7 @@
By Alexis Métaireau
-In content .
+In misc .
tags: foo bar baz
@@ -75,25 +80,25 @@ Translations:
-
Ceci est un article, en français.
+
Ceci est un article, en français.
-
-
-
-
+
+
+
+
-
+
diff --git a/tests/output/custom/second-article.html b/tests/output/custom/second-article.html
index 4b31dc69..93e421fb 100644
--- a/tests/output/custom/second-article.html
+++ b/tests/output/custom/second-article.html
@@ -39,23 +39,28 @@
+ yeah
+
+ misc
+
cat1
bar
- yeah
-
- content
-
-
-
-
-
-
-
+
+
+
+
+
+
+
Wed 29 February 2012
@@ -65,7 +70,7 @@
By Alexis Métaireau
-In content .
+In misc .
tags: foo bar baz
@@ -75,25 +80,25 @@ Translations:
-
This is some article, in english
+
This is some article, in english
-
-
-
-
+
+
+
+
-
+
diff --git a/tests/output/custom/tag/bar.html b/tests/output/custom/tag/bar.html
index bf468bf2..fe007074 100644
--- a/tests/output/custom/tag/bar.html
+++ b/tests/output/custom/tag/bar.html
@@ -39,14 +39,14 @@
+ yeah
+
+ misc
+
cat1
bar
- yeah
-
- content
-
@@ -57,7 +57,7 @@
-
+
Wed 29 February 2012
@@ -68,17 +68,17 @@
By Alexis Métaireau
-In content .
+In misc .
tags: foo bar baz
Translations:
- en
+ fr
- Ceci est un article, en français.
-There are comments .
+ This is some article, in english
+
There are comments .
@@ -91,7 +91,6 @@ Translations:
-
@@ -99,7 +98,8 @@ Translations:
@@ -113,25 +113,24 @@ Translations:
By
Alexis Métaireau
-
In content .
+
In misc .
tags: foo bar baz
Translations:
-
fr
+
en
-
This is some article, in english
+
Ceci est un article, en français.
-
read more
-
There are comments .
+
read more
+
There are comments .
-
@@ -139,7 +138,8 @@ Translations:
@@ -158,15 +158,15 @@ Translations:
- Multi-line metadata should be supported
-as well as
inline markup .
+
Multi-line metadata should be supported
+as well as inline markup .
+
read more
There are comments .
-
@@ -174,7 +174,8 @@ as well as
inline markup .
@@ -211,16 +212,16 @@ YEAH !
+
+
Page 1 / 1
-
-
-
+
diff --git a/tests/output/custom/tag/baz.html b/tests/output/custom/tag/baz.html
index 34bcdbc3..8e202cbe 100644
--- a/tests/output/custom/tag/baz.html
+++ b/tests/output/custom/tag/baz.html
@@ -39,14 +39,14 @@
+
yeah
+
+
misc
+
cat1
bar
-
yeah
-
-
content
-
@@ -57,7 +57,7 @@
-
+
Wed 29 February 2012
@@ -68,17 +68,17 @@
By Alexis Métaireau
-In content .
+In misc .
tags: foo bar baz
Translations:
- en
+ fr
- Ceci est un article, en français.
-There are comments .
+This is some article, in english
+There are comments .
@@ -91,7 +91,6 @@ Translations:
-
@@ -99,7 +98,8 @@ Translations:
@@ -113,34 +113,34 @@ Translations:
By
Alexis Métaireau
-
In content .
+
In misc .
tags: foo bar baz
Translations:
-
fr
+
en
-
This is some article, in english
+
Ceci est un article, en français.
-
read more
-
There are comments .
+
read more
+
There are comments .
+
+
Page 1 / 1
-
-
-
+
diff --git a/tests/output/custom/tag/foo.html b/tests/output/custom/tag/foo.html
index c8f088f1..6e2cbf11 100644
--- a/tests/output/custom/tag/foo.html
+++ b/tests/output/custom/tag/foo.html
@@ -39,14 +39,14 @@
+
yeah
+
+
misc
+
cat1
bar
-
yeah
-
-
content
-
@@ -57,7 +57,7 @@
-
+
Wed 29 February 2012
@@ -68,17 +68,17 @@
By Alexis Métaireau
-In content .
+In misc .
tags: foo bar baz
Translations:
- en
+ fr
- Ceci est un article, en français.
-There are comments .
+This is some article, in english
+There are comments .
@@ -91,7 +91,6 @@ Translations:
-
@@ -99,7 +98,8 @@ Translations:
@@ -113,25 +113,24 @@ Translations:
By
Alexis Métaireau
-
In content .
+
In misc .
tags: foo bar baz
Translations:
-
fr
+
en
-
This is some article, in english
+
Ceci est un article, en français.
-
read more
-
There are comments .
+
read more
+
There are comments .
-
@@ -139,7 +138,8 @@ Translations:
@@ -158,24 +158,25 @@ Translations:
- Multi-line metadata should be supported
-as well as
inline markup .
+
Multi-line metadata should be supported
+as well as inline markup .
+
read more
There are comments .
+
+
Page 1 / 1
-
-
-
+
diff --git a/tests/output/custom/tag/foobar.html b/tests/output/custom/tag/foobar.html
index 682a9b7d..d14a9c71 100644
--- a/tests/output/custom/tag/foobar.html
+++ b/tests/output/custom/tag/foobar.html
@@ -39,14 +39,14 @@
+
yeah
+
+
misc
+
cat1
bar
-
yeah
-
-
content
-
@@ -100,8 +100,8 @@
-
+
diff --git a/tests/output/custom/tag/oh.html b/tests/output/custom/tag/oh.html
index 9e8239a4..abc98868 100644
--- a/tests/output/custom/tag/oh.html
+++ b/tests/output/custom/tag/oh.html
@@ -39,14 +39,14 @@
+
yeah
+
+
misc
+
cat1
bar
-
yeah
-
-
content
-
@@ -99,8 +99,8 @@ YEAH !
-
+
diff --git a/tests/output/custom/tag/yeah.html b/tests/output/custom/tag/yeah.html
index 675a53cb..199adbe0 100644
--- a/tests/output/custom/tag/yeah.html
+++ b/tests/output/custom/tag/yeah.html
@@ -39,14 +39,14 @@
+
yeah
+
+
misc
+
cat1
bar
-
yeah
-
-
content
-
@@ -99,8 +99,8 @@ YEAH !
-
+
diff --git a/tests/output/custom/theme/css/main.css b/tests/output/custom/theme/css/main.css
index 28c98b99..dce9e247 100644
--- a/tests/output/custom/theme/css/main.css
+++ b/tests/output/custom/theme/css/main.css
@@ -111,6 +111,13 @@ cite {}
q {}
+div.note {
+ float: right;
+ margin: 5px;
+ font-size: 85%;
+ max-width: 300px;
+}
+
/* Tables */
table {margin: .5em auto 1.5em auto; width: 98%;}
@@ -305,6 +312,7 @@ img.left, figure.left {float: right; margin: 0 0 2em 2em;}
.social a[type$='atom+xml'], .social a[type$='rss+xml'] {background-image: url('../images/icons/rss.png');}
.social a[href*='twitter.com'] {background-image: url('../images/icons/twitter.png');}
.social a[href*='linkedin.com'] {background-image: url('../images/icons/linkedin.png');}
+ .social a[href*='gitorious.org'] {background-image: url('../images/icons/gitorious.org');}
/*
About
diff --git a/tests/output/custom/theme/css/wide.css b/tests/output/custom/theme/css/wide.css
index 3376f4c7..88fd59ce 100644
--- a/tests/output/custom/theme/css/wide.css
+++ b/tests/output/custom/theme/css/wide.css
@@ -4,13 +4,17 @@ body {
font:1.3em/1.3 "Hoefler Text","Georgia",Georgia,serif,sans-serif;
}
-.body, #banner nav, #banner nav ul, #about, #featured, #content{
- width: inherit;
+.post-info{
+ display: none;
}
#banner nav {
+ display: none;
-moz-border-radius: 0px;
- margin-bottom: 0px;
+ margin-bottom: 20px;
+ overflow: hidden;
+ font-size: 1em;
+ background: #F5F4EF;
}
#banner nav ul{
@@ -19,10 +23,11 @@ body {
#banner nav li{
float: right;
+ color: #000;
}
-#banner nav li:first-child a {
- -moz-border-radius: 0px;
+#banner nav li a {
+ color: #000;
}
#banner h1 {
diff --git a/tests/output/custom/theme/images/icons/facebook.png b/tests/output/custom/theme/images/icons/facebook.png
new file mode 100644
index 00000000..a7914b49
Binary files /dev/null and b/tests/output/custom/theme/images/icons/facebook.png differ
diff --git a/tests/output/custom/theme/images/icons/gitorious.png b/tests/output/custom/theme/images/icons/gitorious.png
new file mode 100644
index 00000000..6485f5ec
Binary files /dev/null and b/tests/output/custom/theme/images/icons/gitorious.png differ
diff --git a/tests/output/custom/this-is-a-super-article.html b/tests/output/custom/this-is-a-super-article.html
index 2fd6b306..640301db 100644
--- a/tests/output/custom/this-is-a-super-article.html
+++ b/tests/output/custom/this-is-a-super-article.html
@@ -39,23 +39,28 @@
+
yeah
+
+
misc
+
cat1
bar
-
yeah
-
-
content
-
-
-
-
-
-
-
+
+
+
+
+
+
+
Thu 02 December 2010
@@ -70,7 +75,7 @@
-
Some content here !
+
Some content here !
This is a simple title
And here comes the cool stuff .
@@ -83,23 +88,23 @@
→ And now try with some utf8 hell: ééé
-
-
-
-
+
+
+
+
-
+
diff --git a/tests/output/custom/unbelievable.html b/tests/output/custom/unbelievable.html
index b7730421..83eed167 100644
--- a/tests/output/custom/unbelievable.html
+++ b/tests/output/custom/unbelievable.html
@@ -39,23 +39,28 @@
+ yeah
+
+ misc
+
cat1
bar
- yeah
-
- content
-
-
-
-
-
-
-
+
+
+
+
+
+
+
Fri 15 October 2010
@@ -65,30 +70,30 @@
By Alexis Métaireau
-In content .
+In misc .
-
Or completely awesome. Depends the needs.
+
Or completely awesome. Depends the needs.
-
-
-
-
+
+
+
+
-
+
diff --git a/tests/support.py b/tests/support.py
index 994cd509..e5bfcca1 100644
--- a/tests/support.py
+++ b/tests/support.py
@@ -1,5 +1,4 @@
__all__ = [
- 'temporary_folder',
'get_article',
'unittest',
]
diff --git a/tests/test_contents.py b/tests/test_contents.py
index e7c9ad01..bc028ea8 100644
--- a/tests/test_contents.py
+++ b/tests/test_contents.py
@@ -2,7 +2,7 @@
from .support import unittest
-from pelican.contents import Page
+from pelican.contents import Page, Article
from pelican.settings import _DEFAULT_CONFIG
from pelican.utils import truncate_html_words
@@ -135,6 +135,17 @@ class TestPage(unittest.TestCase):
# will simply skip this test.
unittest.skip("There is no locale %s in this system." % locale)
+ def test_template(self):
+ """
+ Pages default to page, metadata overwrites
+ """
+ default_page = Page(**self.page_kwargs)
+ self.assertEqual('page', default_page.template)
+ page_kwargs = self._copy_page_kwargs()
+ page_kwargs['metadata']['template'] = 'custom'
+ custom_page = Page(**page_kwargs)
+ self.assertEqual('custom', custom_page.template)
+
def _copy_page_kwargs(self):
# make a deep copy of page_kwargs
page_kwargs = dict([(key, self.page_kwargs[key]) for key in
@@ -146,3 +157,15 @@ class TestPage(unittest.TestCase):
for subkey in page_kwargs[key]])
return page_kwargs
+
+class TestArticle(TestPage):
+ def test_template(self):
+ """
+ Articles default to article, metadata overwrites
+ """
+ default_article = Article(**self.page_kwargs)
+ self.assertEqual('article', default_article.template)
+ article_kwargs = self._copy_page_kwargs()
+ article_kwargs['metadata']['template'] = 'custom'
+ custom_article = Article(**article_kwargs)
+ self.assertEqual('custom', custom_article.template)
diff --git a/tests/test_generators.py b/tests/test_generators.py
index 61f31696..28a82089 100644
--- a/tests/test_generators.py
+++ b/tests/test_generators.py
@@ -3,16 +3,49 @@
from mock import MagicMock
import os
import re
+from tempfile import mkdtemp
+from shutil import rmtree
from pelican.generators import ArticlesGenerator, LessCSSGenerator, PagesGenerator
from pelican.settings import _DEFAULT_CONFIG
-from .support import unittest, temporary_folder, skipIfNoExecutable
+from .support import unittest, skipIfNoExecutable
CUR_DIR = os.path.dirname(__file__)
class TestArticlesGenerator(unittest.TestCase):
+ def setUp(self):
+ super(TestArticlesGenerator, self).setUp()
+ self.generator = None
+
+ def get_populated_generator(self):
+ """
+ We only need to pull all the test articles once, but read from it
+ for each test.
+ """
+ if self.generator is None:
+ settings = _DEFAULT_CONFIG.copy()
+ settings['ARTICLE_DIR'] = 'content'
+ settings['DEFAULT_CATEGORY'] = 'Default'
+ self.generator = ArticlesGenerator(settings.copy(), settings,
+ CUR_DIR, _DEFAULT_CONFIG['THEME'], None,
+ _DEFAULT_CONFIG['MARKUP'])
+ self.generator.generate_context()
+ return self.generator
+
+ def distill_articles(self, articles):
+ distilled = []
+ for page in articles:
+ distilled.append([
+ page.title,
+ page.status,
+ page.category.name,
+ page.template
+ ]
+ )
+ return distilled
+
def test_generate_feeds(self):
generator = ArticlesGenerator(None, {'FEED': _DEFAULT_CONFIG['FEED']},
@@ -93,6 +126,16 @@ class TestArticlesGenerator(unittest.TestCase):
generator.generate_direct_templates(write)
write.assert_called_count == 0
+ def test_per_article_template(self):
+ """
+ Custom template articles get the field but standard/unset are None
+ """
+ generator = self.get_populated_generator()
+ articles = self.distill_articles(generator.articles)
+ custom_template = ['Article with template', 'published', 'Default', 'custom']
+ standard_template = ['This is a super article !', 'published', 'Yeah', 'article']
+ self.assertIn(custom_template, articles)
+ self.assertIn(standard_template, articles)
class TestPageGenerator(unittest.TestCase):
"""
@@ -107,7 +150,8 @@ class TestPageGenerator(unittest.TestCase):
for page in pages:
distilled.append([
page.title,
- page.status
+ page.status,
+ page.template
]
)
return distilled
@@ -124,12 +168,14 @@ class TestPageGenerator(unittest.TestCase):
hidden_pages = self.distill_pages(generator.hidden_pages)
pages_expected = [
- [u'This is a test page', 'published'],
- [u'This is a markdown test page', 'published']
+ [u'This is a test page', 'published', 'page'],
+ [u'This is a markdown test page', 'published', 'page'],
+ [u'This is a test page with a preset template', 'published', 'custom']
]
hidden_pages_expected = [
- [u'This is a test hidden page', 'hidden'],
- [u'This is a markdown test hidden page', 'hidden']
+ [u'This is a test hidden page', 'hidden', 'page'],
+ [u'This is a markdown test hidden page', 'hidden', 'page'],
+ [u'This is a test hidden page with a custom template', 'hidden', 'custom']
]
self.assertItemsEqual(pages_expected,pages)
@@ -149,6 +195,14 @@ class TestLessCSSGenerator(unittest.TestCase):
}
"""
+ def setUp(self):
+ self.temp_content = mkdtemp()
+ self.temp_output = mkdtemp()
+
+ def tearDown(self):
+ rmtree(self.temp_content)
+ rmtree(self.temp_output)
+
@skipIfNoExecutable('lessc')
def test_less_compiler(self):
@@ -156,28 +210,25 @@ class TestLessCSSGenerator(unittest.TestCase):
settings['STATIC_PATHS'] = ['static']
settings['LESS_GENERATOR'] = True
- # we'll nest here for py < 2.7 compat
- with temporary_folder() as temp_content:
- with temporary_folder() as temp_output:
- generator = LessCSSGenerator(None, settings, temp_content,
- _DEFAULT_CONFIG['THEME'], temp_output, None)
+ generator = LessCSSGenerator(None, settings, self.temp_content,
+ _DEFAULT_CONFIG['THEME'], self.temp_output, None)
- # create a dummy less file
- less_dir = os.path.join(temp_content, 'static', 'css')
- less_filename = os.path.join(less_dir, 'test.less')
+ # create a dummy less file
+ less_dir = os.path.join(self.temp_content, 'static', 'css')
+ less_filename = os.path.join(less_dir, 'test.less')
- less_output = os.path.join(temp_output, 'static', 'css',
- 'test.css')
+ less_output = os.path.join(self.temp_output, 'static', 'css',
+ 'test.css')
- os.makedirs(less_dir)
- with open(less_filename, 'w') as less_file:
- less_file.write(self.LESS_CONTENT)
+ os.makedirs(less_dir)
+ with open(less_filename, 'w') as less_file:
+ less_file.write(self.LESS_CONTENT)
- generator.generate_output()
+ generator.generate_output()
- # we have the file ?
- self.assertTrue(os.path.exists(less_output))
+ # we have the file ?
+ self.assertTrue(os.path.exists(less_output))
- # was it compiled ?
- self.assertIsNotNone(re.search(r'^\s+color:\s*#4D926F;$',
- open(less_output).read(), re.MULTILINE | re.IGNORECASE))
+ # was it compiled ?
+ self.assertIsNotNone(re.search(r'^\s+color:\s*#4D926F;$',
+ open(less_output).read(), re.MULTILINE | re.IGNORECASE))
diff --git a/tests/test_pelican.py b/tests/test_pelican.py
index c317e5b3..15088ed0 100644
--- a/tests/test_pelican.py
+++ b/tests/test_pelican.py
@@ -5,8 +5,11 @@ except ImportError:
import os
from filecmp import dircmp
+from tempfile import mkdtemp
+from shutil import rmtree
+import locale
-from .support import temporary_folder
+from mock import patch
from pelican import Pelican
from pelican.settings import read_settings
@@ -23,27 +26,73 @@ class TestPelican(unittest.TestCase):
# general functional testing for pelican. Basically, this test case tries
# to run pelican in different situations and see how it behaves
+ def setUp(self):
+ self.temp_path = mkdtemp()
+ self.old_locale = locale.setlocale(locale.LC_ALL)
+ locale.setlocale(locale.LC_ALL, 'C')
+
+ def tearDown(self):
+ rmtree(self.temp_path)
+ locale.setlocale(locale.LC_ALL, self.old_locale)
+
@unittest.skip("Test failing")
def test_basic_generation_works(self):
# when running pelican without settings, it should pick up the default
# ones and generate the output without raising any exception / issuing
# any warning.
- with temporary_folder() as temp_path:
- pelican = Pelican(path=INPUT_PATH, output_path=temp_path)
+ with patch("pelican.contents.getenv") as mock_getenv:
+ # force getenv('USER') to always return the same value
+ mock_getenv.return_value = "Dummy Author"
+ pelican = Pelican(path=INPUT_PATH, output_path=self.temp_path)
pelican.run()
- diff = dircmp(temp_path, os.sep.join((OUTPUT_PATH, "basic")))
- self.assertEqual(diff.left_only, [])
- self.assertEqual(diff.right_only, [])
- self.assertEqual(diff.diff_files, [])
+ diff = dircmp(
+ self.temp_path, os.sep.join((OUTPUT_PATH, "basic")))
+ self.assertEqual(diff.left_only, [], msg="some generated " \
+ "files are absent from the expected functional " \
+ "tests output.\n" \
+ "This is probably because the HTML generated files " \
+ "changed. If these changes are normal, please refer " \
+ "to docs/contribute.rst to update the expected " \
+ "output of the functional tests.")
+ self.assertEqual(diff.right_only, [], msg="some files from " \
+ "the expected functional tests output are absent " \
+ "from the current output.\n" \
+ "This is probably because the HTML generated files " \
+ "changed. If these changes are normal, please refer " \
+ "to docs/contribute.rst to update the expected " \
+ "output of the functional tests.")
+ self.assertEqual(diff.diff_files, [], msg="some generated " \
+ "files differ from the expected functional tests " \
+ "output.\n" \
+ "This is probably because the HTML generated files " \
+ "changed. If these changes are normal, please refer " \
+ "to docs/contribute.rst to update the expected " \
+ "output of the functional tests.")
- @unittest.skip("Test failing")
def test_custom_generation_works(self):
# the same thing with a specified set of settings should work
- with temporary_folder() as temp_path:
- pelican = Pelican(path=INPUT_PATH, output_path=temp_path,
- settings=read_settings(SAMPLE_CONFIG))
- pelican.run()
- diff = dircmp(temp_path, os.sep.join((OUTPUT_PATH, "custom")))
- self.assertEqual(diff.left_only, [])
- self.assertEqual(diff.right_only, [])
- self.assertEqual(diff.diff_files, [])
+ pelican = Pelican(path=INPUT_PATH, output_path=self.temp_path,
+ settings=read_settings(SAMPLE_CONFIG))
+ pelican.run()
+ diff = dircmp(self.temp_path, os.sep.join((OUTPUT_PATH, "custom")))
+ self.assertEqual(diff.left_only, [], msg="some generated " \
+ "files are absent from the expected functional " \
+ "tests output.\n" \
+ "This is probably because the HTML generated files " \
+ "changed. If these changes are normal, please refer " \
+ "to docs/contribute.rst to update the expected " \
+ "output of the functional tests.")
+ self.assertEqual(diff.right_only, [], msg="some files from " \
+ "the expected functional tests output are absent " \
+ "from the current output.\n" \
+ "This is probably because the HTML generated files " \
+ "changed. If these changes are normal, please refer " \
+ "to docs/contribute.rst to update the expected " \
+ "output of the functional tests.")
+ self.assertEqual(diff.diff_files, [], msg="some generated " \
+ "files differ from the expected functional tests " \
+ "output.\n" \
+ "This is probably because the HTML generated files " \
+ "changed. If these changes are normal, please refer " \
+ "to docs/contribute.rst to update the expected " \
+ "output of the functional tests.")