From a0cbfad9fdacf74df26c8e8302900a2c48e9c140 Mon Sep 17 00:00:00 2001 From: Sébastien Dailly Date: Sat, 20 Apr 2013 17:40:22 +0200 Subject: Added 404 and htacess file --- extras/404.html | 8 ++++++++ extras/htaccess | 4 ++++ pelicanconf.py | 7 +++++-- 3 files changed, 17 insertions(+), 2 deletions(-) create mode 100644 extras/404.html create mode 100644 extras/htaccess diff --git a/extras/404.html b/extras/404.html new file mode 100644 index 0000000..5c0cda0 --- /dev/null +++ b/extras/404.html @@ -0,0 +1,8 @@ +{% extends "base.html" %} +{% block content_title %}Erreur 404{% endblock %} +{% block content %} +
+

Erreur 404

+ La page que vous cherchez n'existe pas. +
+{% endblock content %} diff --git a/extras/htaccess b/extras/htaccess new file mode 100644 index 0000000..c1e90ab --- /dev/null +++ b/extras/htaccess @@ -0,0 +1,4 @@ +ErrorDocument 404 /404.html + +# Redirection pour les flux rss restés sous wordpress +Redirect /feed/ /feed diff --git a/pelicanconf.py b/pelicanconf.py index 9165b21..d20f05c 100755 --- a/pelicanconf.py +++ b/pelicanconf.py @@ -9,8 +9,6 @@ TIMEZONE = 'Europe/Paris' DEFAULT_LANG = u'fr' -#ARTICLE_DIR = 'articles' - # Blogroll #LINKS = (('Pelican', 'http://docs.notmyidea.org/alexis/pelican/'), # ('Python.org', 'http://python.org'), @@ -32,10 +30,15 @@ TAG_FEED_ATOM = 'feeds/%s.atom' ARTICLE_URL = u'{date:%Y}/{date:%m}/{slug}/' ARTICLE_SAVE_AS = u'{date:%Y}/{date:%m}/{slug}/index.html' + DISQUS_SITENAME='chimrod' THEME = 'theme' TYPOGRIFY = True +TEMPLATE_PAGES = {'../extras/404.html': '404.html'} +FILES_TO_COPY = ( + ('../extras/htaccess', '.htaccess'), +) from pelican.plugins import related_posts PLUGINS = [related_posts] -- cgit v1.2.3