-
Notifications
You must be signed in to change notification settings - Fork 104
/
pelicanconf.py
138 lines (113 loc) · 3.82 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 __future__ import unicode_literals
from datetime import datetime
from collections import namedtuple
import os
import yaml
AUTHOR = u'PyLadies'
SITENAME = u'PyLadies Brasil'
SITEURL = '{}'.format(os.getenv('SITEURL', 'http://localhost:{}'.format(os.getenv('PORT', '8000'))))
TAGLINE = (u'Ninguém pode fazer você se sentir inferior'
'sem o seu consentimento (Eleanor Roosevelt)')
DEFAULT_DATE_FORMAT = ('%d-%m-%Y')
DEFAULT_BG = 'images/marca/logo-oficial-pyladies-brasil-cabeca-sem-borda.png'
SINCE = datetime.now().year
NOW = datetime.now().date()
SUMMARY_MAX_LENGTH = 30
ARTICLE_URL = '{date:%Y}/{date:%m}/{date:%d}/{slug}/'
ARTICLE_SAVE_AS = '{}index.html'.format(ARTICLE_URL)
PAGE_URL = '{slug}/'
PAGE_SAVE_AS = '{slug}/index.html'
# Sitemap
DIRECT_TEMPLATES = ('index', 'tags', 'categories', 'archives', 'sitemap')
SITEMAP_SAVE_AS = 'sitemap.xml'
TIMEZONE = 'America/Sao_Paulo'
DEFAULT_LANG = u'pt-br'
THEME = 'themes/default'
PATH = 'content'
# Feed generation is usually not desired when developing
FEED_ALL_ATOM = None
CATEGORY_FEED_ATOM = None
TRANSLATION_FEED_ATOM = None
AUTHOR_FEED_ATOM = None
AUTHOR_FEED_RSS = None
MENUITEMS = (
('Sobre', '/about'),
('Locais', '/locations'),
('Videos', '/videos'),
('Materiais', '/materiais'),
('Blog', '/archives.html'),
)
DEFAULT_PAGINATION = 10
READERS = {'html': None}
STATIC_PATHS = [
'images',
'extra/robots.txt',
'extra/favicon.ico',
'extra/favicon.png',
# Site estático da primeira edição do evento
'conf-1',
# Site estático da primeira edição da PyLadies Conf Nordeste
'conf-nordeste-1'
]
EXTRA_PATH_METADATA = {
'extra/robots.txt': {'path': 'robots.txt'},
'extra/favicon.ico': {'path': 'favicon.ico'},
'extra/favicon.png': {'path': 'favicon.png'},
'conf-1': {'path': 'conf-1'},
'conf-nordeste-1': {'path': 'conf-nordeste-1'},
}
# ANALYTICS
GOOGLE_ANALYTICS_UA = 'UA-58961512-1'
DISQUS_SITENAME = 'pyladiesbrasil'
# Uncomment following line if you want document-relative URLs when developing
# RELATIVE_URLS = True
# Locations, Events and Videos
with open('data/locations.yml') as locations:
locations_converted = yaml.safe_load(locations.read())
LOCATIONS = []
for location in locations_converted:
LOCATIONS.append(
namedtuple('Locations', location.keys())(**location)
)
if os.path.isfile("data/videos_depo.yml"):
with open("data/videos_depo.yml") as videos:
videos_converted = yaml.safe_load(videos.read())
VIDEOS_DEPO = [
namedtuple("Videos", video.keys())(**video)
for video in videos_converted
if video["url"]
]
if os.path.isfile("data/videos_talks.yml"):
with open("data/videos_talks.yml") as videos:
videos_converted = yaml.safe_load(videos.read())
VIDEOS_TALKS = [
namedtuple("Videos", video.keys())(**video)
for video in videos_converted
if video["url"]
]
if os.path.isfile("data/videos_tutorials.yml"):
with open("data/videos_tutorials.yml") as videos:
videos_converted = yaml.safe_load(videos.read())
VIDEOS_TUTORIALS = [
namedtuple("Videos", video.keys())(**video)
for video in videos_converted
if video["url"]
]
with open('data/talks.yml') as talks:
talks_readed = yaml.safe_load(talks.read())
TALKS = []
for talk in talks_readed:
TALKS.append(
namedtuple('Talks', talk.keys())(**talk)
)
with open('data/materials.yml') as materials:
materials_readed = yaml.safe_load(materials.read())
MATERIALS = []
for materials in materials_readed:
MATERIALS.append(
namedtuple('Materials', materials.keys())(**materials)
)
PLUGIN_PATHS = ['plugins']
PLUGINS = ['tipue_search']