This repository has been archived by the owner on Mar 13, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
/
pelicanconf.py
138 lines (102 loc) · 3.57 KB
/
pelicanconf.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
#!/usr/bin/env python
# -*- coding: utf-8 -*- #
from jinja2.ext import loopcontrols
from os.path import dirname
import sys
from pelican.utils import slugify
import logging
logger = logging.getLogger(__name__)
sys.path.insert(0, dirname(__file__))
from plugins import conference
AUTHOR = u"L'équipe d'organisation"
SITENAME = u'Conférence Agile France 2014'
SITEURL = ''
TWITTER_USERNAME = "AgileFrance"
TIMEZONE = 'Europe/Paris'
DEFAULT_LANG = u'fr'
LOCALE = ['fr_FR.utf8', 'fra_fra']
def MENUITEMS(session_info):
def session_list_menu(sessions):
return [(s.title, '/' + s.url) for s in sessions]
def sessions_by_tag(tags):
categories = [u"Keynote", u"Produit", u"Collaborer", u"Construire", u"Organisation", u"Bouffée d'air frais"]
return [(category, session_list_menu(tags[category])) for category in categories]
return [
(u'Accueil', '/index.html'),
(u'Appel à Orateurs', '/pages/appel-a-orateurs.html'),
(u'Programme', '/programme_2014.html'),
(u'Sessions', [
(u'Toutes', session_list_menu(session_info.sessions.all))] + sessions_by_tag(session_info.sessions.by_tag) ),
(u'FAQ', '/pages/faq.html'),
(u'Blog', '/archives.html'),
(u'Informations', [
(u'Accès', '/acces.html'),
(u'Orateurs', '/pages/les-orateurs.html'),
(u'Organisateurs', '/pages/lequipe-dorganisation.html')
]),
(u'Éditions précédentes', [
(u'2013', 'http://2013.conference-agile.fr'),
(u'2012', 'http://2012.conference-agile.fr'),
(u'2011 - restauration en cours', '#'),
(u'2010 - restauration en cours', '#'),
(u'2009', 'http://2009.conference-agile.fr'),
(u'2008', 'http://2009.conference-agile.fr/conf.agile-france.org/2008_programme.html'),
(u'2007 - restauration en cours', '#'),
(u'2006 - restauration en cours', '#'),
],)
]
FEED_ALL_RSS = 'feeds/all.rss.xml'
CATEGORY_FEED_RSS = 'feeds/%s.rss.xml'
GOOGLE_ANALYTICS = 'UA-36421002-1'
DEFAULT_PAGINATION = 10
THEME = 'themes/ericka'
# Color Stylesheet - orange, blue, pink, brown, red or green
CSS_FILE = 'orange.css'
INDEX_SAVE_AS = False
JINJA_EXTENSIONS = [loopcontrols]
PLUGINS = [conference]
ARTICLE_EXCLUDES = ['pages', 'bios', 'sessions']
SESSION_DIR = 'sessions/current'
SESSION_EXCLUDES = ''
SESSION_SAVE_AS = 'sessions/{slug}.html'
SESSION_URL = 'sessions/{slug}.html'
BIO_DIR = 'bios/current'
BIO_EXCLUDES = ''
BIO_SAVE_AS = 'bios/{slug}.html'
BIO_URL = 'bios/{slug}.html'
BIO_PIC_PATH = 'trombines'
ROLE_NAMES = {
'perfecter': {'M': u'Relecteur', 'F': u'Relectrice'},
'organizer': {'M': u'Organisateur', 'F': u'Organisatrice'},
'speaker': {'M': u'Orateur', 'F': u'Oratrice'},
'aux': {'M': u'aux', 'F': u'aux'},
}
ROOM_NAMES = {
'1': u'1 - Belvédère',
'2': u'2 - Chalet RdC',
'3': u'3 - Chalet 1er étage',
'4': u'4 - Chalet 1er étage',
'5': u'5 - Chalet 1er étage',
'6': u'6 - Fermette',
}
def apostrophe(article, nom):
if nom[0].lower() in "aeiouy":
return article[:-1] + "'" + nom
else:
return article + ' ' + nom
def sessions_after(sessions, session):
try:
i = sessions.index(session)
return sessions[i+1:]+sessions[:i]
except Exception, e:
logger.error(u'Unknown session "%s"\n%s' % (session.title, unicode(e)))
return []
JINJA_FILTERS = {'apostrophe': apostrophe, 'sessions_after': sessions_after, 'slugify': slugify}
STATIC_PATHS = ['programme', 'images']
TEMPLATE_PAGES = {
'js/custom.js': 'theme/js/custom.js',
'programme_2014.html': 'programme_2014.html',
}
#TEMPLATE_PAGES = {'programme.html':'programme.html', 'livret.html': 'livret.html', 'sessions.html': 'sessions.html'}
FILES_TO_COPY = (('extra/favicon.ico', 'favicon.ico'),)
NUM_RECENT_POSTS = 10