social
- atom feed - -
A Pelican Blog
+Archives for A Pelican Blog
-
@@ -45,17 +46,19 @@
- Oh yeah !
- Fri 15 October 2010
- Unbelievable ! +
- Sun 14 March 2010 +
- The baz tag
social
- atom feed - -
A Pelican Blog
+Article 1
-social
- atom feed - -
A Pelican Blog
+Article 2
-social
- atom feed - -
A Pelican Blog
+Article 3
-social
- atom feed - -
A Pelican Blog
+Article 3
This is a super article !
Oh yeah !
Unbelievable !
In misc.
+In misc.
Or completely awesome. Depends the needs.
a root-relative link to markdown-article a file-relative link to markdown-article
+Testing sourcecode directive
+1 | formatter = self.options and VARIANTS[self.options.keys()[0]]
+ |
Lovely.
+The baz tag
+social
- atom feed - -
A Pelican Blog
+Oh yeah !
-social
- atom feed - -
A Pelican Blog
+Override url/save_as
- -Test page which overrides save_as and url so that this page will be generated + +
Test page which overrides save_as and url so that this page will be generated at a custom location.
social
- atom feed - -
A Pelican Blog
+This is a test hidden page
- -This is great for things like error(404) pages + +
This is great for things like error(404) pages Anyone can see this page but it's not linked to anywhere!
social
- atom feed - -
A Pelican Blog
+This is a test page
- -Just an image.
+ +Just an image.
social
- atom feed - -
A Pelican Blog
+Deuxième article
-social
- atom feed - -
A Pelican Blog
+Second article
-social
- atom feed - -
A Pelican Blog
+Second article
-Second article
+In misc.
-Translations: - fr - +In misc.
+Translations: + fr +This is some article, in english
Other articles
-
-
-
-
+ - + +This is a super article !
Oh yeah !
social
- atom feed - -
A Pelican Blog
++ The baz tag
+Second article
-In misc.
-Translations: - fr - -This is some article, in english
- - - - -In misc.
+ +This article overrides the listening of the articles under the baz tag.
+ +social
- atom feed - -
A Pelican Blog
+Second article
-Second article
+In misc.
-Translations: - fr - +In misc.
+Translations: + fr +This is some article, in english
Other articles
-
-
-
-
+ - + +This is a super article !
social
- atom feed - -
A Pelican Blog
+This is a super article !
-This is a super article !
+In yeah.
+In yeah.
Some content here !
→ And now try with some utf8 hell: ééé
social
- atom feed - -
A Pelican Blog
+Oh Oh Oh
+ +This page overrides the listening of the articles under the oh tag.
-Oh yeah !
-In bar.
- -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 !
-
-social
- atom feed - -
A Pelican Blog
+Oh yeah !
-Oh yeah !
+In bar.
+In bar.
Why not ?
@@ -46,18 +45,18 @@ YEAH !
social
- atom feed - -
A Pelican Blog
+This is a super article !
-social
- atom feed - -
A Pelican Blog
+Unbelievable !
-In misc.
+In misc.
Or completely awesome. Depends the needs.
a root-relative link to markdown-article a file-relative link to markdown-article
+Testing sourcecode directive
+1 | formatter = self.options and VARIANTS[self.options.keys()[0]]
+ |
Lovely.
+social
- atom feed - -
Alexis' log
+A markdown powered article
-In cat1.
+In cat1.
You're mutually oblivious.
a root-relative link to unbelievable a file-relative link to unbelievable
Comments !
blogroll
-- Biologeek
- - Filyb
- - Libert-fr
- - N1k0
- - Tarek Ziadé
- - Zubin Mithra
-
+social
- atom feed
- - rss feed
-
- - twitter
- - lastfm
- - github
-
+Alexis' log
+Archives for Alexis' log
@@ -49,32 +50,34 @@- Oh yeah !
- Fri 15 October 2010
- Unbelievable !
+ - Sun 14 March 2010
+ - The baz tag
blogroll
-- Biologeek
- - Filyb
- - Libert-fr
- - N1k0
- - Tarek Ziadé
- - Zubin Mithra
-
+social
- atom feed
- - rss feed
-
- - twitter
- - lastfm
- - github
-
+Alexis' log
+Article 1
-In cat1.
+In cat1.
Article 1
Comments !
blogroll
-- Biologeek
- - Filyb
- - Libert-fr
- - N1k0
- - Tarek Ziadé
- - Zubin Mithra
-
+social
- atom feed
- - rss feed
-
- - twitter
- - lastfm
- - github
-
+Alexis' log
+Article 2
-In cat1.
+In cat1.
Article 2
Comments !
blogroll
-- Biologeek
- - Filyb
- - Libert-fr
- - N1k0
- - Tarek Ziadé
- - Zubin Mithra
-
+social
- atom feed
- - rss feed
-
- - twitter
- - lastfm
- - github
-
+Alexis' log
+Article 3
-In cat1.
+In cat1.
Article 3
Comments !
blogroll
-- Biologeek
- - Filyb
- - Libert-fr
- - N1k0
- - Tarek Ziadé
- - Zubin Mithra
-
+social
- atom feed
- - rss feed
-
- - twitter
- - lastfm
- - github
-
+Alexis' log
+A markdown powered article
-FILENAME_METADATA example
+In misc.
+ +Some cool stuff!
+There are comments.
Other articles
++
+ +
+
+
+
+
+
+
+ Wed 29 February 2012
+
+
+
+ By Alexis Métaireau
+
+
+
+
+
+
+
+
+
+
Wed 20 April 2011
-
+
By Alexis Métaireau
-
-
+
-
-
+
-
+
-
+
Thu 17 February 2011
-
+
By Alexis Métaireau
-
+
Second article
+In misc.
+tags: foobarbaz
Translations: + fr + +This is some article, in english
+ + read more +There are comments.
A markdown powered article
+In cat1.
+In cat1.
-You're mutually oblivious.
+You're mutually oblivious.
a root-relative link to unbelievable -a file-relative link to unbelievable
There are comments.
- -Other articles
--
- +a file-relative link to unbelievable + read more +
There are comments.
Article 1
In cat1.
+In cat1.
Article 1
read more -There are comments.
There are comments.
Article 2
-In cat1.
- -Article 2
- - read more -There are comments.
Article 3
-In cat1.
- -Article 3
- - read more -There are comments.
- Page 1 / 3 - » -
- -+ Page 1 / 3 + » +
+ +blogroll
-- Biologeek
- - Filyb
- - Libert-fr
- - N1k0
- - Tarek Ziadé
- - Zubin Mithra
-
+social
- atom feed
- - rss feed
-
- - twitter
- - lastfm
- - github
-
+Alexis' log
+-
+
-
-
+
-
-
- Fri 30 November 2012
+
+
+ Thu 17 February 2011
-
+
By Alexis Métaireau
-
+ read more
+
FILENAME_METADATA example
+Article 2
In misc.
+In cat1.
-Some cool stuff!
+Article 2
- read more -There are comments.
There are comments.
Article 3
+In cat1.
+ +Article 3
+ + read more +There are comments.
This is a super article !
+In yeah.
+tags: foobarfoobar
+Multi-line metadata should be supported +as well as inline markup.
+ + read more +There are comments.
Oh yeah !
In bar.
-tags: ohbaryeah
Translations: - fr - +In bar.
+tags: ohbaryeah
Translations: + fr +Why not ?
After all, why not ? It's pretty simple to do it, and it will allow me to write my blogposts in rst ! @@ -85,92 +128,39 @@ YEAH !
There are comments.
There are comments.
Second article
-In misc.
-tags: foobarbaz
Translations: - fr - -This is some article, in english
- - read more -There are comments.
This is a super article !
-In yeah.
-tags: foobarfoobar
-Multi-line metadata should be supported -as well as inline markup.
- - read more -There are comments.
- « - Page 2 / 3 - » -
-+ « + Page 2 / 3 + » +
+ +blogroll
-- Biologeek
- - Filyb
- - Libert-fr
- - N1k0
- - Tarek Ziadé
- - Zubin Mithra
-
+social
- atom feed
- - rss feed
-
- - twitter
- - lastfm
- - github
-
+Alexis' log
+-
+
-
+
-
+
Fri 15 October 2010
-
+
By Alexis Métaireau
-
+
+
read more
-
+
Unbelievable !
In misc.
+In misc.
Or completely awesome. Depends the needs.
a root-relative link to markdown-article a file-relative link to markdown-article
+Testing sourcecode directive
+Lovely.
+There are comments.
There are comments.
- « - Page 3 / 3 -
-The baz tag
+In misc.
+ +This article overrides the listening of the articles under the baz tag.
+ + read more +There are comments.
+ « + Page 3 / 3 +
+ +blogroll
-- Biologeek
- - Filyb
- - Libert-fr
- - N1k0
- - Tarek Ziadé
- - Zubin Mithra
-
+social
- atom feed
- - rss feed
-
- - twitter
- - lastfm
- - github
-
+Alexis' log
++- yeah
- misc
- cat1
- bar
-
+
- Biologeek
+ - Filyb
+ - Libert-fr
+ - N1k0
+ - Tarek Ziadé
+ - Zubin Mithra
+
-
+
- rss feed
+
+ - twitter
+ - lastfm
+ - github
+
-
+
diff --git a/pelican/tests/output/custom/category/bar.html b/pelican/tests/output/custom/category/bar.html
index f7f1bbf3..38080aed 100644
--- a/pelican/tests/output/custom/category/bar.html
+++ b/pelican/tests/output/custom/category/bar.html
@@ -4,9 +4,9 @@
Alexis' log - bar
-
-
-
+
+
+
@@ -19,32 +19,31 @@
- Oh Oh Oh
+ - Override url/save_as
+ - This is a test page
+ - yeah
+ - misc
+ - cat1
+ - bar
+
-
-
-
+
-
+
Wed 20 October 2010
-
+
By Alexis Métaireau
-
-
-
-
-
-
+
+
- Biologeek
+ - Filyb
+ - Libert-fr
+ - N1k0
+ - Tarek Ziadé
+ - Zubin Mithra
+
-
+
- rss feed
+
+ - twitter
+ - lastfm
+ - github
+
-
+
diff --git a/pelican/tests/output/custom/category/cat1.html b/pelican/tests/output/custom/category/cat1.html
index 10c4ce76..6cd92044 100644
--- a/pelican/tests/output/custom/category/cat1.html
+++ b/pelican/tests/output/custom/category/cat1.html
@@ -4,9 +4,9 @@
Alexis' log - cat1
-
-
-
+
+
+
@@ -19,142 +19,135 @@
- Oh Oh Oh
+ - Override url/save_as
+ - This is a test page
+ - yeah
+ - misc
+ - cat1
+ - bar
+
-
-
-
+
-
+
Wed 20 April 2011
-
+
By Alexis Métaireau
-
-
-
+
+
-
-
-
+
-
+
-
+
Thu 17 February 2011
-
+
By Alexis Métaireau
-
+
-
-
-
+
-
+
-
+
Thu 17 February 2011
-
+
By Alexis Métaireau
-
+
-
-
-
+
+
+
- Biologeek
+ - Filyb
+ - Libert-fr
+ - N1k0
+ - Tarek Ziadé
+ - Zubin Mithra
+
-
+
- rss feed
+
+ - twitter
+ - lastfm
+ - github
+
-
+
diff --git a/pelican/tests/output/custom/category/misc.html b/pelican/tests/output/custom/category/misc.html
index 121c9451..63c659da 100644
--- a/pelican/tests/output/custom/category/misc.html
+++ b/pelican/tests/output/custom/category/misc.html
@@ -4,9 +4,9 @@
Alexis' log - misc
-
-
-
+
+
+
@@ -19,120 +19,144 @@
- Oh Oh Oh
+ - Override url/save_as
+ - This is a test page
+ - yeah
+ - misc
+ - cat1
+ - bar
+
-
-
-
+
-
+
Fri 30 November 2012
-
+
By Alexis Métaireau
-
-
-
+
+
-
-
-
+
-
+
-
+
Fri 15 October 2010
-
+
By Alexis Métaireau
-
+
+
read more
-
+
-
-
-
-
+
+
+
+
+
+
+
+
+ Sun 14 March 2010
+
+
+
+ By Alexis Métaireau
+
+
+
+
+
+
- Biologeek
+ - Filyb
+ - Libert-fr
+ - N1k0
+ - Tarek Ziadé
+ - Zubin Mithra
+
-
+
- rss feed
+
+ - twitter
+ - lastfm
+ - github
+
-
+
diff --git a/pelican/tests/output/custom/category/yeah.html b/pelican/tests/output/custom/category/yeah.html
index f7cc8d12..f54e316f 100644
--- a/pelican/tests/output/custom/category/yeah.html
+++ b/pelican/tests/output/custom/category/yeah.html
@@ -4,9 +4,9 @@
Alexis' log - yeah
-
-
-
+
+
+
@@ -19,29 +19,28 @@
- Oh Oh Oh
+ - Override url/save_as
+ - This is a test page
+ - yeah
+ - misc
+ - cat1
+ - bar
+
-
-
-
+
-
+
Thu 02 December 2010
-
+
By Alexis Métaireau
-
@@ -56,36 +55,36 @@
-
-
-
-
-
+
+
- Biologeek
+ - Filyb
+ - Libert-fr
+ - N1k0
+ - Tarek Ziadé
+ - Zubin Mithra
+
-
+
- rss feed
+
+ - twitter
+ - lastfm
+ - github
+
-
+
diff --git a/pelican/tests/output/custom/drafts/a-draft-article.html b/pelican/tests/output/custom/drafts/a-draft-article.html
index 493eb611..917cf500 100644
--- a/pelican/tests/output/custom/drafts/a-draft-article.html
+++ b/pelican/tests/output/custom/drafts/a-draft-article.html
@@ -4,9 +4,9 @@
A draft article
-
-
-
+
+
+
@@ -19,64 +19,65 @@
- Oh Oh Oh
+ - Override url/save_as
+ - This is a test page
+ - yeah
+ - misc
+ - cat1
+ - bar
+
-
+
+
-
+
Fri 02 March 2012
-
+
By Alexis Métaireau
-
-
+
-
+
- Biologeek
+ - Filyb
+ - Libert-fr
+ - N1k0
+ - Tarek Ziadé
+ - Zubin Mithra
+
-
+
- rss feed
+
+ - twitter
+ - lastfm
+ - github
+
-
+
diff --git a/pelican/tests/output/custom/feeds/all-en.atom.xml b/pelican/tests/output/custom/feeds/all-en.atom.xml
index 49d45cde..d4631d7c 100644
--- a/pelican/tests/output/custom/feeds/all-en.atom.xml
+++ b/pelican/tests/output/custom/feeds/all-en.atom.xml
@@ -27,4 +27,11 @@ YEAH !</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>
<p><a class="reference external" href="http://blog.notmyidea.org/a-markdown-powered-article.html">a root-relative link to markdown-article</a>
<a class="reference external" href="http://blog.notmyidea.org/a-markdown-powered-article.html">a file-relative link to markdown-article</a></p>
+<div class="section" id="testing-sourcecode-directive">
+<h2>Testing sourcecode directive</h2>
+<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre>1</pre></div></td><td class="code"><div class="highlight"><pre><span class="n">formatter</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">options</span> <span class="ow">and</span> <span class="n">VARIANTS</span><span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">options</span><span class="o">.</span><span class="n">keys</span><span class="p">()[</span><span class="mi">0</span><span class="p">]]</span>
+</pre></div>
+</td></tr></table><p>Lovely.</p>
+</div>
+ The baz tag 2010-03-14T00:00:00+01:00 Alexis Métaireau tag:blog.notmyidea.org,2010-03-14:tag/baz.html <p>This article overrides the listening of the articles under the <em>baz</em> tag.</p>
\ No newline at end of file
diff --git a/pelican/tests/output/custom/feeds/all.atom.xml b/pelican/tests/output/custom/feeds/all.atom.xml
index 3187c2aa..2a673ada 100644
--- a/pelican/tests/output/custom/feeds/all.atom.xml
+++ b/pelican/tests/output/custom/feeds/all.atom.xml
@@ -29,4 +29,11 @@ YEAH !</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>
<p><a class="reference external" href="http://blog.notmyidea.org/a-markdown-powered-article.html">a root-relative link to markdown-article</a>
<a class="reference external" href="http://blog.notmyidea.org/a-markdown-powered-article.html">a file-relative link to markdown-article</a></p>
+<div class="section" id="testing-sourcecode-directive">
+<h2>Testing sourcecode directive</h2>
+<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre>1</pre></div></td><td class="code"><div class="highlight"><pre><span class="n">formatter</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">options</span> <span class="ow">and</span> <span class="n">VARIANTS</span><span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">options</span><span class="o">.</span><span class="n">keys</span><span class="p">()[</span><span class="mi">0</span><span class="p">]]</span>
+</pre></div>
+</td></tr></table><p>Lovely.</p>
+</div>
+ The baz tag 2010-03-14T00:00:00+01:00 Alexis Métaireau tag:blog.notmyidea.org,2010-03-14:tag/baz.html <p>This article overrides the listening of the articles under the <em>baz</em> tag.</p>
\ No newline at end of file
diff --git a/pelican/tests/output/custom/feeds/all.rss.xml b/pelican/tests/output/custom/feeds/all.rss.xml
index 8d07bec7..e8cd9b80 100644
--- a/pelican/tests/output/custom/feeds/all.rss.xml
+++ b/pelican/tests/output/custom/feeds/all.rss.xml
@@ -29,4 +29,11 @@ YEAH !</p>
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>
<p><a class="reference external" href="http://blog.notmyidea.org/a-markdown-powered-article.html">a root-relative link to markdown-article</a>
<a class="reference external" href="http://blog.notmyidea.org/a-markdown-powered-article.html">a file-relative link to markdown-article</a></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
+<div class="section" id="testing-sourcecode-directive">
+<h2>Testing sourcecode directive</h2>
+<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre>1</pre></div></td><td class="code"><div class="highlight"><pre><span class="n">formatter</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">options</span> <span class="ow">and</span> <span class="n">VARIANTS</span><span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">options</span><span class="o">.</span><span class="n">keys</span><span class="p">()[</span><span class="mi">0</span><span class="p">]]</span>
+</pre></div>
+</td></tr></table><p>Lovely.</p>
+</div>
+Alexis Métaireau Fri, 15 Oct 2010 20:30:00 +0200 tag:blog.notmyidea.org,2010-10-15:unbelievable.html The baz tag http://blog.notmyidea.org/tag/baz.html<p>This article overrides the listening of the articles under the <em>baz</em> tag.</p>
+ Alexis Métaireau Sun, 14 Mar 2010 00:00:00 +0100 tag:blog.notmyidea.org,2010-03-14:tag/baz.html
\ No newline at end of file
diff --git a/pelican/tests/output/custom/feeds/misc.atom.xml b/pelican/tests/output/custom/feeds/misc.atom.xml
index 45c996f3..250b1b65 100644
--- a/pelican/tests/output/custom/feeds/misc.atom.xml
+++ b/pelican/tests/output/custom/feeds/misc.atom.xml
@@ -4,4 +4,11 @@
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>
<p><a class="reference external" href="http://blog.notmyidea.org/a-markdown-powered-article.html">a root-relative link to markdown-article</a>
<a class="reference external" href="http://blog.notmyidea.org/a-markdown-powered-article.html">a file-relative link to markdown-article</a></p>
+<div class="section" id="testing-sourcecode-directive">
+<h2>Testing sourcecode directive</h2>
+<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre>1</pre></div></td><td class="code"><div class="highlight"><pre><span class="n">formatter</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">options</span> <span class="ow">and</span> <span class="n">VARIANTS</span><span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">options</span><span class="o">.</span><span class="n">keys</span><span class="p">()[</span><span class="mi">0</span><span class="p">]]</span>
+</pre></div>
+</td></tr></table><p>Lovely.</p>
+</div>
+ The baz tag 2010-03-14T00:00:00+01:00 Alexis Métaireau tag:blog.notmyidea.org,2010-03-14:tag/baz.html <p>This article overrides the listening of the articles under the <em>baz</em> tag.</p>
\ No newline at end of file
diff --git a/pelican/tests/output/custom/feeds/misc.rss.xml b/pelican/tests/output/custom/feeds/misc.rss.xml
index 1d295abc..195812cc 100644
--- a/pelican/tests/output/custom/feeds/misc.rss.xml
+++ b/pelican/tests/output/custom/feeds/misc.rss.xml
@@ -4,4 +4,11 @@
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>
<p><a class="reference external" href="http://blog.notmyidea.org/a-markdown-powered-article.html">a root-relative link to markdown-article</a>
<a class="reference external" href="http://blog.notmyidea.org/a-markdown-powered-article.html">a file-relative link to markdown-article</a></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
+<div class="section" id="testing-sourcecode-directive">
+<h2>Testing sourcecode directive</h2>
+<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre>1</pre></div></td><td class="code"><div class="highlight"><pre><span class="n">formatter</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">options</span> <span class="ow">and</span> <span class="n">VARIANTS</span><span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">options</span><span class="o">.</span><span class="n">keys</span><span class="p">()[</span><span class="mi">0</span><span class="p">]]</span>
+</pre></div>
+</td></tr></table><p>Lovely.</p>
+</div>
+Alexis Métaireau Fri, 15 Oct 2010 20:30:00 +0200 tag:blog.notmyidea.org,2010-10-15:unbelievable.html The baz tag http://blog.notmyidea.org/tag/baz.html<p>This article overrides the listening of the articles under the <em>baz</em> tag.</p>
+ Alexis Métaireau Sun, 14 Mar 2010 00:00:00 +0100 tag:blog.notmyidea.org,2010-03-14:tag/baz.html
\ No newline at end of file
diff --git a/pelican/tests/output/custom/filename_metadata-example.html b/pelican/tests/output/custom/filename_metadata-example.html
index 626e8c64..83a4c43f 100644
--- a/pelican/tests/output/custom/filename_metadata-example.html
+++ b/pelican/tests/output/custom/filename_metadata-example.html
@@ -4,9 +4,9 @@
FILENAME_METADATA example
-
-
-
+
+
+
@@ -19,37 +19,38 @@
- Oh Oh Oh
+ - Override url/save_as
+ - This is a test page
+ - yeah
+ - misc
+ - cat1
+ - bar
+
-
+
+
-
+
Fri 30 November 2012
-
+
By Alexis Métaireau
-
-
+
-
+
-
+
- Biologeek
+ - Filyb
+ - Libert-fr
+ - N1k0
+ - Tarek Ziadé
+ - Zubin Mithra
+
-
+
- rss feed
+
+ - twitter
+ - lastfm
+ - github
+
-
+
diff --git a/pelican/tests/output/custom/index.html b/pelican/tests/output/custom/index.html
index 1a1d89e9..43c2e6a8 100644
--- a/pelican/tests/output/custom/index.html
+++ b/pelican/tests/output/custom/index.html
@@ -4,9 +4,9 @@
Alexis' log
-
-
-
+
+
+
@@ -19,145 +19,138 @@
- Oh Oh Oh
+ - Override url/save_as
+ - This is a test page
+ - yeah
+ - misc
+ - cat1
+ - bar
+
-
-
-
+
-
+
Fri 30 November 2012
-
+
By Alexis Métaireau
-
-
-
+
+
-
-
-
+
-
+
-
+
Wed 20 April 2011
-
+
By Alexis Métaireau
-
+
-
-
-
+
-
+
-
+
Thu 17 February 2011
-
+
By Alexis Métaireau
-
+
-
-
-
-
+
+
+
- Biologeek
+ - Filyb
+ - Libert-fr
+ - N1k0
+ - Tarek Ziadé
+ - Zubin Mithra
+
-
+
- rss feed
+
+ - twitter
+ - lastfm
+ - github
+
-
+
diff --git a/pelican/tests/output/custom/index2.html b/pelican/tests/output/custom/index2.html
index b8e2ac1a..b37de9ae 100644
--- a/pelican/tests/output/custom/index2.html
+++ b/pelican/tests/output/custom/index2.html
@@ -4,9 +4,9 @@
Alexis' log
-
-
-
+
+
+
@@ -19,115 +19,107 @@
- Oh Oh Oh
+ - Override url/save_as
+ - This is a test page
+ - yeah
+ - misc
+ - cat1
+ - bar
+
-
-
-
-
+
-
-
-
+
-
+
-
+
Thu 17 February 2011
-
+
By Alexis Métaireau
-
+
-
-
-
+
-
+
-
+
Thu 02 December 2010
-
+
By Alexis Métaireau
-
+
-
-
-
+
-
+
-
+
Wed 20 October 2010
-
+
By Alexis Métaireau
-
read more
-
+
-
-
-
-
+
+
+
- Biologeek
+ - Filyb
+ - Libert-fr
+ - N1k0
+ - Tarek Ziadé
+ - Zubin Mithra
+
-
+
- rss feed
+
+ - twitter
+ - lastfm
+ - github
+
-
+
diff --git a/pelican/tests/output/custom/index3.html b/pelican/tests/output/custom/index3.html
index cf285ea2..52657306 100644
--- a/pelican/tests/output/custom/index3.html
+++ b/pelican/tests/output/custom/index3.html
@@ -4,9 +4,9 @@
Alexis' log
-
-
-
+
+
+
@@ -19,74 +19,101 @@
- Oh Oh Oh
+ - Override url/save_as
+ - This is a test page
+ - yeah
+ - misc
+ - cat1
+ - bar
+
-
-
-
-
+
-
-
-
-
+
+
+
+
+
+
+
+
+ Sun 14 March 2010
+
+
+
+ By Alexis Métaireau
+
+
+
+
+
+
- Biologeek
+ - Filyb
+ - Libert-fr
+ - N1k0
+ - Tarek Ziadé
+ - Zubin Mithra
+
-
+
- rss feed
+
+ - twitter
+ - lastfm
+ - github
+
-
+
diff --git a/pelican/tests/output/custom/jinja2_template.html b/pelican/tests/output/custom/jinja2_template.html
index 95077c2f..082121dd 100644
--- a/pelican/tests/output/custom/jinja2_template.html
+++ b/pelican/tests/output/custom/jinja2_template.html
@@ -4,9 +4,9 @@
Alexis' log
-
-
-
+
+
+
@@ -19,41 +19,42 @@
- Oh Oh Oh
+ - Override url/save_as
+ - This is a test page
+ - yeah
+ - misc
+ - cat1
+ - bar
+
-
+
Some text
-
+
- Biologeek
+ - Filyb
+ - Libert-fr
+ - N1k0
+ - Tarek Ziadé
+ - Zubin Mithra
+
-
+
- rss feed
+
+ - twitter
+ - lastfm
+ - github
+
-
+
diff --git a/pelican/tests/output/custom/oh-yeah-fr.html b/pelican/tests/output/custom/oh-yeah-fr.html
index e34e6078..a2b8b6c3 100644
--- a/pelican/tests/output/custom/oh-yeah-fr.html
+++ b/pelican/tests/output/custom/oh-yeah-fr.html
@@ -4,9 +4,9 @@
Trop bien !
-
-
-
+
+
+
@@ -19,39 +19,40 @@
- Oh Oh Oh
+ - Override url/save_as
+ - This is a test page
+ - yeah
+ - misc
+ - cat1
+ - bar
+
-
+
+
-
+
Fri 02 March 2012
-
+
By Alexis Métaireau
-
-
+
-
+
-
+
- Biologeek
+ - Filyb
+ - Libert-fr
+ - N1k0
+ - Tarek Ziadé
+ - Zubin Mithra
+
-
+
- rss feed
+
+ - twitter
+ - lastfm
+ - github
+
-
+
diff --git a/pelican/tests/output/custom/oh-yeah.html b/pelican/tests/output/custom/oh-yeah.html
index 2f6ca309..49a79edc 100644
--- a/pelican/tests/output/custom/oh-yeah.html
+++ b/pelican/tests/output/custom/oh-yeah.html
@@ -4,9 +4,9 @@
Oh yeah !
-
-
-
+
+
+
@@ -19,35 +19,36 @@
- Oh Oh Oh
+ - Override url/save_as
+ - This is a test page
+ - yeah
+ - misc
+ - cat1
+ - bar
+
-
+
+
-
+
Wed 20 October 2010
-
+
By Alexis Métaireau
-
-
+
-
+
-
+
- Biologeek
+ - Filyb
+ - Libert-fr
+ - N1k0
+ - Tarek Ziadé
+ - Zubin Mithra
+
-
+
- rss feed
+
+ - twitter
+ - lastfm
+ - github
+
-
+
diff --git a/pelican/tests/output/custom/override/index.html b/pelican/tests/output/custom/override/index.html
index ad9fb8b1..c449f087 100644
--- a/pelican/tests/output/custom/override/index.html
+++ b/pelican/tests/output/custom/override/index.html
@@ -4,9 +4,9 @@
Override url/save_as
-
-
-
+
+
+
@@ -19,46 +19,46 @@
- Oh Oh Oh
+ - Override url/save_as
+ - This is a test page
+ - yeah
+ - misc
+ - cat1
+ - bar
+
-
-
+
-
+
- Biologeek
+ - Filyb
+ - Libert-fr
+ - N1k0
+ - Tarek Ziadé
+ - Zubin Mithra
+
-
+
- rss feed
+
+ - twitter
+ - lastfm
+ - github
+
-
+
diff --git a/pelican/tests/output/custom/pages/this-is-a-test-hidden-page.html b/pelican/tests/output/custom/pages/this-is-a-test-hidden-page.html
index b4ac59b0..4a82c542 100644
--- a/pelican/tests/output/custom/pages/this-is-a-test-hidden-page.html
+++ b/pelican/tests/output/custom/pages/this-is-a-test-hidden-page.html
@@ -4,9 +4,9 @@
This is a test hidden page
-
-
-
+
+
+
@@ -19,46 +19,46 @@
- Oh Oh Oh
+ - Override url/save_as
+ - This is a test page
+ - yeah
+ - misc
+ - cat1
+ - bar
+
-
-
+
-
+
- Biologeek
+ - Filyb
+ - Libert-fr
+ - N1k0
+ - Tarek Ziadé
+ - Zubin Mithra
+
-
+
- rss feed
+
+ - twitter
+ - lastfm
+ - github
+
-
+
diff --git a/pelican/tests/output/custom/pages/this-is-a-test-page.html b/pelican/tests/output/custom/pages/this-is-a-test-page.html
index b4cb678c..dbab2f13 100644
--- a/pelican/tests/output/custom/pages/this-is-a-test-page.html
+++ b/pelican/tests/output/custom/pages/this-is-a-test-page.html
@@ -4,9 +4,9 @@
This is a test page
-
-
-
+
+
+
@@ -19,46 +19,46 @@
- Oh Oh Oh
+ - Override url/save_as
+ - This is a test page
+ - yeah
+ - misc
+ - cat1
+ - bar
+
-
-
+
-
+
- Biologeek
+ - Filyb
+ - Libert-fr
+ - N1k0
+ - Tarek Ziadé
+ - Zubin Mithra
+
-
+
- rss feed
+
+ - twitter
+ - lastfm
+ - github
+
-
+
diff --git a/pelican/tests/output/custom/second-article-fr.html b/pelican/tests/output/custom/second-article-fr.html
index 3d5fbd29..c9b52338 100644
--- a/pelican/tests/output/custom/second-article-fr.html
+++ b/pelican/tests/output/custom/second-article-fr.html
@@ -4,9 +4,9 @@
Deuxième article
-
-
-
+
+
+
@@ -19,39 +19,40 @@
- Oh Oh Oh
+ - Override url/save_as
+ - This is a test page
+ - yeah
+ - misc
+ - cat1
+ - bar
+
-
+
+
-
+
Wed 29 February 2012
-
+
By Alexis Métaireau
-
-
+
-
+
-
+
- Biologeek
+ - Filyb
+ - Libert-fr
+ - N1k0
+ - Tarek Ziadé
+ - Zubin Mithra
+
-
+
- rss feed
+
+ - twitter
+ - lastfm
+ - github
+
-
+
diff --git a/pelican/tests/output/custom/second-article.html b/pelican/tests/output/custom/second-article.html
index be83983e..270653e0 100644
--- a/pelican/tests/output/custom/second-article.html
+++ b/pelican/tests/output/custom/second-article.html
@@ -4,9 +4,9 @@
Second article
-
-
-
+
+
+
@@ -19,39 +19,40 @@
- Oh Oh Oh
+ - Override url/save_as
+ - This is a test page
+ - yeah
+ - misc
+ - cat1
+ - bar
+
-
+
+
-
+
Wed 29 February 2012
-
+
By Alexis Métaireau
-
-
+
-
+
-
+
- Biologeek
+ - Filyb
+ - Libert-fr
+ - N1k0
+ - Tarek Ziadé
+ - Zubin Mithra
+
-
+
- rss feed
+
+ - twitter
+ - lastfm
+ - github
+
-
+
diff --git a/pelican/tests/output/custom/tag/bar.html b/pelican/tests/output/custom/tag/bar.html
index d1805e50..cdef164d 100644
--- a/pelican/tests/output/custom/tag/bar.html
+++ b/pelican/tests/output/custom/tag/bar.html
@@ -4,9 +4,9 @@
Alexis' log - bar
-
-
-
+
+
+
@@ -19,87 +19,82 @@
- Oh Oh Oh
+ - Override url/save_as
+ - This is a test page
+ - yeah
+ - misc
+ - cat1
+ - bar
+
-
-
-
+
-
+
Wed 29 February 2012
-
+
By Alexis Métaireau
-
-
-
+
+
-
-
-
+
-
+
-
+
Wed 20 October 2010
-
+
By Alexis Métaireau
-
read more
-
+
-
-
-
-
+
+
+
- Biologeek
+ - Filyb
+ - Libert-fr
+ - N1k0
+ - Tarek Ziadé
+ - Zubin Mithra
+
-
+
- rss feed
+
+ - twitter
+ - lastfm
+ - github
+
-
+
diff --git a/pelican/tests/output/custom/tag/baz.html b/pelican/tests/output/custom/tag/baz.html
index a6d23907..e92bdc04 100644
--- a/pelican/tests/output/custom/tag/baz.html
+++ b/pelican/tests/output/custom/tag/baz.html
@@ -2,11 +2,11 @@
- Alexis' log - baz
+ The baz tag
-
-
-
+
+
+
@@ -19,64 +19,77 @@
- Oh Oh Oh
+ - Override url/save_as
+ - This is a test page
+ - yeah
+ - misc
+ - cat1
+ - bar
+
-
-
+
+
+
+
-
-
-
-
- Wed 29 February 2012
+
+
+
+ Sun 14 March 2010
-
+
By Alexis Métaireau
-
-
+
+
+
+
+
+
+
+
- Biologeek
+ - Filyb
+ - Libert-fr
+ - N1k0
+ - Tarek Ziadé
+ - Zubin Mithra
+
-
+
- rss feed
+
+ - twitter
+ - lastfm
+ - github
+
-
+
diff --git a/pelican/tests/output/custom/tag/foo.html b/pelican/tests/output/custom/tag/foo.html
index 04cb7529..3bc93546 100644
--- a/pelican/tests/output/custom/tag/foo.html
+++ b/pelican/tests/output/custom/tag/foo.html
@@ -4,9 +4,9 @@
Alexis' log - foo
-
-
-
+
+
+
@@ -19,94 +19,91 @@
- Oh Oh Oh
+ - Override url/save_as
+ - This is a test page
+ - yeah
+ - misc
+ - cat1
+ - bar
+
-
-
-
+
-
+
Wed 29 February 2012
-
+
By Alexis Métaireau
-
-
-
+
+
-
-
-
-
+
+
+
- Biologeek
+ - Filyb
+ - Libert-fr
+ - N1k0
+ - Tarek Ziadé
+ - Zubin Mithra
+
-
+
- rss feed
+
+ - twitter
+ - lastfm
+ - github
+
-
+
diff --git a/pelican/tests/output/custom/tag/foobar.html b/pelican/tests/output/custom/tag/foobar.html
index 2c50c8ae..aee030f5 100644
--- a/pelican/tests/output/custom/tag/foobar.html
+++ b/pelican/tests/output/custom/tag/foobar.html
@@ -4,9 +4,9 @@
Alexis' log - foobar
-
-
-
+
+
+
@@ -19,29 +19,28 @@
- Oh Oh Oh
+ - Override url/save_as
+ - This is a test page
+ - yeah
+ - misc
+ - cat1
+ - bar
+
-
-
-
+
-
+
Thu 02 December 2010
-
+
By Alexis Métaireau
-
@@ -56,36 +55,36 @@
-
-
-
-
-
+
+
- Biologeek
+ - Filyb
+ - Libert-fr
+ - N1k0
+ - Tarek Ziadé
+ - Zubin Mithra
+
-
+
- rss feed
+
+ - twitter
+ - lastfm
+ - github
+
-
+
diff --git a/pelican/tests/output/custom/tag/oh.html b/pelican/tests/output/custom/tag/oh.html
index b798964e..efdd8724 100644
--- a/pelican/tests/output/custom/tag/oh.html
+++ b/pelican/tests/output/custom/tag/oh.html
@@ -2,11 +2,11 @@
- Alexis' log - oh
+ Oh Oh Oh
-
-
-
+
+
+
@@ -19,69 +19,45 @@
- Oh Oh Oh
+ - Override url/save_as
+ - This is a test page
+ - yeah
+ - misc
+ - cat1
+ - bar
+
-
-
-
-
-
-
-
- Wed 20 October 2010
-
-
-
- By Alexis Métaireau
-
-
+
-
-
-
-
-
-
-
-
+
+
- Biologeek
+ - Filyb
+ - Libert-fr
+ - N1k0
+ - Tarek Ziadé
+ - Zubin Mithra
+
-
+
- rss feed
+
+ - twitter
+ - lastfm
+ - github
+
-
+
diff --git a/pelican/tests/output/custom/tag/yeah.html b/pelican/tests/output/custom/tag/yeah.html
index 54ad93c6..ba2da881 100644
--- a/pelican/tests/output/custom/tag/yeah.html
+++ b/pelican/tests/output/custom/tag/yeah.html
@@ -4,9 +4,9 @@
Alexis' log - yeah
-
-
-
+
+
+
@@ -19,32 +19,31 @@
- Oh Oh Oh
+ - Override url/save_as
+ - This is a test page
+ - yeah
+ - misc
+ - cat1
+ - bar
+
-
-
-
+
-
+
Wed 20 October 2010
-
+
By Alexis Métaireau
-
-
-
-
-
-
+
+
- Biologeek
+ - Filyb
+ - Libert-fr
+ - N1k0
+ - Tarek Ziadé
+ - Zubin Mithra
+
-
+
- rss feed
+
+ - twitter
+ - lastfm
+ - github
+
-
+
diff --git a/pelican/tests/output/custom/this-is-a-super-article.html b/pelican/tests/output/custom/this-is-a-super-article.html
index 1fdd8897..5e2fe0bb 100644
--- a/pelican/tests/output/custom/this-is-a-super-article.html
+++ b/pelican/tests/output/custom/this-is-a-super-article.html
@@ -4,9 +4,9 @@
This is a super article !
-
-
-
+
+
+
@@ -19,32 +19,33 @@
- Oh Oh Oh
+ - Override url/save_as
+ - This is a test page
+ - yeah
+ - misc
+ - cat1
+ - bar
+
-
+
+
-
+
Thu 02 December 2010
-
+
By Alexis Métaireau
-
@@ -60,7 +61,7 @@
-
+
-
+
-
+
- Biologeek
+ - Filyb
+ - Libert-fr
+ - N1k0
+ - Tarek Ziadé
+ - Zubin Mithra
+
-
+
- rss feed
+
+ - twitter
+ - lastfm
+ - github
+
-
+
diff --git a/pelican/tests/output/custom/unbelievable.html b/pelican/tests/output/custom/unbelievable.html
index e7253497..26b60f38 100644
--- a/pelican/tests/output/custom/unbelievable.html
+++ b/pelican/tests/output/custom/unbelievable.html
@@ -4,9 +4,9 @@
Unbelievable !
-
-
-
+
+
+
@@ -19,39 +19,46 @@
- Oh Oh Oh
+ - Override url/save_as
+ - This is a test page
+ - yeah
+ - misc
+ - cat1
+ - bar
+
-
+
+
-
+
Fri 15 October 2010
-
+
By Alexis Métaireau
-
+
+
-
+
-
+
-
+
- Biologeek
+ - Filyb
+ - Libert-fr
+ - N1k0
+ - Tarek Ziadé
+ - Zubin Mithra
+
-
+
- rss feed
+
+ - twitter
+ - lastfm
+ - github
+
-
+
diff --git a/pelican/tests/test_contents.py b/pelican/tests/test_contents.py
index c081639d..af97db3f 100644
--- a/pelican/tests/test_contents.py
+++ b/pelican/tests/test_contents.py
@@ -191,6 +191,20 @@ class TestArticle(TestPage):
custom_article = Article(**article_kwargs)
self.assertEqual('custom', custom_article.template)
+ def test_slugify_category_author(self):
+ settings = get_settings()
+ settings['SLUG_SUBSTITUTIONS'] = [ ('C#', 'csharp') ]
+ settings['ARTICLE_URL'] = '{author}/{category}/{slug}/'
+ settings['ARTICLE_SAVE_AS'] = '{author}/{category}/{slug}/index.html'
+ article_kwargs = self._copy_page_kwargs()
+ article_kwargs['metadata']['author'] = "O'Brien"
+ article_kwargs['metadata']['category'] = 'C# & stuff'
+ article_kwargs['metadata']['title'] = 'fnord'
+ article_kwargs['settings'] = settings
+ article = Article(**article_kwargs)
+ self.assertEqual(article.url, 'obrien/csharp-stuff/fnord/')
+ self.assertEqual(article.save_as, 'obrien/csharp-stuff/fnord/index.html')
+
class TestURLWrapper(unittest.TestCase):
def test_comparisons(self):
diff --git a/pelican/tests/test_generators.py b/pelican/tests/test_generators.py
index 2b9028c3..d8a4336d 100644
--- a/pelican/tests/test_generators.py
+++ b/pelican/tests/test_generators.py
@@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
-from __future__ import unicode_literals, print_function
+from __future__ import unicode_literals
import os
from codecs import open
@@ -10,7 +10,6 @@ from tempfile import mkdtemp
from pelican.generators import (Generator, ArticlesGenerator, PagesGenerator,
TemplatePagesGenerator)
from pelican.writers import Writer
-from pelican.settings import DEFAULT_CONFIG
from pelican.tests.support import unittest, get_settings
CUR_DIR = os.path.dirname(__file__)
@@ -38,37 +37,19 @@ class TestGenerator(unittest.TestCase):
class TestArticlesGenerator(unittest.TestCase):
- def setUp(self):
- super(TestArticlesGenerator, self).setUp()
- self.generator = None
+ @classmethod
+ def setUpClass(cls):
+ settings = get_settings(filenames={})
+ settings['DEFAULT_CATEGORY'] = 'Default'
+ settings['DEFAULT_DATE'] = (1970, 1, 1)
- 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 = get_settings(filenames={})
- settings['DEFAULT_CATEGORY'] = 'Default'
- settings['DEFAULT_DATE'] = (1970, 1, 1)
- self.generator = ArticlesGenerator(
- context=settings.copy(), settings=settings,
- path=CONTENT_DIR, theme=settings['THEME'],
- output_path=None, markup=settings['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
+ cls.generator = ArticlesGenerator(
+ context=settings.copy(), settings=settings,
+ path=CONTENT_DIR, theme=settings['THEME'],
+ output_path=None, markup=settings['MARKUP'])
+ cls.generator.generate_context()
+ cls.articles = [[page.title, page.status, page.category.name,
+ page.template] for page in cls.generator.articles]
def test_generate_feeds(self):
settings = get_settings()
@@ -91,8 +72,6 @@ class TestArticlesGenerator(unittest.TestCase):
def test_generate_context(self):
- generator = self.get_populated_generator()
- articles = self.distill_articles(generator.articles)
articles_expected = [
['Article title', 'published', 'Default', 'article'],
['Article with markdown and summary metadata single', 'published',
@@ -116,38 +95,37 @@ class TestArticlesGenerator(unittest.TestCase):
['Article with markdown containing footnotes', 'published',
'Default', 'article']
]
- self.assertEqual(sorted(articles_expected), sorted(articles))
+ self.assertEqual(sorted(articles_expected), sorted(self.articles))
def test_generate_categories(self):
- generator = self.get_populated_generator()
# test for name
# categories are grouped by slug; if two categories have the same slug
# but different names they will be grouped together, the first one in
# terms of process order will define the name for that category
- categories = [cat.name for cat, _ in generator.categories]
+ categories = [cat.name for cat, _ in self.generator.categories]
categories_alternatives = (
sorted(['Default', 'TestCategory', 'Yeah', 'test', '指導書']),
sorted(['Default', 'TestCategory', 'yeah', 'test', '指導書']),
)
self.assertIn(sorted(categories), categories_alternatives)
# test for slug
- categories = [cat.slug for cat, _ in generator.categories]
+ categories = [cat.slug for cat, _ in self.generator.categories]
categories_expected = ['default', 'testcategory', 'yeah', 'test',
'zhi-dao-shu']
self.assertEqual(sorted(categories), sorted(categories_expected))
def test_do_not_use_folder_as_category(self):
- settings = DEFAULT_CONFIG.copy()
+ settings = get_settings(filenames={})
settings['DEFAULT_CATEGORY'] = 'Default'
settings['DEFAULT_DATE'] = (1970, 1, 1)
settings['USE_FOLDER_AS_CATEGORY'] = False
settings['filenames'] = {}
generator = ArticlesGenerator(
context=settings.copy(), settings=settings,
- path=CONTENT_DIR, theme=DEFAULT_CONFIG['THEME'],
- output_path=None, markup=DEFAULT_CONFIG['MARKUP'])
+ path=CONTENT_DIR, theme=settings['THEME'],
+ output_path=None, markup=settings['MARKUP'])
generator.generate_context()
# test for name
# categories are grouped by slug; if two categories have the same slug
@@ -174,8 +152,8 @@ class TestArticlesGenerator(unittest.TestCase):
write = MagicMock()
generator.generate_direct_templates(write)
write.assert_called_with("archives.html",
- generator.get_template("archives"), settings,
- blog=True, paginated={}, page_name='archives')
+ generator.get_template("archives"), settings,
+ blog=True, paginated={}, page_name='archives')
def test_direct_templates_save_as_modified(self):
@@ -189,8 +167,9 @@ class TestArticlesGenerator(unittest.TestCase):
write = MagicMock()
generator.generate_direct_templates(write)
write.assert_called_with("archives/index.html",
- generator.get_template("archives"), settings,
- blog=True, paginated={}, page_name='archives/index')
+ generator.get_template("archives"), settings,
+ blog=True, paginated={},
+ page_name='archives/index')
def test_direct_templates_save_as_false(self):
@@ -209,14 +188,12 @@ class TestArticlesGenerator(unittest.TestCase):
"""
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)
+ self.assertIn(custom_template, self.articles)
+ self.assertIn(standard_template, self.articles)
class TestPageGenerator(unittest.TestCase):
@@ -226,15 +203,7 @@ class TestPageGenerator(unittest.TestCase):
# to match expected
def distill_pages(self, pages):
- distilled = []
- for page in pages:
- distilled.append([
- page.title,
- page.status,
- page.template
- ]
- )
- return distilled
+ return [[page.title, page.status, page.template] for page in pages]
def test_generate_context(self):
settings = get_settings(filenames={})
@@ -301,8 +270,7 @@ class TestTemplatePagesGenerator(unittest.TestCase):
writer = Writer(self.temp_output, settings=settings)
generator.generate_output(writer)
- output_path = os.path.join(
- self.temp_output, 'generated', 'file.html')
+ output_path = os.path.join(self.temp_output, 'generated', 'file.html')
# output file has been generated
self.assertTrue(os.path.exists(output_path))
diff --git a/pelican/tests/test_readers.py b/pelican/tests/test_readers.py
index 14d42325..c67b8a1f 100644
--- a/pelican/tests/test_readers.py
+++ b/pelican/tests/test_readers.py
@@ -350,6 +350,21 @@ class HTMLReaderTest(ReaderTest):
for key, value in expected.items():
self.assertEqual(value, page.metadata[key], key)
+ def test_article_with_metadata_and_contents_attrib(self):
+ page = self.read_file(path='article_with_metadata_and_contents.html')
+ expected = {
+ 'category': 'yeah',
+ 'author': 'Alexis Métaireau',
+ 'title': 'This is a super article !',
+ 'summary': 'Summary and stuff',
+ 'date': datetime.datetime(2010, 12, 2, 10, 14),
+ 'tags': ['foo', 'bar', 'foobar'],
+ 'custom_field': 'http://notmyidea.org',
+ }
+ for key, value in expected.items():
+ self.assertEqual(value, page.metadata[key], key)
+
+
def test_article_with_null_attributes(self):
page = self.read_file(path='article_with_null_attributes.html')
diff --git a/pelican/tests/test_settings.py b/pelican/tests/test_settings.py
index b1e813e1..7907a551 100644
--- a/pelican/tests/test_settings.py
+++ b/pelican/tests/test_settings.py
@@ -2,6 +2,7 @@
from __future__ import unicode_literals, print_function
import copy
import os
+import locale
from os.path import dirname, abspath, join
from pelican.settings import (read_settings, configure_settings,
@@ -92,3 +93,14 @@ class TestSettingsConfiguration(unittest.TestCase):
settings['FEED_DOMAIN'] = 'http://feeds.example.com'
configure_settings(settings)
self.assertEqual(settings['FEED_DOMAIN'], 'http://feeds.example.com')
+
+ def test_default_encoding(self):
+ # test that the default locale is set if
+ # locale is not specified in the settings
+
+ #reset locale to python default
+ locale.setlocale(locale.LC_ALL, str('C'))
+ self.assertEqual(self.settings['LOCALE'], DEFAULT_CONFIG['LOCALE'])
+
+ configure_settings(self.settings)
+ self.assertEqual(locale.getlocale(), locale.getdefaultlocale())
diff --git a/pelican/themes/notmyidea/templates/base.html b/pelican/themes/notmyidea/templates/base.html
index 9bf4b12b..4a00c93d 100644
--- a/pelican/themes/notmyidea/templates/base.html
+++ b/pelican/themes/notmyidea/templates/base.html
@@ -3,7 +3,7 @@
{% block title %}{{ SITENAME }}{%endblock%}
-
+
{% if FEED_ALL_ATOM %}
{% endif %}
@@ -25,13 +25,13 @@
- {{ title }}
{% endfor %}
{% if DISPLAY_PAGES_ON_MENU -%}
- {% for page in PAGES %}
- - {{ page.title }}
+ {% for pg in PAGES %}
+ - {{ pg.title }}
{% endfor %}
{% endif %}
{% if DISPLAY_CATEGORIES_ON_MENU -%}
{% for cat, null in categories %}
- - {{ cat }}
+ - {{ cat }}
{% endfor %}
{% endif %}
@@ -53,7 +53,9 @@
blogroll
-- Biologeek
- - Filyb
- - Libert-fr
- - N1k0
- - Tarek Ziadé
- - Zubin Mithra
-
+social
- atom feed
- - rss feed
-
- - twitter
- - lastfm
- - github
-
+Alexis' log
+Oh yeah !
-Oh yeah !
+In bar.
-tags: ohbaryeah
Translations: - fr - +In bar.
+tags: ohbaryeah
Translations: + fr +Why not ?
After all, why not ? It's pretty simple to do it, and it will allow me to write my blogposts in rst ! @@ -52,36 +51,36 @@ YEAH !
There are comments.
- Page 1 / 1 -
-+ Page 1 / 1 +
+ + + +blogroll
-- Biologeek
- - Filyb
- - Libert-fr
- - N1k0
- - Tarek Ziadé
- - Zubin Mithra
-
+social
- atom feed
- - rss feed
-
- - twitter
- - lastfm
- - github
-
+Alexis' log
+A markdown powered article
-A markdown powered article
+In cat1.
+In cat1.
You're mutually oblivious.
a root-relative link to unbelievable a file-relative link to unbelievable
There are comments.
Other articles
- - -
+
-
+
-
+
Thu 17 February 2011
-
+
By Alexis Métaireau
-
+
Article 1
In cat1.
+In cat1.
Article 1
read more -There are comments.
There are comments.
Article 2
In cat1.
+In cat1.
Article 2
read more -There are comments.
There are comments.
Article 3
In cat1.
+In cat1.
Article 3
read more -There are comments.
There are comments.
- Page 1 / 1 -
- -+ Page 1 / 1 +
+ +blogroll
-- Biologeek
- - Filyb
- - Libert-fr
- - N1k0
- - Tarek Ziadé
- - Zubin Mithra
-
+social
- atom feed
- - rss feed
-
- - twitter
- - lastfm
- - github
-
+Alexis' log
+FILENAME_METADATA example
-FILENAME_METADATA example
+In misc.
+In misc.
Some cool stuff!
There are comments.
Other articles
- - -
+
-
+
-
+
Wed 29 February 2012
-
+
By Alexis Métaireau
-
+
Second article
In misc.
-tags: foobarbaz
Translations: - fr - +In misc.
+tags: foobarbaz
Translations: + fr +This is some article, in english
read more -There are comments.
There are comments.
Unbelievable !
In misc.
+In misc.
Or completely awesome. Depends the needs.
a root-relative link to markdown-article a file-relative link to markdown-article
+Testing sourcecode directive
+Lovely.
+There are comments.
There are comments.
- Page 1 / 1 -
-The baz tag
+In misc.
+ +This article overrides the listening of the articles under the baz tag.
+ + read more +There are comments.
+ Page 1 / 1 +
+ +blogroll
-- Biologeek
- - Filyb
- - Libert-fr
- - N1k0
- - Tarek Ziadé
- - Zubin Mithra
-
+social
- atom feed
- - rss feed
-
- - twitter
- - lastfm
- - github
-
+Alexis' log
+This is a super article !
-This is a super article !
+In yeah.
+In yeah.
tags: foobarfoobar
Some content here !
→ And now try with some utf8 hell: ééé
There are comments.
- Page 1 / 1 -
-+ Page 1 / 1 +
+ + + +blogroll
-- Biologeek
- - Filyb
- - Libert-fr
- - N1k0
- - Tarek Ziadé
- - Zubin Mithra
-
+social
- atom feed
- - rss feed
-
- - twitter
- - lastfm
- - github
-
+Alexis' log
+A draft article
-In misc.
+In misc.
This is a draft article, it should live under the /drafts/ folder and not be listed anywhere else.
blogroll
-- Biologeek
- - Filyb
- - Libert-fr
- - N1k0
- - Tarek Ziadé
- - Zubin Mithra
-
+social
- atom feed
- - rss feed
-
- - twitter
- - lastfm
- - github
-
+Alexis' log
+FILENAME_METADATA example
-In misc.
+In misc.
Some cool stuff!
Comments !
blogroll
-- Biologeek
- - Filyb
- - Libert-fr
- - N1k0
- - Tarek Ziadé
- - Zubin Mithra
-
+social
- atom feed
- - rss feed
-
- - twitter
- - lastfm
- - github
-
+Alexis' log
+FILENAME_METADATA example
-FILENAME_METADATA example
+In misc.
+In misc.
Some cool stuff!
There are comments.
Other articles
- - -
+
-
+
-
+
Wed 29 February 2012
-
+
By Alexis Métaireau
-
+
Second article
In misc.
-tags: foobarbaz
Translations: - fr - +In misc.
+tags: foobarbaz
Translations: + fr +This is some article, in english
read more -There are comments.
There are comments.
A markdown powered article
In cat1.
+In cat1.
You're mutually oblivious.
a root-relative link to unbelievable a file-relative link to unbelievable
read more -There are comments.
There are comments.
Article 1
In cat1.
+In cat1.
Article 1
read more -There are comments.
There are comments.
- Page 1 / 3 - » -
-+ Page 1 / 3 + » +
+ +blogroll
-- Biologeek
- - Filyb
- - Libert-fr
- - N1k0
- - Tarek Ziadé
- - Zubin Mithra
-
+social
- atom feed
- - rss feed
-
- - twitter
- - lastfm
- - github
-
+Alexis' log
+-
+
-
+
-
+
Thu 17 February 2011
-
+
By Alexis Métaireau
-
+
Article 2
In cat1.
+In cat1.
Article 2
read more -There are comments.
There are comments.
Article 3
In cat1.
+In cat1.
Article 3
read more -There are comments.
There are comments.
This is a super article !
In yeah.
+In yeah.
tags: foobarfoobar
Multi-line metadata should be supported as well as inline markup.
read more -There are comments.
There are comments.
Oh yeah !
In bar.
-tags: ohbaryeah
Translations: - fr - +In bar.
+tags: ohbaryeah
Translations: + fr +Why not ?
After all, why not ? It's pretty simple to do it, and it will allow me to write my blogposts in rst ! @@ -136,39 +128,39 @@ YEAH !
There are comments.
There are comments.
- « - Page 2 / 3 - » -
-+ « + Page 2 / 3 + » +
+ +blogroll
-- Biologeek
- - Filyb
- - Libert-fr
- - N1k0
- - Tarek Ziadé
- - Zubin Mithra
-
+social
- atom feed
- - rss feed
-
- - twitter
- - lastfm
- - github
-
+Alexis' log
+-
+
-
+
-
+
Fri 15 October 2010
-
+
By Alexis Métaireau
-
+
+
read more
-
+
Unbelievable !
In misc.
+In misc.
Or completely awesome. Depends the needs.
a root-relative link to markdown-article a file-relative link to markdown-article
+Testing sourcecode directive
+Lovely.
+There are comments.
There are comments.
- « - Page 3 / 3 -
-The baz tag
+In misc.
+ +This article overrides the listening of the articles under the baz tag.
+ + read more +There are comments.
+ « + Page 3 / 3 +
+ +blogroll
-- Biologeek
- - Filyb
- - Libert-fr
- - N1k0
- - Tarek Ziadé
- - Zubin Mithra
-
+social
- atom feed
- - rss feed
-
- - twitter
- - lastfm
- - github
-
+Alexis' log
+blogroll
-- Biologeek
- - Filyb
- - Libert-fr
- - N1k0
- - Tarek Ziadé
- - Zubin Mithra
-
+social
- atom feed
- - rss feed
-
- - twitter
- - lastfm
- - github
-
+Alexis' log
+Trop bien !
-In misc.
-Translations: - en - +In misc.
+Translations: + en +Et voila du contenu en français
Comments !
blogroll
-- Biologeek
- - Filyb
- - Libert-fr
- - N1k0
- - Tarek Ziadé
- - Zubin Mithra
-
+social
- atom feed
- - rss feed
-
- - twitter
- - lastfm
- - github
-
+Alexis' log
+Oh yeah !
-In bar.
-tags: ohbaryeah
Translations: - fr - +In bar.
+tags: ohbaryeah
Translations: + fr +Why not ?
After all, why not ? It's pretty simple to do it, and it will allow me to write my blogposts in rst ! @@ -56,7 +57,7 @@ YEAH !
Comments !
blogroll
-- Biologeek
- - Filyb
- - Libert-fr
- - N1k0
- - Tarek Ziadé
- - Zubin Mithra
-
+social
- atom feed
- - rss feed
-
- - twitter
- - lastfm
- - github
-
+Alexis' log
+Override url/save_as
- -Test page which overrides save_as and url so that this page will be generated + +
Test page which overrides save_as and url so that this page will be generated at a custom location.
blogroll
-- Biologeek
- - Filyb
- - Libert-fr
- - N1k0
- - Tarek Ziadé
- - Zubin Mithra
-
+social
- atom feed
- - rss feed
-
- - twitter
- - lastfm
- - github
-
+Alexis' log
+This is a test hidden page
- -This is great for things like error(404) pages + +
This is great for things like error(404) pages Anyone can see this page but it's not linked to anywhere!
blogroll
-- Biologeek
- - Filyb
- - Libert-fr
- - N1k0
- - Tarek Ziadé
- - Zubin Mithra
-
+social
- atom feed
- - rss feed
-
- - twitter
- - lastfm
- - github
-
+Alexis' log
+This is a test page
- -Just an image.
+ +Just an image.
blogroll
-- Biologeek
- - Filyb
- - Libert-fr
- - N1k0
- - Tarek Ziadé
- - Zubin Mithra
-
+social
- atom feed
- - rss feed
-
- - twitter
- - lastfm
- - github
-
+Alexis' log
+Deuxième article
-In misc.
-tags: foobarbaz
Translations: - en - +In misc.
+tags: foobarbaz
Translations: + en +Ceci est un article, en français.
Comments !
blogroll
-- Biologeek
- - Filyb
- - Libert-fr
- - N1k0
- - Tarek Ziadé
- - Zubin Mithra
-
+social
- atom feed
- - rss feed
-
- - twitter
- - lastfm
- - github
-
+Alexis' log
+Second article
-In misc.
-tags: foobarbaz
Translations: - fr - +In misc.
+tags: foobarbaz
Translations: + fr +This is some article, in english
Comments !
blogroll
-- Biologeek
- - Filyb
- - Libert-fr
- - N1k0
- - Tarek Ziadé
- - Zubin Mithra
-
+social
- atom feed
- - rss feed
-
- - twitter
- - lastfm
- - github
-
+Alexis' log
+Second article
-Second article
+In misc.
-tags: foobarbaz
Translations: - fr - +In misc.
+tags: foobarbaz
Translations: + fr +This is some article, in english
There are comments.
Other articles
- - -
+
-
+
-
+
Thu 02 December 2010
-
+
By Alexis Métaireau
-
+
This is a super article !
In yeah.
+In yeah.
tags: foobarfoobar
Multi-line metadata should be supported as well as inline markup.
read more -There are comments.
There are comments.
Oh yeah !
In bar.
-tags: ohbaryeah
Translations: - fr - +In bar.
+tags: ohbaryeah
Translations: + fr +Why not ?
After all, why not ? It's pretty simple to do it, and it will allow me to write my blogposts in rst ! @@ -108,37 +103,37 @@ YEAH !
There are comments.
There are comments.
- Page 1 / 1 -
-+ Page 1 / 1 +
+ +blogroll
-- Biologeek
- - Filyb
- - Libert-fr
- - N1k0
- - Tarek Ziadé
- - Zubin Mithra
-
+social
- atom feed
- - rss feed
-
- - twitter
- - lastfm
- - github
-
+Alexis' log
++ The baz tag
+Second article
-In misc.
-tags: foobarbaz
Translations: - fr - -This is some article, in english
-There are comments.
-- Page 1 / 1 -
- - - -In misc.
+ +This article overrides the listening of the articles under the baz tag.
+ +Comments !
+ + +blogroll
-- Biologeek
- - Filyb
- - Libert-fr
- - N1k0
- - Tarek Ziadé
- - Zubin Mithra
-
+social
- atom feed
- - rss feed
-
- - twitter
- - lastfm
- - github
-
+Alexis' log
+Second article
-Second article
+In misc.
-tags: foobarbaz
Translations: - fr - +In misc.
+tags: foobarbaz
Translations: + fr +This is some article, in english
There are comments.
Other articles
- - -
+
-
+
-
+
Thu 02 December 2010
-
+
By Alexis Métaireau
-
+
This is a super article !
In yeah.
+In yeah.
tags: foobarfoobar
Multi-line metadata should be supported as well as inline markup.
read more -There are comments.
There are comments.
- Page 1 / 1 -
-+ Page 1 / 1 +
+ +blogroll
-- Biologeek
- - Filyb
- - Libert-fr
- - N1k0
- - Tarek Ziadé
- - Zubin Mithra
-
+social
- atom feed
- - rss feed
-
- - twitter
- - lastfm
- - github
-
+Alexis' log
+This is a super article !
-This is a super article !
+In yeah.
+In yeah.
tags: foobarfoobar
Some content here !
→ And now try with some utf8 hell: ééé
There are comments.
- Page 1 / 1 -
-+ Page 1 / 1 +
+ + + +blogroll
-- Biologeek
- - Filyb
- - Libert-fr
- - N1k0
- - Tarek Ziadé
- - Zubin Mithra
-
+social
- atom feed
- - rss feed
-
- - twitter
- - lastfm
- - github
-
+Alexis' log
+Oh yeah !
-In bar.
-tags: ohbaryeah
Translations: - fr +Oh Oh Oh
-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 !
-There are comments.
- Page 1 / 1 -
-This page overrides the listening of the articles under the oh tag.
+ + +blogroll
-- Biologeek
- - Filyb
- - Libert-fr
- - N1k0
- - Tarek Ziadé
- - Zubin Mithra
-
+social
- atom feed
- - rss feed
-
- - twitter
- - lastfm
- - github
-
+Alexis' log
+Oh yeah !
-Oh yeah !
+In bar.
-tags: ohbaryeah
Translations: - fr - +In bar.
+tags: ohbaryeah
Translations: + fr +Why not ?
After all, why not ? It's pretty simple to do it, and it will allow me to write my blogposts in rst ! @@ -52,36 +51,36 @@ YEAH !
There are comments.
- Page 1 / 1 -
-+ Page 1 / 1 +
+ + + +blogroll
-- Biologeek
- - Filyb
- - Libert-fr
- - N1k0
- - Tarek Ziadé
- - Zubin Mithra
-
+social
- atom feed
- - rss feed
-
- - twitter
- - lastfm
- - github
-
+Alexis' log
+This is a super article !
-In yeah.
+In yeah.
tags: foobarfoobar
Some content here !
Comments !
blogroll
-- Biologeek
- - Filyb
- - Libert-fr
- - N1k0
- - Tarek Ziadé
- - Zubin Mithra
-
+social
- atom feed
- - rss feed
-
- - twitter
- - lastfm
- - github
-
+Alexis' log
+Unbelievable !
-In misc.
+In misc.
Or completely awesome. Depends the needs.
a root-relative link to markdown-article a file-relative link to markdown-article
+Testing sourcecode directive
+Lovely.
+Comments !
blogroll
-- Biologeek
- - Filyb
- - Libert-fr
- - N1k0
- - Tarek Ziadé
- - Zubin Mithra
-
+social
- atom feed
- - rss feed
-
- - twitter
- - lastfm
- - github
-
+social
+ {% if FEED_ALL_ATOM %}- atom feed
+ {% endif %}
{% if FEED_ALL_RSS %}
- rss feed
{% endif %}
diff --git a/pelican/themes/notmyidea/templates/index.html b/pelican/themes/notmyidea/templates/index.html
index 8752a6b6..2d45bb2a 100644
--- a/pelican/themes/notmyidea/templates/index.html
+++ b/pelican/themes/notmyidea/templates/index.html
@@ -1,14 +1,14 @@
{% extends "base.html" %}
{% block content_title %}{% endblock %}
-{% block content %}
+{% block content %}
{% if articles %}
- {% for article in articles_page.object_list %}
+ {% for article in articles_page.object_list %}
{# First item #}
{% if loop.first and not articles_page.has_previous() %}
-
{% if loop.length == 1 %}
@@ -22,17 +22,17 @@
{{ article.title }}
+{{ article.title }}
{% include 'article_infos.html' %}{{ article.content }}{% include 'comments.html' %}{% endif %} {# other items #} - {% else %} + {% else %} {% if loop.first and articles_page.has_previous %}
{% endif %} -
+
-
+
{% include 'article_infos.html' %}
{{ article.summary }}
@@ -43,7 +43,7 @@
{% endif %}
{% if loop.last %}
- {% if loop.last and (articles_page.has_previous()
+ {% if loop.last and (articles_page.has_previous()
or not articles_page.has_previous() and loop.length > 1) %}
{% include 'pagination.html' %}
{% endif %}
@@ -51,7 +51,7 @@
{% endif %}
{% endfor %}
{% else %}
-
+
{{ article.title }}
Pages
{% for page in PAGES %}