Merge pull request #606 from bbinet/metadata-from-filename

Extract metadata from filename
This commit is contained in:
Bruno Binet 2012-12-03 01:23:16 -08:00
commit bb2cfffe6a
31 changed files with 777 additions and 131 deletions

View file

@ -25,6 +25,8 @@ Release history
file within the same directory as the original file to prevent the server
(e.g. Nginx) from compressing files during an HTTP call.
* Add AsciiDoc support
* Add ``FILENAME_METADATA`` new setting which adds support for metadata
extraction from the filename.
3.0 (2012-08-08)
==================

View file

@ -181,15 +181,26 @@ syntax for Markdown posts should follow this pattern::
This is the content of my super blog post.
Note that, aside from the title, none of this metadata is mandatory: if the date
is not specified, Pelican will rely on the file's "mtime" timestamp, and the
category can be determined by the directory in which the file resides. For
example, a file located at ``python/foobar/myfoobar.rst`` will have a category of
``foobar``. If you would like to organize your files in other ways where the
name of the subfolder would not be a good category name, you can set the
setting ``USE_FOLDER_AS_CATEGORY`` to ``False``. If summary isn't given, setting
``SUMMARY_MAX_LENGTH`` determines how many words from the beginning of an article
are used as the summary.
Note that, aside from the title, none of this metadata is mandatory: if the
date is not specified, Pelican can rely on the file's "mtime" timestamp through
the ``DEFAULT_DATE`` setting, and the category can be determined by the
directory in which the file resides. For example, a file located at
``python/foobar/myfoobar.rst`` will have a category of ``foobar``. If you would
like to organize your files in other ways where the name of the subfolder would
not be a good category name, you can set the setting ``USE_FOLDER_AS_CATEGORY``
to ``False``. If summary isn't given, setting ``SUMMARY_MAX_LENGTH`` determines
how many words from the beginning of an article are used as the summary.
You can also extract any metadata from the filename through a regexp to be set
in the ``FILENAME_METADATA`` setting.
All named groups that are matched will be set in the metadata object. The
default value for the ``FILENAME_METADATA`` setting will only extract the date
from the filename. For example, if you would like to extract both the date and
the slug, you could set something like:
``'(?P<date>\d{4}-\d{2}-\d{2})_(?P<slug>.*)'``.
Please note that the metadata available inside your files takes precedence over
the metadata extracted from the filename.
Generate your blog
------------------

View file

@ -50,6 +50,16 @@ Setting name (default value) What doe
If tuple object, it will instead generate the
default datetime object by passing the tuple to
the datetime.datetime constructor.
`DEFAULT_METADATA` (``()``) The default metadata you want to use for all articles
and pages.
`FILENAME_METADATA` (``'(?P<date>\d{4}-\d{2}-\d{2}).*'``) The regexp that will be used to extract any metadata
from the filename. All named groups that are matched
will be set in the metadata object.
The default value will only extract the date from
the filename.
For example, if you would like to extract both the
date and the slug, you could set something like:
``'(?P<date>\d{4}-\d{2}-\d{2})_(?P<slug>.*)'``.
`DELETE_OUTPUT_DIRECTORY` (``False``) Delete the content of the output directory before
generating new files.
`FILES_TO_COPY` (``()``) A list of files (or directories) to copy from the source (inside the

View file

@ -1,4 +1,6 @@
# -*- coding: utf-8 -*-
import os
import re
try:
import docutils
import docutils.core
@ -207,8 +209,9 @@ for cls in Reader.__subclasses__():
def read_file(filename, fmt=None, settings=None):
"""Return a reader object using the given format."""
base, ext = os.path.splitext(os.path.basename(filename))
if not fmt:
fmt = filename.split('.')[-1]
fmt = ext[1:]
if fmt not in _EXTENSIONS:
raise TypeError('Pelican does not know how to parse %s' % filename)
@ -225,9 +228,18 @@ def read_file(filename, fmt=None, settings=None):
content, metadata = reader.read(filename)
# eventually filter the content with typogrify if asked so
if settings and settings['TYPOGRIFY']:
if settings and settings.get('TYPOGRIFY'):
from typogrify.filters import typogrify
content = typogrify(content)
metadata['title'] = typogrify(metadata['title'])
filename_metadata = settings and settings.get('FILENAME_METADATA')
if filename_metadata:
match = re.match(filename_metadata, base)
if match:
for k, v in match.groupdict().iteritems():
if k not in metadata:
k = k.lower() # metadata must be lowercase
metadata[k] = reader.process_metadata(k, v)
return content, metadata

View file

@ -5,6 +5,7 @@ import inspect
import os
import locale
import logging
import re
from os.path import isabs
@ -60,7 +61,7 @@ _DEFAULT_CONFIG = {'PATH': '.',
'TAG_CLOUD_STEPS': 4,
'TAG_CLOUD_MAX_ITEMS': 100,
'DIRECT_TEMPLATES': ('index', 'tags', 'categories', 'archives'),
'EXTRA_TEMPLATES_PATHS' : [],
'EXTRA_TEMPLATES_PATHS': [],
'PAGINATED_DIRECT_TEMPLATES': ('index', ),
'PELICAN_CLASS': 'pelican.Pelican',
'DEFAULT_DATE_FORMAT': '%a %d %B %Y',
@ -70,6 +71,7 @@ _DEFAULT_CONFIG = {'PATH': '.',
'DEFAULT_PAGINATION': False,
'DEFAULT_ORPHANS': 0,
'DEFAULT_METADATA': (),
'FILENAME_METADATA': '(?P<date>\d{4}-\d{2}-\d{2}).*',
'FILES_TO_COPY': (),
'DEFAULT_STATUS': 'published',
'ARTICLE_PERMALINK_STRUCTURE': '',
@ -205,4 +207,12 @@ def configure_settings(settings):
" falling back to the default extension " +
_DEFAULT_CONFIG['OUTPUT_SOURCES_EXTENSION'])
filename_metadata = settings.get('FILENAME_METADATA')
if filename_metadata and not isinstance(filename_metadata, basestring):
logger.error("Detected misconfiguration with FILENAME_METADATA"
" setting (must be string or compiled pattern), falling"
"back to the default")
settings['FILENAME_METADATA'] = \
_DEFAULT_CONFIG['FILENAME_METADATA']
return settings

View file

@ -0,0 +1,4 @@
FILENAME_METADATA example
#########################
Some cool stuff!

View file

@ -0,0 +1,6 @@
Rst with filename metadata
##########################
:category: yeah
:author: Alexis Métaireau

View file

@ -0,0 +1,6 @@
category: yeah
author: Alexis Métaireau
Markdown with filename metadata
===============================

View file

@ -33,6 +33,8 @@
<h1>Archives for A Pelican Blog</h1>
<dl>
<dt>Fri 30 November 2012</dt>
<dd><a href="./filename_metadata-example.html">FILENAME_METADATA example</a></dd>
<dt>Wed 29 February 2012</dt>
<dd><a href="./second-article.html">Second article</a></dd>
<dt>Wed 20 April 2011</dt>

View file

@ -34,8 +34,32 @@
<aside id="featured" class="body">
<article>
<h1 class="entry-title"><a href="../second-article.html">Second article</a></h1>
<h1 class="entry-title"><a href="../filename_metadata-example.html">FILENAME_METADATA example</a></h1>
<footer class="post-info">
<abbr class="published" title="2012-11-30T00:00:00">
Fri 30 November 2012
</abbr>
<p>In <a href="../category/misc.html">misc</a>. </p>
</footer><!-- /.post-info --><p>Some cool stuff!</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="../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>
@ -44,14 +68,12 @@
<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">
</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">

View file

@ -1,5 +1,6 @@
<?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-en.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">&lt;p&gt;This is some article, in english&lt;/p&gt;
<feed xmlns="http://www.w3.org/2005/Atom"><title>A Pelican Blog</title><link href="/" rel="alternate"></link><link href="/feeds/all-en.atom.xml" rel="self"></link><id>/</id><updated>2012-11-30T00:00:00Z</updated><entry><title>FILENAME_METADATA example</title><link href="/filename_metadata-example.html" rel="alternate"></link><updated>2012-11-30T00:00:00Z</updated><author><name></name></author><id>tag:,2012-11-30:filename_metadata-example.html</id><summary type="html">&lt;p&gt;Some cool stuff!&lt;/p&gt;
</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">&lt;p&gt;This is some article, in english&lt;/p&gt;
</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">&lt;p&gt;You're mutually oblivious.&lt;/p&gt;
&lt;p&gt;&lt;a href="/unbelievable.html"&gt;a root-relative link to unbelievable&lt;/a&gt;
&lt;a href="/unbelievable.html"&gt;a file-relative link to unbelievable&lt;/a&gt;&lt;/p&gt;</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">&lt;p&gt;Article 1&lt;/p&gt;

View file

@ -1,5 +1,6 @@
<?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-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">&lt;p&gt;This is some article, in english&lt;/p&gt;
<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-11-30T00:00:00Z</updated><entry><title>FILENAME_METADATA example</title><link href="/filename_metadata-example.html" rel="alternate"></link><updated>2012-11-30T00:00:00Z</updated><author><name></name></author><id>tag:,2012-11-30:filename_metadata-example.html</id><summary type="html">&lt;p&gt;Some cool stuff!&lt;/p&gt;
</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">&lt;p&gt;This is some article, in english&lt;/p&gt;
</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">&lt;p&gt;Ceci est un article, en français.&lt;/p&gt;
</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">&lt;p&gt;You're mutually oblivious.&lt;/p&gt;
&lt;p&gt;&lt;a href="/unbelievable.html"&gt;a root-relative link to unbelievable&lt;/a&gt;

View file

@ -1,5 +1,6 @@
<?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/misc.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">&lt;p&gt;This is some article, in english&lt;/p&gt;
<feed xmlns="http://www.w3.org/2005/Atom"><title>A Pelican Blog</title><link href="/" rel="alternate"></link><link href="/feeds/misc.atom.xml" rel="self"></link><id>/</id><updated>2012-11-30T00:00:00Z</updated><entry><title>FILENAME_METADATA example</title><link href="/filename_metadata-example.html" rel="alternate"></link><updated>2012-11-30T00:00:00Z</updated><author><name></name></author><id>tag:,2012-11-30:filename_metadata-example.html</id><summary type="html">&lt;p&gt;Some cool stuff!&lt;/p&gt;
</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">&lt;p&gt;This is some article, in english&lt;/p&gt;
</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></name></author><id>tag:,2010-10-15:unbelievable.html</id><summary type="html">&lt;p&gt;Or completely awesome. Depends the needs.&lt;/p&gt;
&lt;p&gt;&lt;a class="reference external" href="/a-markdown-powered-article.html"&gt;a root-relative link to markdown-article&lt;/a&gt;
&lt;a class="reference external" href="/a-markdown-powered-article.html"&gt;a file-relative link to markdown-article&lt;/a&gt;&lt;/p&gt;

View file

@ -0,0 +1,66 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>FILENAME_METADATA example</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="./filename_metadata-example.html" rel="bookmark"
title="Permalink to FILENAME_METADATA example">FILENAME_METADATA example</a></h1>
</header>
<div class="entry-content">
<footer class="post-info">
<abbr class="published" title="2012-11-30T00:00:00">
Fri 30 November 2012
</abbr>
<p>In <a href="./category/misc.html">misc</a>. </p>
</footer><!-- /.post-info --> <p>Some cool stuff!</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>

View file

@ -34,8 +34,32 @@
<aside id="featured" class="body">
<article>
<h1 class="entry-title"><a href="./second-article.html">Second article</a></h1>
<h1 class="entry-title"><a href="./filename_metadata-example.html">FILENAME_METADATA example</a></h1>
<footer class="post-info">
<abbr class="published" title="2012-11-30T00:00:00">
Fri 30 November 2012
</abbr>
<p>In <a href="./category/misc.html">misc</a>. </p>
</footer><!-- /.post-info --><p>Some cool stuff!</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="./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>
@ -44,14 +68,12 @@
<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">
</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">

View file

@ -37,6 +37,8 @@
<h1>Archives for Alexis' log</h1>
<dl>
<dt>Fri 30 November 2012</dt>
<dd><a href="./filename_metadata-example.html">FILENAME_METADATA example</a></dd>
<dt>Wed 29 February 2012</dt>
<dd><a href="./second-article.html">Second article</a></dd>
<dt>Wed 20 April 2011</dt>

View file

@ -134,7 +134,7 @@
</article></li>
</ol><!-- /#posts-list -->
<p class="paginator">
Page 1 / 2
Page 1 / 3
<a href="../author/alexis-metaireau2.html">&raquo;</a>
</p>
</section><!-- /#content -->

View file

@ -39,6 +39,31 @@
<section id="content" class="body">
<ol id="posts-list" class="hfeed" start="3">
<li><article class="hentry">
<header>
<h1><a href="../filename_metadata-example.html" rel="bookmark"
title="Permalink to FILENAME_METADATA example">FILENAME_METADATA example</a></h1>
</header>
<div class="entry-content">
<footer class="post-info">
<abbr class="published" title="2012-11-30T00:00:00">
Fri 30 November 2012
</abbr>
<address class="vcard author">
By <a class="url fn" href="../author/alexis-metaireau.html">Alexis Métaireau</a>
</address>
<p>In <a href="../category/misc.html">misc</a>. </p>
</footer><!-- /.post-info --> <p>Some cool stuff!</p>
<a class="readmore" href="../filename_metadata-example.html">read more</a>
<p>There are <a href="../filename_metadata-example.html#disqus_thread">comments</a>.</p> </div><!-- /.entry-content -->
</article></li>
<li><article class="hentry">
<header>
<h1><a href="../oh-yeah.html" rel="bookmark"
@ -121,37 +146,11 @@ as well as <strong>inline markup</strong>.</p>
<a class="readmore" href="../this-is-a-super-article.html">read more</a>
<p>There are <a href="../this-is-a-super-article.html#disqus_thread">comments</a>.</p> </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/alexis-metaireau.html">Alexis Métaireau</a>
</address>
<p>In <a href="../category/misc.html">misc</a>. </p>
</footer><!-- /.post-info --> <p>Or completely awesome. Depends the needs.</p>
<p><a class="reference external" href="../a-markdown-powered-article.html">a root-relative link to markdown-article</a>
<a class="reference external" href="../a-markdown-powered-article.html">a file-relative link to markdown-article</a></p>
<a class="readmore" href="../unbelievable.html">read more</a>
<p>There are <a href="../unbelievable.html#disqus_thread">comments</a>.</p> </div><!-- /.entry-content -->
</article></li>
</ol><!-- /#posts-list -->
<p class="paginator">
<a href="../author/alexis-metaireau.html">&laquo;</a>
Page 2 / 2
Page 2 / 3
<a href="../author/alexis-metaireau3.html">&raquo;</a>
</p>
</section><!-- /#content -->
<section id="extras" class="body">

View file

@ -0,0 +1,115 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>Alexis' log - Alexis Métaireau</title>
<meta charset="utf-8" />
<link rel="stylesheet" href="../theme/css/main.css" type="text/css" />
<link href="http://blog.notmyidea.org/feeds/all.atom.xml" type="application/atom+xml" rel="alternate" title="Alexis' log Atom Feed" />
<link href="http://blog.notmyidea.org/feeds/all.rss.xml" type="application/rss+xml" rel="alternate" title="Alexis' log RSS 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">
<a href="http://github.com/ametaireau/">
<img style="position: absolute; top: 0; right: 0; border: 0;" src="http://s3.amazonaws.com/github/ribbons/forkme_right_red_aa0000.png" alt="Fork me on GitHub" />
</a>
<header id="banner" class="body">
<h1><a href="../">Alexis' log </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/yeah.html">yeah</a></li>
<li ><a href="../category/misc.html">misc</a></li>
<li ><a href="../category/cat1.html">cat1</a></li>
<li ><a href="../category/bar.html">bar</a></li>
</ul></nav>
</header><!-- /#banner -->
<section id="content" class="body">
<ol id="posts-list" class="hfeed" start="3">
<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/alexis-metaireau.html">Alexis Métaireau</a>
</address>
<p>In <a href="../category/misc.html">misc</a>. </p>
</footer><!-- /.post-info --> <p>Or completely awesome. Depends the needs.</p>
<p><a class="reference external" href="../a-markdown-powered-article.html">a root-relative link to markdown-article</a>
<a class="reference external" href="../a-markdown-powered-article.html">a file-relative link to markdown-article</a></p>
<a class="readmore" href="../unbelievable.html">read more</a>
<p>There are <a href="../unbelievable.html#disqus_thread">comments</a>.</p> </div><!-- /.entry-content -->
</article></li>
</ol><!-- /#posts-list -->
<p class="paginator">
<a href="../author/alexis-metaireau2.html">&laquo;</a>
Page 3 / 3
</p>
</section><!-- /#content -->
<section id="extras" class="body">
<div class="blogroll">
<h2>blogroll</h2>
<ul>
<li><a href="http://biologeek.org">Biologeek</a></li>
<li><a href="http://filyb.info/">Filyb</a></li>
<li><a href="http://www.libert-fr.com">Libert-fr</a></li>
<li><a href="http://prendreuncafe.com/blog/">N1k0</a></li>
<li><a href="http://ziade.org/blog">Tarek Ziadé</a></li>
<li><a href="http://zubin71.wordpress.com/">Zubin Mithra</a></li>
</ul>
</div><!-- /.blogroll -->
<div class="social">
<h2>social</h2>
<ul>
<li><a href="http://blog.notmyidea.org/feeds/all.atom.xml" type="application/atom+xml" rel="alternate">atom feed</a></li>
<li><a href="http://blog.notmyidea.org/feeds/all.rss.xml" type="application/rss+xml" rel="alternate">rss feed</a></li>
<li><a href="http://twitter.com/ametaireau">twitter</a></li>
<li><a href="http://lastfm.com/user/akounet">lastfm</a></li>
<li><a href="http://github.com/ametaireau">github</a></li>
</ul>
</div><!-- /.social -->
</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 -->
<script type="text/javascript">
var disqus_shortname = 'blog-notmyidea';
(function () {
var s = document.createElement('script'); s.async = true;
s.type = 'text/javascript';
s.src = 'http://' + disqus_shortname + '.disqus.com/count.js';
(document.getElementsByTagName('HEAD')[0] || document.getElementsByTagName('BODY')[0]).appendChild(s);
}());
</script>
</body>
</html>

View file

@ -38,8 +38,35 @@
<aside id="featured" class="body">
<article>
<h1 class="entry-title"><a href="../second-article.html">Second article</a></h1>
<h1 class="entry-title"><a href="../filename_metadata-example.html">FILENAME_METADATA example</a></h1>
<footer class="post-info">
<abbr class="published" title="2012-11-30T00:00:00">
Fri 30 November 2012
</abbr>
<address class="vcard author">
By <a class="url fn" href="../author/alexis-metaireau.html">Alexis Métaireau</a>
</address>
<p>In <a href="../category/misc.html">misc</a>. </p>
</footer><!-- /.post-info --><p>Some cool stuff!</p>
<p>There are <a href="../filename_metadata-example.html#disqus_thread">comments</a>.</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="../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>
@ -51,14 +78,12 @@
<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>
<p>There are <a href="../second-article.html#disqus_thread">comments</a>.</p> </article>
</aside><!-- /#featured -->
<section id="content" class="body">
<h1>Other articles</h1>
<hr />
<ol id="posts-list" class="hfeed">
</footer><!-- /.post-info --> <p>This is some article, in english</p>
<a class="readmore" href="../second-article.html">read more</a>
<p>There are <a href="../second-article.html#disqus_thread">comments</a>.</p> </div><!-- /.entry-content -->
</article></li>
<li><article class="hentry">

View file

@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom"><title>Alexis' log</title><link href="http://blog.notmyidea.org/" rel="alternate"></link><link href="http://blog.notmyidea.org/feeds/all-en.atom.xml" rel="self"></link><id>http://blog.notmyidea.org/</id><updated>2012-02-29T00:00:00+01:00</updated><entry><title>Second article</title><link href="http://blog.notmyidea.org/second-article.html" rel="alternate"></link><updated>2012-02-29T00:00:00+01:00</updated><author><name>Alexis Métaireau</name></author><id>tag:blog.notmyidea.org,2012-02-29:second-article.html</id><summary type="html">&lt;p&gt;This is some article, in english&lt;/p&gt;
<feed xmlns="http://www.w3.org/2005/Atom"><title>Alexis' log</title><link href="http://blog.notmyidea.org/" rel="alternate"></link><link href="http://blog.notmyidea.org/feeds/all-en.atom.xml" rel="self"></link><id>http://blog.notmyidea.org/</id><updated>2012-11-30T00:00:00+01:00</updated><entry><title>FILENAME_METADATA example</title><link href="http://blog.notmyidea.org/filename_metadata-example.html" rel="alternate"></link><updated>2012-11-30T00:00:00+01:00</updated><author><name>Alexis Métaireau</name></author><id>tag:blog.notmyidea.org,2012-11-30:filename_metadata-example.html</id><summary type="html">&lt;p&gt;Some cool stuff!&lt;/p&gt;
</summary></entry><entry><title>Second article</title><link href="http://blog.notmyidea.org/second-article.html" rel="alternate"></link><updated>2012-02-29T00:00:00+01:00</updated><author><name>Alexis Métaireau</name></author><id>tag:blog.notmyidea.org,2012-02-29:second-article.html</id><summary type="html">&lt;p&gt;This is some article, in english&lt;/p&gt;
</summary><category term="foo"></category><category term="bar"></category><category term="baz"></category></entry><entry><title>A markdown powered article</title><link href="http://blog.notmyidea.org/a-markdown-powered-article.html" rel="alternate"></link><updated>2011-04-20T00:00:00+02:00</updated><author><name>Alexis Métaireau</name></author><id>tag:blog.notmyidea.org,2011-04-20:a-markdown-powered-article.html</id><summary type="html">&lt;p&gt;You're mutually oblivious.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://blog.notmyidea.org/unbelievable.html"&gt;a root-relative link to unbelievable&lt;/a&gt;
&lt;a href="http://blog.notmyidea.org/unbelievable.html"&gt;a file-relative link to unbelievable&lt;/a&gt;&lt;/p&gt;</summary></entry><entry><title>Article 1</title><link href="http://blog.notmyidea.org/article-1.html" rel="alternate"></link><updated>2011-02-17T00:00:00+01:00</updated><author><name>Alexis Métaireau</name></author><id>tag:blog.notmyidea.org,2011-02-17:article-1.html</id><summary type="html">&lt;p&gt;Article 1&lt;/p&gt;

View file

@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom"><title>Alexis' log</title><link href="http://blog.notmyidea.org/" rel="alternate"></link><link href="http://blog.notmyidea.org/feeds/all.atom.xml" rel="self"></link><id>http://blog.notmyidea.org/</id><updated>2012-03-02T14:01:01+01:00</updated><entry><title>Trop bien !</title><link href="http://blog.notmyidea.org/oh-yeah-fr.html" rel="alternate"></link><updated>2012-03-02T14:01:01+01:00</updated><author><name>Alexis Métaireau</name></author><id>tag:blog.notmyidea.org,2012-03-02:oh-yeah-fr.html</id><summary type="html">&lt;p&gt;Et voila du contenu en français&lt;/p&gt;
<feed xmlns="http://www.w3.org/2005/Atom"><title>Alexis' log</title><link href="http://blog.notmyidea.org/" rel="alternate"></link><link href="http://blog.notmyidea.org/feeds/all.atom.xml" rel="self"></link><id>http://blog.notmyidea.org/</id><updated>2012-11-30T00:00:00+01:00</updated><entry><title>FILENAME_METADATA example</title><link href="http://blog.notmyidea.org/filename_metadata-example.html" rel="alternate"></link><updated>2012-11-30T00:00:00+01:00</updated><author><name>Alexis Métaireau</name></author><id>tag:blog.notmyidea.org,2012-11-30:filename_metadata-example.html</id><summary type="html">&lt;p&gt;Some cool stuff!&lt;/p&gt;
</summary></entry><entry><title>Trop bien !</title><link href="http://blog.notmyidea.org/oh-yeah-fr.html" rel="alternate"></link><updated>2012-03-02T14:01:01+01:00</updated><author><name>Alexis Métaireau</name></author><id>tag:blog.notmyidea.org,2012-03-02:oh-yeah-fr.html</id><summary type="html">&lt;p&gt;Et voila du contenu en français&lt;/p&gt;
</summary></entry><entry><title>Second article</title><link href="http://blog.notmyidea.org/second-article.html" rel="alternate"></link><updated>2012-02-29T00:00:00+01:00</updated><author><name>Alexis Métaireau</name></author><id>tag:blog.notmyidea.org,2012-02-29:second-article.html</id><summary type="html">&lt;p&gt;This is some article, in english&lt;/p&gt;
</summary><category term="foo"></category><category term="bar"></category><category term="baz"></category></entry><entry><title>Deuxième article</title><link href="http://blog.notmyidea.org/second-article-fr.html" rel="alternate"></link><updated>2012-02-29T00:00:00+01:00</updated><author><name>Alexis Métaireau</name></author><id>tag:blog.notmyidea.org,2012-02-29:second-article-fr.html</id><summary type="html">&lt;p&gt;Ceci est un article, en français.&lt;/p&gt;
</summary><category term="foo"></category><category term="bar"></category><category term="baz"></category></entry><entry><title>A markdown powered article</title><link href="http://blog.notmyidea.org/a-markdown-powered-article.html" rel="alternate"></link><updated>2011-04-20T00:00:00+02:00</updated><author><name>Alexis Métaireau</name></author><id>tag:blog.notmyidea.org,2011-04-20:a-markdown-powered-article.html</id><summary type="html">&lt;p&gt;You're mutually oblivious.&lt;/p&gt;

View file

@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title>Alexis' log</title><link>http://blog.notmyidea.org/</link><description></description><atom:link href="http://blog.notmyidea.org/feeds/all.rss.xml" rel="self"></atom:link><lastBuildDate>Fri, 02 Mar 2012 14:01:01 +0100</lastBuildDate><item><title>Trop bien !</title><link>http://blog.notmyidea.org/oh-yeah-fr.html</link><description>&lt;p&gt;Et voila du contenu en français&lt;/p&gt;
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title>Alexis' log</title><link>http://blog.notmyidea.org/</link><description></description><atom:link href="http://blog.notmyidea.org/feeds/all.rss.xml" rel="self"></atom:link><lastBuildDate>Fri, 30 Nov 2012 00:00:00 +0100</lastBuildDate><item><title>FILENAME_METADATA example</title><link>http://blog.notmyidea.org/filename_metadata-example.html</link><description>&lt;p&gt;Some cool stuff!&lt;/p&gt;
</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Alexis Métaireau</dc:creator><pubDate>Fri, 30 Nov 2012 00:00:00 +0100</pubDate><guid>tag:blog.notmyidea.org,2012-11-30:filename_metadata-example.html</guid></item><item><title>Trop bien !</title><link>http://blog.notmyidea.org/oh-yeah-fr.html</link><description>&lt;p&gt;Et voila du contenu en français&lt;/p&gt;
</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Alexis Métaireau</dc:creator><pubDate>Fri, 02 Mar 2012 14:01:01 +0100</pubDate><guid>tag:blog.notmyidea.org,2012-03-02:oh-yeah-fr.html</guid></item><item><title>Second article</title><link>http://blog.notmyidea.org/second-article.html</link><description>&lt;p&gt;This is some article, in english&lt;/p&gt;
</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Alexis Métaireau</dc:creator><pubDate>Wed, 29 Feb 2012 00:00:00 +0100</pubDate><guid>tag:blog.notmyidea.org,2012-02-29:second-article.html</guid><category>foo</category><category>bar</category><category>baz</category></item><item><title>Deuxième article</title><link>http://blog.notmyidea.org/second-article-fr.html</link><description>&lt;p&gt;Ceci est un article, en français.&lt;/p&gt;
</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Alexis Métaireau</dc:creator><pubDate>Wed, 29 Feb 2012 00:00:00 +0100</pubDate><guid>tag:blog.notmyidea.org,2012-02-29:second-article-fr.html</guid><category>foo</category><category>bar</category><category>baz</category></item><item><title>A markdown powered article</title><link>http://blog.notmyidea.org/a-markdown-powered-article.html</link><description>&lt;p&gt;You're mutually oblivious.&lt;/p&gt;

View file

@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom"><title>Alexis' log</title><link href="http://blog.notmyidea.org/" rel="alternate"></link><link href="http://blog.notmyidea.org/feeds/misc.atom.xml" rel="self"></link><id>http://blog.notmyidea.org/</id><updated>2012-02-29T00:00:00+01:00</updated><entry><title>Second article</title><link href="http://blog.notmyidea.org/second-article.html" rel="alternate"></link><updated>2012-02-29T00:00:00+01:00</updated><author><name>Alexis Métaireau</name></author><id>tag:blog.notmyidea.org,2012-02-29:second-article.html</id><summary type="html">&lt;p&gt;This is some article, in english&lt;/p&gt;
<feed xmlns="http://www.w3.org/2005/Atom"><title>Alexis' log</title><link href="http://blog.notmyidea.org/" rel="alternate"></link><link href="http://blog.notmyidea.org/feeds/misc.atom.xml" rel="self"></link><id>http://blog.notmyidea.org/</id><updated>2012-11-30T00:00:00+01:00</updated><entry><title>FILENAME_METADATA example</title><link href="http://blog.notmyidea.org/filename_metadata-example.html" rel="alternate"></link><updated>2012-11-30T00:00:00+01:00</updated><author><name>Alexis Métaireau</name></author><id>tag:blog.notmyidea.org,2012-11-30:filename_metadata-example.html</id><summary type="html">&lt;p&gt;Some cool stuff!&lt;/p&gt;
</summary></entry><entry><title>Second article</title><link href="http://blog.notmyidea.org/second-article.html" rel="alternate"></link><updated>2012-02-29T00:00:00+01:00</updated><author><name>Alexis Métaireau</name></author><id>tag:blog.notmyidea.org,2012-02-29:second-article.html</id><summary type="html">&lt;p&gt;This is some article, in english&lt;/p&gt;
</summary><category term="foo"></category><category term="bar"></category><category term="baz"></category></entry><entry><title>Unbelievable !</title><link href="http://blog.notmyidea.org/unbelievable.html" rel="alternate"></link><updated>2010-10-15T20:30:00+02:00</updated><author><name>Alexis Métaireau</name></author><id>tag:blog.notmyidea.org,2010-10-15:unbelievable.html</id><summary type="html">&lt;p&gt;Or completely awesome. Depends the needs.&lt;/p&gt;
&lt;p&gt;&lt;a class="reference external" href="http://blog.notmyidea.org/a-markdown-powered-article.html"&gt;a root-relative link to markdown-article&lt;/a&gt;
&lt;a class="reference external" href="http://blog.notmyidea.org/a-markdown-powered-article.html"&gt;a file-relative link to markdown-article&lt;/a&gt;&lt;/p&gt;

View file

@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title>Alexis' log</title><link>http://blog.notmyidea.org/</link><description></description><atom:link href="http://blog.notmyidea.org/feeds/misc.rss.xml" rel="self"></atom:link><lastBuildDate>Wed, 29 Feb 2012 00:00:00 +0100</lastBuildDate><item><title>Second article</title><link>http://blog.notmyidea.org/second-article.html</link><description>&lt;p&gt;This is some article, in english&lt;/p&gt;
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title>Alexis' log</title><link>http://blog.notmyidea.org/</link><description></description><atom:link href="http://blog.notmyidea.org/feeds/misc.rss.xml" rel="self"></atom:link><lastBuildDate>Fri, 30 Nov 2012 00:00:00 +0100</lastBuildDate><item><title>FILENAME_METADATA example</title><link>http://blog.notmyidea.org/filename_metadata-example.html</link><description>&lt;p&gt;Some cool stuff!&lt;/p&gt;
</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Alexis Métaireau</dc:creator><pubDate>Fri, 30 Nov 2012 00:00:00 +0100</pubDate><guid>tag:blog.notmyidea.org,2012-11-30:filename_metadata-example.html</guid></item><item><title>Second article</title><link>http://blog.notmyidea.org/second-article.html</link><description>&lt;p&gt;This is some article, in english&lt;/p&gt;
</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Alexis Métaireau</dc:creator><pubDate>Wed, 29 Feb 2012 00:00:00 +0100</pubDate><guid>tag:blog.notmyidea.org,2012-02-29:second-article.html</guid><category>foo</category><category>bar</category><category>baz</category></item><item><title>Unbelievable !</title><link>http://blog.notmyidea.org/unbelievable.html</link><description>&lt;p&gt;Or completely awesome. Depends the needs.&lt;/p&gt;
&lt;p&gt;&lt;a class="reference external" href="http://blog.notmyidea.org/a-markdown-powered-article.html"&gt;a root-relative link to markdown-article&lt;/a&gt;
&lt;a class="reference external" href="http://blog.notmyidea.org/a-markdown-powered-article.html"&gt;a file-relative link to markdown-article&lt;/a&gt;&lt;/p&gt;

View file

@ -0,0 +1,116 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>FILENAME_METADATA example</title>
<meta charset="utf-8" />
<link rel="stylesheet" href="./theme/css/main.css" type="text/css" />
<link href="http://blog.notmyidea.org/feeds/all.atom.xml" type="application/atom+xml" rel="alternate" title="Alexis' log Atom Feed" />
<link href="http://blog.notmyidea.org/feeds/all.rss.xml" type="application/rss+xml" rel="alternate" title="Alexis' log RSS 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">
<a href="http://github.com/ametaireau/">
<img style="position: absolute; top: 0; right: 0; border: 0;" src="http://s3.amazonaws.com/github/ribbons/forkme_right_red_aa0000.png" alt="Fork me on GitHub" />
</a>
<header id="banner" class="body">
<h1><a href="./">Alexis' log </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/yeah.html">yeah</a></li>
<li class="active"><a href="./category/misc.html">misc</a></li>
<li ><a href="./category/cat1.html">cat1</a></li>
<li ><a href="./category/bar.html">bar</a></li>
</ul></nav>
</header><!-- /#banner -->
<section id="content" class="body">
<article>
<header>
<h1 class="entry-title">
<a href="./filename_metadata-example.html" rel="bookmark"
title="Permalink to FILENAME_METADATA example">FILENAME_METADATA example</a></h1>
</header>
<div class="entry-content">
<footer class="post-info">
<abbr class="published" title="2012-11-30T00:00:00">
Fri 30 November 2012
</abbr>
<address class="vcard author">
By <a class="url fn" href="./author/alexis-metaireau.html">Alexis Métaireau</a>
</address>
<p>In <a href="./category/misc.html">misc</a>. </p>
</footer><!-- /.post-info --> <p>Some cool stuff!</p>
</div><!-- /.entry-content -->
<div class="comments">
<h2>Comments !</h2>
<div id="disqus_thread"></div>
<script type="text/javascript">
var disqus_identifier = "filename_metadata-example.html";
(function() {
var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
dsq.src = 'http://blog-notmyidea.disqus.com/embed.js';
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
})();
</script>
</div>
</article>
</section>
<section id="extras" class="body">
<div class="blogroll">
<h2>blogroll</h2>
<ul>
<li><a href="http://biologeek.org">Biologeek</a></li>
<li><a href="http://filyb.info/">Filyb</a></li>
<li><a href="http://www.libert-fr.com">Libert-fr</a></li>
<li><a href="http://prendreuncafe.com/blog/">N1k0</a></li>
<li><a href="http://ziade.org/blog">Tarek Ziadé</a></li>
<li><a href="http://zubin71.wordpress.com/">Zubin Mithra</a></li>
</ul>
</div><!-- /.blogroll -->
<div class="social">
<h2>social</h2>
<ul>
<li><a href="http://blog.notmyidea.org/feeds/all.atom.xml" type="application/atom+xml" rel="alternate">atom feed</a></li>
<li><a href="http://blog.notmyidea.org/feeds/all.rss.xml" type="application/rss+xml" rel="alternate">rss feed</a></li>
<li><a href="http://twitter.com/ametaireau">twitter</a></li>
<li><a href="http://lastfm.com/user/akounet">lastfm</a></li>
<li><a href="http://github.com/ametaireau">github</a></li>
</ul>
</div><!-- /.social -->
</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 -->
<script type="text/javascript">
var disqus_shortname = 'blog-notmyidea';
(function () {
var s = document.createElement('script'); s.async = true;
s.type = 'text/javascript';
s.src = 'http://' + disqus_shortname + '.disqus.com/count.js';
(document.getElementsByTagName('HEAD')[0] || document.getElementsByTagName('BODY')[0]).appendChild(s);
}());
</script>
</body>
</html>

View file

@ -38,8 +38,35 @@
<aside id="featured" class="body">
<article>
<h1 class="entry-title"><a href="./second-article.html">Second article</a></h1>
<h1 class="entry-title"><a href="./filename_metadata-example.html">FILENAME_METADATA example</a></h1>
<footer class="post-info">
<abbr class="published" title="2012-11-30T00:00:00">
Fri 30 November 2012
</abbr>
<address class="vcard author">
By <a class="url fn" href="./author/alexis-metaireau.html">Alexis Métaireau</a>
</address>
<p>In <a href="./category/misc.html">misc</a>. </p>
</footer><!-- /.post-info --><p>Some cool stuff!</p>
<p>There are <a href="./filename_metadata-example.html#disqus_thread">comments</a>.</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="./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>
@ -51,14 +78,12 @@
<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>
<p>There are <a href="./second-article.html#disqus_thread">comments</a>.</p> </article>
</aside><!-- /#featured -->
<section id="content" class="body">
<h1>Other articles</h1>
<hr />
<ol id="posts-list" class="hfeed">
</footer><!-- /.post-info --> <p>This is some article, in english</p>
<a class="readmore" href="./second-article.html">read more</a>
<p>There are <a href="./second-article.html#disqus_thread">comments</a>.</p> </div><!-- /.entry-content -->
</article></li>
<li><article class="hentry">
@ -109,34 +134,9 @@
<a class="readmore" href="./article-1.html">read more</a>
<p>There are <a href="./article-1.html#disqus_thread">comments</a>.</p> </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/alexis-metaireau.html">Alexis Métaireau</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>
<p>There are <a href="./article-2.html#disqus_thread">comments</a>.</p> </div><!-- /.entry-content -->
</article></li>
</ol><!-- /#posts-list -->
<p class="paginator">
Page 1 / 2
Page 1 / 3
<a href="./index2.html">&raquo;</a>
</p>
</section><!-- /#content -->

View file

@ -39,6 +39,31 @@
<section id="content" class="body">
<ol id="posts-list" class="hfeed" start="3">
<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/alexis-metaireau.html">Alexis Métaireau</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>
<p>There are <a href="./article-2.html#disqus_thread">comments</a>.</p> </div><!-- /.entry-content -->
</article></li>
<li><article class="hentry">
<header>
<h1><a href="./article-3.html" rel="bookmark"
@ -119,37 +144,11 @@ YEAH !</p>
<a class="readmore" href="./oh-yeah.html">read more</a>
<p>There are <a href="./oh-yeah.html#disqus_thread">comments</a>.</p> </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/alexis-metaireau.html">Alexis Métaireau</a>
</address>
<p>In <a href="./category/misc.html">misc</a>. </p>
</footer><!-- /.post-info --> <p>Or completely awesome. Depends the needs.</p>
<p><a class="reference external" href="./a-markdown-powered-article.html">a root-relative link to markdown-article</a>
<a class="reference external" href="./a-markdown-powered-article.html">a file-relative link to markdown-article</a></p>
<a class="readmore" href="./unbelievable.html">read more</a>
<p>There are <a href="./unbelievable.html#disqus_thread">comments</a>.</p> </div><!-- /.entry-content -->
</article></li>
</ol><!-- /#posts-list -->
<p class="paginator">
<a href="./index.html">&laquo;</a>
Page 2 / 2
Page 2 / 3
<a href="./index3.html">&raquo;</a>
</p>
</section><!-- /#content -->
<section id="extras" class="body">

View file

@ -0,0 +1,115 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>Alexis' log</title>
<meta charset="utf-8" />
<link rel="stylesheet" href="./theme/css/main.css" type="text/css" />
<link href="http://blog.notmyidea.org/feeds/all.atom.xml" type="application/atom+xml" rel="alternate" title="Alexis' log Atom Feed" />
<link href="http://blog.notmyidea.org/feeds/all.rss.xml" type="application/rss+xml" rel="alternate" title="Alexis' log RSS 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">
<a href="http://github.com/ametaireau/">
<img style="position: absolute; top: 0; right: 0; border: 0;" src="http://s3.amazonaws.com/github/ribbons/forkme_right_red_aa0000.png" alt="Fork me on GitHub" />
</a>
<header id="banner" class="body">
<h1><a href="./">Alexis' log </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/yeah.html">yeah</a></li>
<li ><a href="./category/misc.html">misc</a></li>
<li ><a href="./category/cat1.html">cat1</a></li>
<li ><a href="./category/bar.html">bar</a></li>
</ul></nav>
</header><!-- /#banner -->
<section id="content" class="body">
<ol id="posts-list" class="hfeed" start="3">
<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/alexis-metaireau.html">Alexis Métaireau</a>
</address>
<p>In <a href="./category/misc.html">misc</a>. </p>
</footer><!-- /.post-info --> <p>Or completely awesome. Depends the needs.</p>
<p><a class="reference external" href="./a-markdown-powered-article.html">a root-relative link to markdown-article</a>
<a class="reference external" href="./a-markdown-powered-article.html">a file-relative link to markdown-article</a></p>
<a class="readmore" href="./unbelievable.html">read more</a>
<p>There are <a href="./unbelievable.html#disqus_thread">comments</a>.</p> </div><!-- /.entry-content -->
</article></li>
</ol><!-- /#posts-list -->
<p class="paginator">
<a href="./index2.html">&laquo;</a>
Page 3 / 3
</p>
</section><!-- /#content -->
<section id="extras" class="body">
<div class="blogroll">
<h2>blogroll</h2>
<ul>
<li><a href="http://biologeek.org">Biologeek</a></li>
<li><a href="http://filyb.info/">Filyb</a></li>
<li><a href="http://www.libert-fr.com">Libert-fr</a></li>
<li><a href="http://prendreuncafe.com/blog/">N1k0</a></li>
<li><a href="http://ziade.org/blog">Tarek Ziadé</a></li>
<li><a href="http://zubin71.wordpress.com/">Zubin Mithra</a></li>
</ul>
</div><!-- /.blogroll -->
<div class="social">
<h2>social</h2>
<ul>
<li><a href="http://blog.notmyidea.org/feeds/all.atom.xml" type="application/atom+xml" rel="alternate">atom feed</a></li>
<li><a href="http://blog.notmyidea.org/feeds/all.rss.xml" type="application/rss+xml" rel="alternate">rss feed</a></li>
<li><a href="http://twitter.com/ametaireau">twitter</a></li>
<li><a href="http://lastfm.com/user/akounet">lastfm</a></li>
<li><a href="http://github.com/ametaireau">github</a></li>
</ul>
</div><!-- /.social -->
</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 -->
<script type="text/javascript">
var disqus_shortname = 'blog-notmyidea';
(function () {
var s = document.createElement('script'); s.async = true;
s.type = 'text/javascript';
s.src = 'http://' + disqus_shortname + '.disqus.com/count.js';
(document.getElementsByTagName('HEAD')[0] || document.getElementsByTagName('BODY')[0]).appendChild(s);
}());
</script>
</body>
</html>

View file

@ -73,6 +73,7 @@ class TestArticlesGenerator(unittest.TestCase):
[u'Article title', 'published', 'Default', 'article'],
[u'Article with template', 'published', 'Default', 'custom'],
[u'Test md File', 'published', 'test', 'article'],
[u'Rst with filename metadata', 'published', u'yeah', 'article'],
[u'Test Markdown extensions', 'published', u'Default', 'article'],
[u'This is a super article !', 'published', 'Yeah', 'article'],
[u'This is an article with category !', 'published', 'yeah', 'article'],

View file

@ -34,6 +34,50 @@ class RstReaderTest(unittest.TestCase):
for key, value in expected.items():
self.assertEquals(value, metadata[key], key)
def test_article_with_filename_metadata(self):
content, metadata = readers.read_file(
_filename('2012-11-29_rst_w_filename_meta#foo-bar.rst'),
settings={})
expected = {
'category': 'yeah',
'author': u'Alexis Métaireau',
'title': 'Rst with filename metadata',
}
for key, value in metadata.items():
self.assertEquals(value, expected[key], key)
content, metadata = readers.read_file(
_filename('2012-11-29_rst_w_filename_meta#foo-bar.rst'),
settings={
'FILENAME_METADATA': '(?P<date>\d{4}-\d{2}-\d{2}).*'
})
expected = {
'category': 'yeah',
'author': u'Alexis Métaireau',
'title': 'Rst with filename metadata',
'date': datetime.datetime(2012, 11, 29),
}
for key, value in metadata.items():
self.assertEquals(value, expected[key], key)
content, metadata = readers.read_file(
_filename('2012-11-29_rst_w_filename_meta#foo-bar.rst'),
settings={
'FILENAME_METADATA': '(?P<date>\d{4}-\d{2}-\d{2})_' \
'_(?P<Slug>.*)' \
'#(?P<MyMeta>.*)-(?P<author>.*)'
})
expected = {
'category': 'yeah',
'author': u'Alexis Métaireau',
'title': 'Rst with filename metadata',
'date': datetime.datetime(2012, 11, 29),
'slug': 'article_with_filename_metadata',
'mymeta': 'foo',
}
for key, value in metadata.items():
self.assertEquals(value, expected[key], key)
def test_article_metadata_key_lowercase(self):
"""Keys of metadata should be lowercase."""
reader = readers.RstReader({})
@ -80,6 +124,13 @@ class MdReaderTest(unittest.TestCase):
self.assertEqual(content, expected)
expected = {
'category': 'test',
'title': 'Test md File',
}
for key, value in metadata.items():
self.assertEquals(value, expected[key], key)
@unittest.skipUnless(readers.Markdown, "markdown isn't installed")
def test_article_with_mkd_extension(self):
# test to ensure the mkd extension is being processed by the correct reader
@ -110,6 +161,48 @@ class MdReaderTest(unittest.TestCase):
self.assertEqual(content, expected)
@unittest.skipUnless(readers.Markdown, "markdown isn't installed")
def test_article_with_filename_metadata(self):
content, metadata = readers.read_file(
_filename('2012-11-30_md_w_filename_meta#foo-bar.md'),
settings={})
expected = {
'category': 'yeah',
'author': u'Alexis Métaireau',
}
for key, value in expected.items():
self.assertEquals(value, metadata[key], key)
content, metadata = readers.read_file(
_filename('2012-11-30_md_w_filename_meta#foo-bar.md'),
settings={
'FILENAME_METADATA': '(?P<date>\d{4}-\d{2}-\d{2}).*'
})
expected = {
'category': 'yeah',
'author': u'Alexis Métaireau',
'date': datetime.datetime(2012, 11, 30),
}
for key, value in expected.items():
self.assertEquals(value, metadata[key], key)
content, metadata = readers.read_file(
_filename('2012-11-30_md_w_filename_meta#foo-bar.md'),
settings={
'FILENAME_METADATA': '(?P<date>\d{4}-\d{2}-\d{2})'
'_(?P<Slug>.*)'
'#(?P<MyMeta>.*)-(?P<author>.*)'
})
expected = {
'category': 'yeah',
'author': u'Alexis Métaireau',
'date': datetime.datetime(2012, 11, 30),
'slug': 'md_w_filename_meta',
'mymeta': 'foo',
}
for key, value in expected.items():
self.assertEquals(value, metadata[key], key)
class AdReaderTest(unittest.TestCase):
@unittest.skipUnless(readers.asciidoc, "asciidoc isn't installed")