make the call to generate the RSS/ATOM feeds when building
Signed-off-by: Brian S. Stephan <bss@incorporeal.org>
This commit is contained in:
parent
4c9ed712bc
commit
168bca05f7
@ -12,6 +12,7 @@ import tempfile
|
||||
from termcolor import cprint
|
||||
|
||||
from incorporealcms import __version__, init_instance
|
||||
from incorporealcms.feed import generate_feed
|
||||
from incorporealcms.markdown import handle_markdown_file_path
|
||||
|
||||
|
||||
@ -58,6 +59,11 @@ class StaticSiteGenerator(object):
|
||||
custom_static_dir = os.path.join(self.instance_dir, 'custom-static')
|
||||
self.build_in_destination(custom_static_dir, static_output_dir, convert_markdown=False)
|
||||
|
||||
# generate the feeds
|
||||
cprint("generating feeds", 'green')
|
||||
generate_feed('atom', self.instance_dir, self.output_dir)
|
||||
generate_feed('rss', self.instance_dir, self.output_dir)
|
||||
|
||||
# move temporary dir to the destination
|
||||
old_output_dir = f'{self.output_dir}-old-{os.path.basename(tmp_output_dir)}'
|
||||
if os.path.exists(self.output_dir):
|
||||
|
Loading…
x
Reference in New Issue
Block a user