1
0
Fork 0
forked from github/pelican

Add a caching mechnism

This commit is contained in:
Alexis Métaireau 2013-09-25 23:35:36 +02:00
commit 2b87eb7af6
4 changed files with 66 additions and 5 deletions

View file

@ -112,6 +112,8 @@ DEFAULT_CONFIG = {
'IGNORE_FILES': ['.#*'],
'SLUG_SUBSTITUTIONS': (),
'INTRASITE_LINK_REGEX': '[{|](?P<what>.*?)[|}]',
'CACHE_PATH': '_pelican_cache',
'USE_CACHE': False,
}
PYGMENTS_RST_OPTIONS = None
@ -121,7 +123,7 @@ def read_settings(path=None, override=None):
if path:
local_settings = get_settings_from_file(path)
# Make the paths relative to the settings file
for p in ['PATH', 'OUTPUT_PATH', 'THEME', 'PLUGIN_PATH']:
for p in ['PATH', 'OUTPUT_PATH', 'THEME', 'PLUGIN_PATH', 'CACHE_PATH']:
if p in local_settings and local_settings[p] is not None \
and not isabs(local_settings[p]):
absp = os.path.abspath(os.path.normpath(os.path.join(