mirror of
https://github.com/getpelican/pelican.git
synced 2025-10-15 20:28:56 +02:00
Merge branch 'master' of https://github.com/mapio/pelican
This commit is contained in:
commit
384c579c4a
2 changed files with 4 additions and 8 deletions
|
|
@ -18,13 +18,14 @@ class Pelican(object):
|
||||||
before doing anything else.
|
before doing anything else.
|
||||||
"""
|
"""
|
||||||
self.path = path or settings['PATH']
|
self.path = path or settings['PATH']
|
||||||
if path or self.path.endswith('/'):
|
if not self.path:
|
||||||
|
raise Exception('you need to specify a path to search the docs on !')
|
||||||
|
if self.path.endswith('/'):
|
||||||
self.path = path[:-1]
|
self.path = path[:-1]
|
||||||
|
|
||||||
# define the default settings
|
# define the default settings
|
||||||
self.settings = settings
|
self.settings = settings
|
||||||
self.theme = theme or settings['THEME']
|
self.theme = theme or settings['THEME']
|
||||||
self.path = path
|
|
||||||
output_path = output_path or settings['OUTPUT_PATH']
|
output_path = output_path or settings['OUTPUT_PATH']
|
||||||
self.output_path = os.path.realpath(output_path)
|
self.output_path = os.path.realpath(output_path)
|
||||||
self.markup = markup or settings['MARKUP']
|
self.markup = markup or settings['MARKUP']
|
||||||
|
|
@ -39,11 +40,6 @@ class Pelican(object):
|
||||||
else:
|
else:
|
||||||
raise Exception("Impossible to find the theme %s" % theme)
|
raise Exception("Impossible to find the theme %s" % theme)
|
||||||
|
|
||||||
# get the list of files to parse
|
|
||||||
if not self.path:
|
|
||||||
raise Exception('you need to specify a path to search the docs on !')
|
|
||||||
|
|
||||||
|
|
||||||
def run(self):
|
def run(self):
|
||||||
"""Run the generators and return"""
|
"""Run the generators and return"""
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -47,7 +47,7 @@ class Writer(object):
|
||||||
:param filename: the filename to output.
|
:param filename: the filename to output.
|
||||||
:param feed_type: the feed type to use (atom or rss)
|
:param feed_type: the feed type to use (atom or rss)
|
||||||
"""
|
"""
|
||||||
old_locale = locale.getlocale(locale.LC_ALL)
|
old_locale = locale.setlocale(locale.LC_ALL)
|
||||||
locale.setlocale(locale.LC_ALL, 'C')
|
locale.setlocale(locale.LC_ALL, 'C')
|
||||||
try:
|
try:
|
||||||
self.site_url = context.get('SITEURL', get_relative_path(filename))
|
self.site_url = context.get('SITEURL', get_relative_path(filename))
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue