mirror of
https://github.com/getpelican/pelican.git
synced 2025-10-15 20:28:56 +02:00
Merge branch 'restore-basic-functional-test'
This commit is contained in:
commit
03c39076e5
22 changed files with 26 additions and 618 deletions
|
|
@ -56,7 +56,7 @@ To do so, you can use the following two 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/
|
||||
$ LC_ALL="C" pelican -o tests/output/basic/ samples/content/
|
||||
|
||||
Coding standards
|
||||
================
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ 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.
|
||||
`DEFAULT_DATE` (``fs``) The default date you want to use.
|
||||
`DEFAULT_DATE` (``None``) 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.
|
||||
|
|
|
|||
|
|
@ -331,7 +331,7 @@ class ArticlesGenerator(Generator):
|
|||
if category != '':
|
||||
metadata['category'] = Category(category, self.settings)
|
||||
|
||||
if 'date' not in metadata and self.settings['DEFAULT_DATE']:
|
||||
if 'date' not in metadata and self.settings.get('DEFAULT_DATE'):
|
||||
if self.settings['DEFAULT_DATE'] == 'fs':
|
||||
metadata['date'] = datetime.datetime.fromtimestamp(
|
||||
os.stat(f).st_ctime)
|
||||
|
|
|
|||
|
|
@ -36,7 +36,6 @@ _DEFAULT_CONFIG = {'PATH': '.',
|
|||
'OUTPUT_SOURCES_EXTENSION': '.text',
|
||||
'USE_FOLDER_AS_CATEGORY': True,
|
||||
'DEFAULT_CATEGORY': 'misc',
|
||||
'DEFAULT_DATE': 'fs',
|
||||
'WITH_FUTURE_DATES': True,
|
||||
'CSS_FILE': 'main.css',
|
||||
'NEWEST_FIRST_ARCHIVES': True,
|
||||
|
|
|
|||
|
|
@ -2,5 +2,6 @@ This is an article with category !
|
|||
##################################
|
||||
|
||||
:category: yeah
|
||||
:date: 1970-01-01
|
||||
|
||||
This article should be in 'yeah' category.
|
||||
|
|
|
|||
|
|
@ -44,9 +44,7 @@
|
|||
By <a class="url fn" href=".././author/alexis-metaireau.html">Alexis Métaireau</a>
|
||||
</address>
|
||||
<p>In <a href=".././category/bar.html">bar</a>. </p>
|
||||
<p>tags: <a href=".././tag/oh.html">oh</a><a href=".././tag/bar.html">bar</a><a href=".././tag/yeah.html">yeah</a></p>Translations:
|
||||
<a href=".././oh-yeah-fr.html">fr</a>
|
||||
|
||||
<p>tags: <a href=".././tag/oh.html">oh</a><a href=".././tag/bar.html">bar</a><a href=".././tag/yeah.html">yeah</a></p>
|
||||
</footer><!-- /.post-info --><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 !
|
||||
|
|
|
|||
|
|
@ -1,288 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>A Pelican Blog - Dummy Author</title>
|
||||
<meta charset="utf-8" />
|
||||
<link rel="stylesheet" href=".././theme/css/main.css" type="text/css" />
|
||||
|
||||
<link href="/feeds/all.atom.xml" type="application/atom+xml" rel="alternate" title="A Pelican Blog Atom Feed" />
|
||||
|
||||
|
||||
|
||||
<!--[if IE]>
|
||||
<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script><![endif]-->
|
||||
|
||||
<!--[if lte IE 7]>
|
||||
<link rel="stylesheet" type="text/css" media="all" href=".././css/ie.css"/>
|
||||
<script src=".././js/IE8.js" type="text/javascript"></script><![endif]-->
|
||||
|
||||
<!--[if lt IE 7]>
|
||||
<link rel="stylesheet" type="text/css" media="all" href=".././css/ie6.css"/><![endif]-->
|
||||
|
||||
</head>
|
||||
|
||||
<body id="index" class="home">
|
||||
|
||||
<header id="banner" class="body">
|
||||
<h1><a href="../.">A Pelican Blog </a></h1>
|
||||
<nav><ul>
|
||||
|
||||
|
||||
|
||||
<li><a href=".././pages/this-is-a-test-page.html">This is a test page</a></li>
|
||||
|
||||
|
||||
|
||||
<li ><a href=".././category/bar.html">bar</a></li>
|
||||
|
||||
<li ><a href=".././category/cat1.html">cat1</a></li>
|
||||
|
||||
<li ><a href=".././category/misc.html">misc</a></li>
|
||||
|
||||
<li ><a href=".././category/yeah.html">yeah</a></li>
|
||||
|
||||
</ul></nav>
|
||||
</header><!-- /#banner -->
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<aside id="featured" class="body">
|
||||
<article>
|
||||
<h1 class="entry-title"><a href=".././a-markdown-powered-article.html">A markdown powered article</a></h1>
|
||||
<footer class="post-info">
|
||||
<abbr class="published" title="2011-04-20T00:00:00">
|
||||
Wed 20 April 2011
|
||||
</abbr>
|
||||
|
||||
|
||||
<address class="vcard author">
|
||||
By <a class="url fn" href=".././author/dummy-author.html">Dummy Author</a>
|
||||
</address>
|
||||
|
||||
<p>In <a href=".././category/cat1.html">cat1</a>. </p>
|
||||
|
||||
|
||||
|
||||
</footer><!-- /.post-info --><p>You're mutually oblivious.</p>
|
||||
</article>
|
||||
|
||||
</aside><!-- /#featured -->
|
||||
|
||||
<section id="content" class="body">
|
||||
<h1>Other articles</h1>
|
||||
<hr />
|
||||
<ol id="posts-list" class="hfeed">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<li><article class="hentry">
|
||||
<header>
|
||||
<h1><a href=".././article-1.html" rel="bookmark"
|
||||
title="Permalink to Article 1">Article 1</a></h1>
|
||||
</header>
|
||||
|
||||
<div class="entry-content">
|
||||
<footer class="post-info">
|
||||
<abbr class="published" title="2011-02-17T00:00:00">
|
||||
Thu 17 February 2011
|
||||
</abbr>
|
||||
|
||||
|
||||
<address class="vcard author">
|
||||
By <a class="url fn" href=".././author/dummy-author.html">Dummy Author</a>
|
||||
</address>
|
||||
|
||||
<p>In <a href=".././category/cat1.html">cat1</a>. </p>
|
||||
|
||||
|
||||
|
||||
</footer><!-- /.post-info -->
|
||||
<p>Article 1</p>
|
||||
|
||||
<a class="readmore" href=".././article-1.html">read more</a>
|
||||
|
||||
</div><!-- /.entry-content -->
|
||||
</article></li>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<li><article class="hentry">
|
||||
<header>
|
||||
<h1><a href=".././article-2.html" rel="bookmark"
|
||||
title="Permalink to Article 2">Article 2</a></h1>
|
||||
</header>
|
||||
|
||||
<div class="entry-content">
|
||||
<footer class="post-info">
|
||||
<abbr class="published" title="2011-02-17T00:00:00">
|
||||
Thu 17 February 2011
|
||||
</abbr>
|
||||
|
||||
|
||||
<address class="vcard author">
|
||||
By <a class="url fn" href=".././author/dummy-author.html">Dummy Author</a>
|
||||
</address>
|
||||
|
||||
<p>In <a href=".././category/cat1.html">cat1</a>. </p>
|
||||
|
||||
|
||||
|
||||
</footer><!-- /.post-info -->
|
||||
<p>Article 2</p>
|
||||
|
||||
<a class="readmore" href=".././article-2.html">read more</a>
|
||||
|
||||
</div><!-- /.entry-content -->
|
||||
</article></li>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<li><article class="hentry">
|
||||
<header>
|
||||
<h1><a href=".././article-3.html" rel="bookmark"
|
||||
title="Permalink to Article 3">Article 3</a></h1>
|
||||
</header>
|
||||
|
||||
<div class="entry-content">
|
||||
<footer class="post-info">
|
||||
<abbr class="published" title="2011-02-17T00:00:00">
|
||||
Thu 17 February 2011
|
||||
</abbr>
|
||||
|
||||
|
||||
<address class="vcard author">
|
||||
By <a class="url fn" href=".././author/dummy-author.html">Dummy Author</a>
|
||||
</address>
|
||||
|
||||
<p>In <a href=".././category/cat1.html">cat1</a>. </p>
|
||||
|
||||
|
||||
|
||||
</footer><!-- /.post-info -->
|
||||
<p>Article 3</p>
|
||||
|
||||
<a class="readmore" href=".././article-3.html">read more</a>
|
||||
|
||||
</div><!-- /.entry-content -->
|
||||
</article></li>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<li><article class="hentry">
|
||||
<header>
|
||||
<h1><a href=".././second-article.html" rel="bookmark"
|
||||
title="Permalink to Second article">Second article</a></h1>
|
||||
</header>
|
||||
|
||||
<div class="entry-content">
|
||||
<footer class="post-info">
|
||||
<abbr class="published" title="2012-02-29T00:00:00">
|
||||
Wed 29 February 2012
|
||||
</abbr>
|
||||
|
||||
|
||||
<address class="vcard author">
|
||||
By <a class="url fn" href=".././author/dummy-author.html">Dummy Author</a>
|
||||
</address>
|
||||
|
||||
<p>In <a href=".././category/misc.html">misc</a>. </p>
|
||||
<p>tags: <a href=".././tag/foo.html">foo</a><a href=".././tag/bar.html">bar</a><a href=".././tag/baz.html">baz</a></p>
|
||||
|
||||
|
||||
Translations:
|
||||
|
||||
<a href=".././second-article-fr.html">fr</a>
|
||||
|
||||
|
||||
</footer><!-- /.post-info -->
|
||||
<p>This is some article, in english</p>
|
||||
|
||||
<a class="readmore" href=".././second-article.html">read more</a>
|
||||
|
||||
</div><!-- /.entry-content -->
|
||||
</article></li>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<li><article class="hentry">
|
||||
<header>
|
||||
<h1><a href=".././unbelievable.html" rel="bookmark"
|
||||
title="Permalink to Unbelievable !">Unbelievable !</a></h1>
|
||||
</header>
|
||||
|
||||
<div class="entry-content">
|
||||
<footer class="post-info">
|
||||
<abbr class="published" title="2010-10-15T20:30:00">
|
||||
Fri 15 October 2010
|
||||
</abbr>
|
||||
|
||||
|
||||
<address class="vcard author">
|
||||
By <a class="url fn" href=".././author/dummy-author.html">Dummy Author</a>
|
||||
</address>
|
||||
|
||||
<p>In <a href=".././category/misc.html">misc</a>. </p>
|
||||
|
||||
|
||||
|
||||
</footer><!-- /.post-info -->
|
||||
<p>Or completely awesome. Depends the needs.</p>
|
||||
|
||||
<a class="readmore" href=".././unbelievable.html">read more</a>
|
||||
|
||||
</div><!-- /.entry-content -->
|
||||
</article></li>
|
||||
|
||||
|
||||
</ol><!-- /#posts-list -->
|
||||
|
||||
|
||||
|
||||
</section><!-- /#content -->
|
||||
|
||||
|
||||
|
||||
|
||||
<section id="extras" class="body">
|
||||
|
||||
|
||||
</section><!-- /#extras -->
|
||||
|
||||
<footer id="contentinfo" class="body">
|
||||
<address id="about" class="vcard body">
|
||||
Proudly powered by <a href="http://getpelican.com/">Pelican</a>, which takes great advantage of <a href="http://python.org">Python</a>.
|
||||
</address><!-- /#about -->
|
||||
|
||||
<p>The theme is by <a href="http://coding.smashingmagazine.com/2009/08/04/designing-a-html-5-layout-from-scratch/">Smashing Magazine</a>, thanks!</p>
|
||||
</footer><!-- /#contentinfo -->
|
||||
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -44,9 +44,7 @@
|
|||
By <a class="url fn" href=".././author/alexis-metaireau.html">Alexis Métaireau</a>
|
||||
</address>
|
||||
<p>In <a href=".././category/bar.html">bar</a>. </p>
|
||||
<p>tags: <a href=".././tag/oh.html">oh</a><a href=".././tag/bar.html">bar</a><a href=".././tag/yeah.html">yeah</a></p>Translations:
|
||||
<a href=".././oh-yeah-fr.html">fr</a>
|
||||
|
||||
<p>tags: <a href=".././tag/oh.html">oh</a><a href=".././tag/bar.html">bar</a><a href=".././tag/yeah.html">yeah</a></p>
|
||||
</footer><!-- /.post-info --><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 !
|
||||
|
|
|
|||
|
|
@ -1,147 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>A Pelican Blog - content</title>
|
||||
<meta charset="utf-8" />
|
||||
<link rel="stylesheet" href=".././theme/css/main.css" type="text/css" />
|
||||
<link href="/feeds/all.atom.xml" type="application/atom+xml" rel="alternate" title="A Pelican Blog Atom Feed" />
|
||||
|
||||
|
||||
<!--[if IE]>
|
||||
<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script><![endif]-->
|
||||
|
||||
<!--[if lte IE 7]>
|
||||
<link rel="stylesheet" type="text/css" media="all" href=".././css/ie.css"/>
|
||||
<script src=".././js/IE8.js" type="text/javascript"></script><![endif]-->
|
||||
|
||||
<!--[if lt IE 7]>
|
||||
<link rel="stylesheet" type="text/css" media="all" href=".././css/ie6.css"/><![endif]-->
|
||||
|
||||
</head>
|
||||
|
||||
<body id="index" class="home">
|
||||
|
||||
<header id="banner" class="body">
|
||||
<h1><a href="../.">A Pelican Blog </a></h1>
|
||||
<nav><ul>
|
||||
|
||||
|
||||
|
||||
<li><a href=".././pages/this-is-a-test-page.html">This is a test page</a></li>
|
||||
|
||||
|
||||
|
||||
<li ><a href=".././category/bar.html">bar</a></li>
|
||||
|
||||
<li ><a href=".././category/cat1.html">cat1</a></li>
|
||||
|
||||
<li class="active"><a href=".././category/content.html">content</a></li>
|
||||
|
||||
<li ><a href=".././category/yeah.html">yeah</a></li>
|
||||
|
||||
</ul></nav>
|
||||
</header><!-- /#banner -->
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<aside id="featured" class="body">
|
||||
<article>
|
||||
<h1 class="entry-title"><a href=".././second-article.html">Second article</a></h1>
|
||||
<footer class="post-info">
|
||||
<abbr class="published" title="2012-02-29T00:00:00">
|
||||
Wed 29 February 2012
|
||||
</abbr>
|
||||
|
||||
|
||||
<address class="vcard author">
|
||||
By <a class="url fn" href=".././author/dummy-author.html">Dummy Author</a>
|
||||
</address>
|
||||
|
||||
<p>In <a href=".././category/content.html">content</a>. </p>
|
||||
<p>tags: <a href=".././tag/foo.html">foo</a><a href=".././tag/bar.html">bar</a><a href=".././tag/baz.html">baz</a></p>
|
||||
|
||||
|
||||
Translations:
|
||||
|
||||
<a href=".././second-article-fr.html">fr</a>
|
||||
|
||||
|
||||
</footer><!-- /.post-info --><p>This is some article, in english</p>
|
||||
|
||||
</article>
|
||||
|
||||
</aside><!-- /#featured -->
|
||||
|
||||
<section id="content" class="body">
|
||||
<h1>Other articles</h1>
|
||||
<hr />
|
||||
<ol id="posts-list" class="hfeed">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<li><article class="hentry">
|
||||
<header>
|
||||
<h1><a href=".././unbelievable.html" rel="bookmark" title="Permalink to Unbelievable !">Unbelievable !</a></h1>
|
||||
</header>
|
||||
|
||||
<div class="entry-content">
|
||||
<footer class="post-info">
|
||||
<abbr class="published" title="2010-10-15T20:30:00">
|
||||
Fri 15 October 2010
|
||||
</abbr>
|
||||
|
||||
|
||||
<address class="vcard author">
|
||||
By <a class="url fn" href=".././author/dummy-author.html">Dummy Author</a>
|
||||
</address>
|
||||
|
||||
<p>In <a href=".././category/content.html">content</a>. </p>
|
||||
|
||||
|
||||
|
||||
</footer><!-- /.post-info -->
|
||||
<p>Or completely awesome. Depends the needs.</p>
|
||||
|
||||
<a class="readmore" href=".././unbelievable.html">read more</a>
|
||||
|
||||
</div><!-- /.entry-content -->
|
||||
</article></li>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</ol><!-- /#posts-list -->
|
||||
</section><!-- /#content -->
|
||||
|
||||
|
||||
|
||||
|
||||
<section id="extras" class="body">
|
||||
|
||||
|
||||
</section><!-- /#extras -->
|
||||
|
||||
<footer id="contentinfo" class="body">
|
||||
<address id="about" class="vcard body">
|
||||
Proudly powered by <a href="http://pelican.notmyidea.org/">Pelican</a>, which takes great advantage of <a href="http://python.org">Python</a>.
|
||||
</address><!-- /#about -->
|
||||
|
||||
<p>The theme is by <a href="http://coding.smashingmagazine.com/2009/08/04/designing-a-html-5-layout-from-scratch/">Smashing Magazine</a>, thanks!</p>
|
||||
</footer><!-- /#contentinfo -->
|
||||
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -1,67 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>A draft article</title>
|
||||
<meta charset="utf-8" />
|
||||
<link rel="stylesheet" href=".././theme/css/main.css" type="text/css" />
|
||||
<link href="/feeds/all.atom.xml" type="application/atom+xml" rel="alternate" title="A Pelican Blog Atom Feed" />
|
||||
|
||||
<!--[if IE]>
|
||||
<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script><![endif]-->
|
||||
|
||||
<!--[if lte IE 7]>
|
||||
<link rel="stylesheet" type="text/css" media="all" href=".././css/ie.css"/>
|
||||
<script src=".././js/IE8.js" type="text/javascript"></script><![endif]-->
|
||||
|
||||
<!--[if lt IE 7]>
|
||||
<link rel="stylesheet" type="text/css" media="all" href=".././css/ie6.css"/><![endif]-->
|
||||
|
||||
</head>
|
||||
|
||||
<body id="index" class="home">
|
||||
<header id="banner" class="body">
|
||||
<h1><a href="../.">A Pelican Blog </a></h1>
|
||||
<nav><ul>
|
||||
<li><a href=".././pages/this-is-a-test-page.html">This is a test page</a></li>
|
||||
<li ><a href=".././category/bar.html">bar</a></li>
|
||||
<li ><a href=".././category/cat1.html">cat1</a></li>
|
||||
<li class="active"><a href=".././category/misc.html">misc</a></li>
|
||||
<li ><a href=".././category/yeah.html">yeah</a></li>
|
||||
</ul></nav>
|
||||
</header><!-- /#banner -->
|
||||
<section id="content" class="body">
|
||||
<article>
|
||||
<header>
|
||||
<h1 class="entry-title">
|
||||
<a href="a-draft-article.html" rel="bookmark"
|
||||
title="Permalink to A draft article">A draft article</a></h1>
|
||||
</header>
|
||||
|
||||
<div class="entry-content">
|
||||
<footer class="post-info">
|
||||
<abbr class="published" title="2012-09-17T15:02:39.591671">
|
||||
Mon 17 September 2012
|
||||
</abbr>
|
||||
|
||||
<p>In <a href=".././category/misc.html">misc</a>. </p>
|
||||
|
||||
</footer><!-- /.post-info --> <p>This is a draft article, it should live under the /drafts/ folder and not be
|
||||
listed anywhere else.</p>
|
||||
|
||||
</div><!-- /.entry-content -->
|
||||
|
||||
</article>
|
||||
</section>
|
||||
<section id="extras" class="body">
|
||||
</section><!-- /#extras -->
|
||||
|
||||
<footer id="contentinfo" class="body">
|
||||
<address id="about" class="vcard body">
|
||||
Proudly powered by <a href="http://getpelican.com/">Pelican</a>, which takes great advantage of <a href="http://python.org">Python</a>.
|
||||
</address><!-- /#about -->
|
||||
|
||||
<p>The theme is by <a href="http://coding.smashingmagazine.com/2009/08/04/designing-a-html-5-layout-from-scratch/">Smashing Magazine</a>, thanks!</p>
|
||||
</footer><!-- /#contentinfo -->
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -1,4 +1,3 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<feed xmlns="http://www.w3.org/2005/Atom"><title>A Pelican Blog</title><link href="/" rel="alternate"></link><link href="/feeds/all-fr.atom.xml" rel="self"></link><id>/</id><updated>2012-09-17T15:02:39Z</updated><entry><title>Trop bien !</title><link href="/oh-yeah-fr.html" rel="alternate"></link><updated>2012-09-17T15:02:39Z</updated><author><name></name></author><id>tag:,2012-09-17:oh-yeah-fr.html</id><summary type="html"><p>Et voila du contenu en français</p>
|
||||
</summary></entry><entry><title>Deuxième article</title><link href="/second-article-fr.html" rel="alternate"></link><updated>2012-02-29T00:00:00Z</updated><author><name></name></author><id>tag:,2012-02-29:second-article-fr.html</id><summary type="html"><p>Ceci est un article, en français.</p>
|
||||
<feed xmlns="http://www.w3.org/2005/Atom"><title>A Pelican Blog</title><link href="/" rel="alternate"></link><link href="/feeds/all-fr.atom.xml" rel="self"></link><id>/</id><updated>2012-02-29T00:00:00Z</updated><entry><title>Deuxième article</title><link href="/second-article-fr.html" rel="alternate"></link><updated>2012-02-29T00:00:00Z</updated><author><name></name></author><id>tag:,2012-02-29:second-article-fr.html</id><summary type="html"><p>Ceci est un article, en français.</p>
|
||||
</summary><category term="foo"></category><category term="bar"></category><category term="baz"></category></entry></feed>
|
||||
|
|
@ -1,6 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<feed xmlns="http://www.w3.org/2005/Atom"><title>A Pelican Blog</title><link href="/" rel="alternate"></link><link href="/feeds/all.atom.xml" rel="self"></link><id>/</id><updated>2012-09-17T15:02:39Z</updated><entry><title>Trop bien !</title><link href="/oh-yeah-fr.html" rel="alternate"></link><updated>2012-09-17T15:02:39Z</updated><author><name></name></author><id>tag:,2012-09-17:oh-yeah-fr.html</id><summary type="html"><p>Et voila du contenu en français</p>
|
||||
</summary></entry><entry><title>Second article</title><link href="/second-article.html" rel="alternate"></link><updated>2012-02-29T00:00:00Z</updated><author><name></name></author><id>tag:,2012-02-29:second-article.html</id><summary type="html"><p>This is some article, in english</p>
|
||||
<feed xmlns="http://www.w3.org/2005/Atom"><title>A Pelican Blog</title><link href="/" rel="alternate"></link><link href="/feeds/all.atom.xml" rel="self"></link><id>/</id><updated>2012-02-29T00:00:00Z</updated><entry><title>Second article</title><link href="/second-article.html" rel="alternate"></link><updated>2012-02-29T00:00:00Z</updated><author><name></name></author><id>tag:,2012-02-29:second-article.html</id><summary type="html"><p>This is some article, in english</p>
|
||||
</summary><category term="foo"></category><category term="bar"></category><category term="baz"></category></entry><entry><title>Deuxième article</title><link href="/second-article-fr.html" rel="alternate"></link><updated>2012-02-29T00:00:00Z</updated><author><name></name></author><id>tag:,2012-02-29:second-article-fr.html</id><summary type="html"><p>Ceci est un article, en français.</p>
|
||||
</summary><category term="foo"></category><category term="bar"></category><category term="baz"></category></entry><entry><title>A markdown powered article</title><link href="/a-markdown-powered-article.html" rel="alternate"></link><updated>2011-04-20T00:00:00Z</updated><author><name></name></author><id>tag:,2011-04-20:a-markdown-powered-article.html</id><summary type="html"><p>You're mutually oblivious.</p></summary></entry><entry><title>Article 1</title><link href="/article-1.html" rel="alternate"></link><updated>2011-02-17T00:00:00Z</updated><author><name></name></author><id>tag:,2011-02-17:article-1.html</id><summary type="html"><p>Article 1</p>
|
||||
</summary></entry><entry><title>Article 2</title><link href="/article-2.html" rel="alternate"></link><updated>2011-02-17T00:00:00Z</updated><author><name></name></author><id>tag:,2011-02-17:article-2.html</id><summary type="html"><p>Article 2</p>
|
||||
|
|
|
|||
|
|
@ -1,4 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<feed xmlns="http://www.w3.org/2005/Atom"><title>A Pelican Blog</title><link href=".././" rel="alternate"></link><link href="None/feeds/content.atom.xml" rel="self"></link><id>.././</id><updated>2012-02-29T00:00:00Z</updated><entry><title>Second article</title><link href=".././second-article.html" rel="alternate"></link><updated>2012-02-29T00:00:00Z</updated><author><name>Dummy Author</name></author><id>tag:../.,2012-02-29:second-article.html</id><summary type="html"><p>This is some article, in english</p>
|
||||
</summary><category term="foo"></category><category term="bar"></category><category term="baz"></category></entry><entry><title>Unbelievable !</title><link href=".././unbelievable.html" rel="alternate"></link><updated>2010-10-15T20:30:00Z</updated><author><name>Dummy Author</name></author><id>tag:../.,2010-10-15:unbelievable.html</id><summary type="html"><p>Or completely awesome. Depends the needs.</p>
|
||||
</summary></entry></feed>
|
||||
|
|
@ -183,9 +183,7 @@ as well as <strong>inline markup</strong>.</p>
|
|||
By <a class="url fn" href="./author/alexis-metaireau.html">Alexis Métaireau</a>
|
||||
</address>
|
||||
<p>In <a href="./category/bar.html">bar</a>. </p>
|
||||
<p>tags: <a href="./tag/oh.html">oh</a><a href="./tag/bar.html">bar</a><a href="./tag/yeah.html">yeah</a></p>Translations:
|
||||
<a href="./oh-yeah-fr.html">fr</a>
|
||||
|
||||
<p>tags: <a href="./tag/oh.html">oh</a><a href="./tag/bar.html">bar</a><a href="./tag/yeah.html">yeah</a></p>
|
||||
</footer><!-- /.post-info --> <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 !
|
||||
|
|
|
|||
|
|
@ -1,68 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>Trop bien !</title>
|
||||
<meta charset="utf-8" />
|
||||
<link rel="stylesheet" href="./theme/css/main.css" type="text/css" />
|
||||
<link href="/feeds/all.atom.xml" type="application/atom+xml" rel="alternate" title="A Pelican Blog Atom Feed" />
|
||||
|
||||
<!--[if IE]>
|
||||
<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script><![endif]-->
|
||||
|
||||
<!--[if lte IE 7]>
|
||||
<link rel="stylesheet" type="text/css" media="all" href="./css/ie.css"/>
|
||||
<script src="./js/IE8.js" type="text/javascript"></script><![endif]-->
|
||||
|
||||
<!--[if lt IE 7]>
|
||||
<link rel="stylesheet" type="text/css" media="all" href="./css/ie6.css"/><![endif]-->
|
||||
|
||||
</head>
|
||||
|
||||
<body id="index" class="home">
|
||||
<header id="banner" class="body">
|
||||
<h1><a href=".">A Pelican Blog </a></h1>
|
||||
<nav><ul>
|
||||
<li><a href="./pages/this-is-a-test-page.html">This is a test page</a></li>
|
||||
<li ><a href="./category/bar.html">bar</a></li>
|
||||
<li ><a href="./category/cat1.html">cat1</a></li>
|
||||
<li class="active"><a href="./category/misc.html">misc</a></li>
|
||||
<li ><a href="./category/yeah.html">yeah</a></li>
|
||||
</ul></nav>
|
||||
</header><!-- /#banner -->
|
||||
<section id="content" class="body">
|
||||
<article>
|
||||
<header>
|
||||
<h1 class="entry-title">
|
||||
<a href="oh-yeah-fr.html" rel="bookmark"
|
||||
title="Permalink to Trop bien !">Trop bien !</a></h1>
|
||||
</header>
|
||||
|
||||
<div class="entry-content">
|
||||
<footer class="post-info">
|
||||
<abbr class="published" title="2012-09-17T15:02:39.591671">
|
||||
Mon 17 September 2012
|
||||
</abbr>
|
||||
|
||||
<p>In <a href="./category/misc.html">misc</a>. </p>
|
||||
Translations:
|
||||
<a href="./oh-yeah.html">en</a>
|
||||
|
||||
</footer><!-- /.post-info --> <p>Et voila du contenu en français</p>
|
||||
|
||||
</div><!-- /.entry-content -->
|
||||
|
||||
</article>
|
||||
</section>
|
||||
<section id="extras" class="body">
|
||||
</section><!-- /#extras -->
|
||||
|
||||
<footer id="contentinfo" class="body">
|
||||
<address id="about" class="vcard body">
|
||||
Proudly powered by <a href="http://getpelican.com/">Pelican</a>, which takes great advantage of <a href="http://python.org">Python</a>.
|
||||
</address><!-- /#about -->
|
||||
|
||||
<p>The theme is by <a href="http://coding.smashingmagazine.com/2009/08/04/designing-a-html-5-layout-from-scratch/">Smashing Magazine</a>, thanks!</p>
|
||||
</footer><!-- /#contentinfo -->
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -47,9 +47,7 @@
|
|||
By <a class="url fn" href="./author/alexis-metaireau.html">Alexis Métaireau</a>
|
||||
</address>
|
||||
<p>In <a href="./category/bar.html">bar</a>. </p>
|
||||
<p>tags: <a href="./tag/oh.html">oh</a><a href="./tag/bar.html">bar</a><a href="./tag/yeah.html">yeah</a></p>Translations:
|
||||
<a href="./oh-yeah-fr.html">fr</a>
|
||||
|
||||
<p>tags: <a href="./tag/oh.html">oh</a><a href="./tag/bar.html">bar</a><a href="./tag/yeah.html">yeah</a></p>
|
||||
</footer><!-- /.post-info --> <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 !
|
||||
|
|
|
|||
|
|
@ -120,9 +120,7 @@ as well as <strong>inline markup</strong>.</p>
|
|||
By <a class="url fn" href=".././author/alexis-metaireau.html">Alexis Métaireau</a>
|
||||
</address>
|
||||
<p>In <a href=".././category/bar.html">bar</a>. </p>
|
||||
<p>tags: <a href=".././tag/oh.html">oh</a><a href=".././tag/bar.html">bar</a><a href=".././tag/yeah.html">yeah</a></p>Translations:
|
||||
<a href=".././oh-yeah-fr.html">fr</a>
|
||||
|
||||
<p>tags: <a href=".././tag/oh.html">oh</a><a href=".././tag/bar.html">bar</a><a href=".././tag/yeah.html">yeah</a></p>
|
||||
</footer><!-- /.post-info --> <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 !
|
||||
|
|
|
|||
|
|
@ -44,9 +44,7 @@
|
|||
By <a class="url fn" href=".././author/alexis-metaireau.html">Alexis Métaireau</a>
|
||||
</address>
|
||||
<p>In <a href=".././category/bar.html">bar</a>. </p>
|
||||
<p>tags: <a href=".././tag/oh.html">oh</a><a href=".././tag/bar.html">bar</a><a href=".././tag/yeah.html">yeah</a></p>Translations:
|
||||
<a href=".././oh-yeah-fr.html">fr</a>
|
||||
|
||||
<p>tags: <a href=".././tag/oh.html">oh</a><a href=".././tag/bar.html">bar</a><a href=".././tag/yeah.html">yeah</a></p>
|
||||
</footer><!-- /.post-info --><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 !
|
||||
|
|
|
|||
|
|
@ -44,9 +44,7 @@
|
|||
By <a class="url fn" href=".././author/alexis-metaireau.html">Alexis Métaireau</a>
|
||||
</address>
|
||||
<p>In <a href=".././category/bar.html">bar</a>. </p>
|
||||
<p>tags: <a href=".././tag/oh.html">oh</a><a href=".././tag/bar.html">bar</a><a href=".././tag/yeah.html">yeah</a></p>Translations:
|
||||
<a href=".././oh-yeah-fr.html">fr</a>
|
||||
|
||||
<p>tags: <a href=".././tag/oh.html">oh</a><a href=".././tag/bar.html">bar</a><a href=".././tag/yeah.html">yeah</a></p>
|
||||
</footer><!-- /.post-info --><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 !
|
||||
|
|
|
|||
|
|
@ -31,6 +31,7 @@ class TestArticlesGenerator(unittest.TestCase):
|
|||
settings = _DEFAULT_CONFIG.copy()
|
||||
settings['ARTICLE_DIR'] = 'content'
|
||||
settings['DEFAULT_CATEGORY'] = 'Default'
|
||||
settings['DEFAULT_DATE'] = (1970, 01, 01)
|
||||
self.generator = ArticlesGenerator(settings.copy(), settings,
|
||||
CUR_DIR, _DEFAULT_CONFIG['THEME'], None,
|
||||
_DEFAULT_CONFIG['MARKUP'])
|
||||
|
|
@ -93,6 +94,7 @@ class TestArticlesGenerator(unittest.TestCase):
|
|||
settings = _DEFAULT_CONFIG.copy()
|
||||
settings['ARTICLE_DIR'] = 'content'
|
||||
settings['DEFAULT_CATEGORY'] = 'Default'
|
||||
settings['DEFAULT_DATE'] = (1970, 01, 01)
|
||||
settings['USE_FOLDER_AS_CATEGORY'] = False
|
||||
generator = ArticlesGenerator(settings.copy(), settings,
|
||||
CUR_DIR, _DEFAULT_CONFIG['THEME'], None,
|
||||
|
|
@ -175,6 +177,7 @@ class TestPageGenerator(unittest.TestCase):
|
|||
settings = _DEFAULT_CONFIG.copy()
|
||||
|
||||
settings['PAGE_DIR'] = 'TestPages'
|
||||
settings['DEFAULT_DATE'] = (1970, 01, 01)
|
||||
generator = PagesGenerator(settings.copy(), settings, CUR_DIR,
|
||||
_DEFAULT_CONFIG['THEME'], None,
|
||||
_DEFAULT_CONFIG['MARKUP'])
|
||||
|
|
|
|||
|
|
@ -62,22 +62,17 @@ class TestPelican(unittest.TestCase):
|
|||
self.assertEqual(diff['right_only'], [], msg=msg)
|
||||
self.assertEqual(diff['diff_files'], [], msg=msg)
|
||||
|
||||
@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 patch("pelican.contents.getenv") as mock_getenv:
|
||||
# force getenv('USER') to always return the same value
|
||||
mock_getenv.return_value = "Dummy Author"
|
||||
settings = read_settings(filename=None, override={
|
||||
'PATH': INPUT_PATH,
|
||||
'OUTPUT_PATH': self.temp_path,
|
||||
})
|
||||
pelican = Pelican(settings=settings)
|
||||
pelican.run()
|
||||
dcmp = dircmp(self.temp_path, os.sep.join((OUTPUT_PATH, "basic")))
|
||||
self.assertFilesEqual(recursiveDiff(dcmp))
|
||||
# ones and generate correct output without raising any exception
|
||||
settings = read_settings(filename=None, override={
|
||||
'PATH': INPUT_PATH,
|
||||
'OUTPUT_PATH': self.temp_path,
|
||||
})
|
||||
pelican = Pelican(settings=settings)
|
||||
pelican.run()
|
||||
dcmp = dircmp(self.temp_path, os.sep.join((OUTPUT_PATH, "basic")))
|
||||
self.assertFilesEqual(recursiveDiff(dcmp))
|
||||
|
||||
def test_custom_generation_works(self):
|
||||
# the same thing with a specified set of settings should work
|
||||
|
|
|
|||
|
|
@ -80,7 +80,7 @@ class TestWebAssetsRelativeURLS(TestWebAssets):
|
|||
|
||||
self.check_link_tag(
|
||||
'.././theme/gen/style.{0}.min.css'.format(CSS_HASH),
|
||||
os.path.join(self.temp_path, 'category/misc.html'))
|
||||
os.path.join(self.temp_path, 'category/yeah.html'))
|
||||
|
||||
|
||||
class TestWebAssetsAbsoluteURLS(TestWebAssets):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue