mirror of
https://github.com/getpelican/pelican.git
synced 2025-10-15 20:28:56 +02:00
Welcome Pelican 2.0 ! Refactoring of the internals to be more extensible.
--HG-- rename : pelican/bloggenerator.py => pelican/generators.py
This commit is contained in:
parent
5e2ca2dd56
commit
fdb920e50a
9 changed files with 430 additions and 337 deletions
25
pelican/settings.py
Normal file
25
pelican/settings.py
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
import os
|
||||
|
||||
_DEFAULT_THEME = os.sep.join([os.path.dirname(os.path.abspath(__file__)),
|
||||
"themes"])
|
||||
_DEFAULT_CONFIG = {'PATH': None,
|
||||
'THEME': _DEFAULT_THEME,
|
||||
'OUTPUT_PATH': 'output/',
|
||||
'MARKUP': 'rst',
|
||||
'STATIC_PATHS': ['css', 'images'],
|
||||
'FEED': 'feeds/all.atom.xml',
|
||||
'CATEGORY_FEED': 'feeds/%s.atom.xml',
|
||||
'SITENAME': 'A Pelican Blog',
|
||||
}
|
||||
|
||||
def read_settings(filename):
|
||||
"""Load a Python file into a dictionary.
|
||||
"""
|
||||
context = _DEFAULT_CONFIG.copy()
|
||||
if filename:
|
||||
tempdict = {}
|
||||
execfile(filename, tempdict)
|
||||
for key in tempdict:
|
||||
if key.isupper():
|
||||
context[key] = tempdict[key]
|
||||
return context
|
||||
Loading…
Add table
Add a link
Reference in a new issue