Added extra pass for static assets

This commit is contained in:
Sebastian 2015-10-17 17:57:26 +02:00
parent 8e2da40540
commit 8fdf4dd0c7
2 changed files with 23 additions and 0 deletions

View File

@ -0,0 +1,17 @@
#!/usr/bin/env python2
from verdandi.constants import CONTENT_DIRECTORY
class AssetsMixin(object):
assets = []
content_directory = CONTENT_DIRECTORY
def get_assets(self):
return self.assets
def collect_assets(self, output_directory):
assets = self.get_assets()

View File

@ -33,6 +33,11 @@ class Verdandi(object):
messages = messages + self.send_message(message)
def collect_assets(self):
for module in self.modules:
module.collect_assets(self.output_directory)
def render(self):
if not os.path.exists(self.output_directory):
os.mkdir(self.output_directory)
@ -42,4 +47,5 @@ class Verdandi(object):
def run(self):
self.pass_messages()
self.collect_assets()
self.render()