|
|
@ -53,6 +53,13 @@ def copy_static_files(): |
|
|
|
shutil.copy2(source, dest) |
|
|
|
|
|
|
|
|
|
|
|
def copy_style_css(): |
|
|
|
style_source = os.path.join(static_directory, 'style.css') |
|
|
|
style_dest = os.path.join(output_directory, 'style.css') |
|
|
|
print_file(style_source, style_dest) |
|
|
|
shutil.copy2(style_source, style_dest) |
|
|
|
|
|
|
|
|
|
|
|
def find_update_date(text): |
|
|
|
match = re.search(r'^\*?Posted (\d{4}-\d{2}-\d{2})', text, re.MULTILINE) |
|
|
|
if not match: |
|
|
@ -227,7 +234,9 @@ def main(): |
|
|
|
if args.clean: |
|
|
|
shutil.rmtree(output_directory) |
|
|
|
os.makedirs(output_directory, exist_ok=True) |
|
|
|
if not args.fast: |
|
|
|
if args.fast: |
|
|
|
copy_style_css() |
|
|
|
else: |
|
|
|
copy_static_files() |
|
|
|
process_markdown_files() |
|
|
|
make_sitemap() |
|
|
|