1
Fork 0
This repository has been archived on 2023-03-26. You can view files and clone it, but cannot push or open issues or pull requests.
theorangeone.net-legacy/plugins/post_build.py

16 lines
421 B
Python
Raw Normal View History

2017-01-10 09:09:30 +00:00
from pelican import signals
import os
OUTPUT_PATH = os.path.join(os.path.dirname(os.path.dirname(os.path.abspath(__file__))), 'output')
def post_build(*args, **kwargs):
os.system("mv {0}/assets/robots.txt {0}".format(OUTPUT_PATH))
os.system("cp -R {0}/assets/* {0}/static".format(OUTPUT_PATH))
os.system("rm -rf {0}/assets".format(OUTPUT_PATH))
def register():
signals.finalized.connect(post_build)