diff options
| author | Christian Cleberg <[email protected]> | 2026-02-22 11:33:31 -0600 |
|---|---|---|
| committer | GitHub <[email protected]> | 2026-02-22 11:33:31 -0600 |
| commit | 292bb6595730bba79e432545303ff07926ba1b95 (patch) | |
| tree | cd7708de0e7dce84a21cbd2713c3b1760e7c8410 /build.py | |
| parent | fa252874584e7590c487014ad490d0ea6580bfcb (diff) | |
| download | cleberg.net-292bb6595730bba79e432545303ff07926ba1b95.tar.gz cleberg.net-292bb6595730bba79e432545303ff07926ba1b95.tar.bz2 cleberg.net-292bb6595730bba79e432545303ff07926ba1b95.zip | |
add step to copy raw org-mode to output dir (#15)
* fix image URL in latest post
* add step to copy raw org-mode to output dir
Diffstat (limited to 'build.py')
| -rw-r--r-- | build.py | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -268,6 +268,13 @@ def run_emacs_publish(dev_mode=True): ) +def copy_org_sources(content_dir="./content", build_dir="./.build/org"): + print(f"Copying org sources: {content_dir} → {build_dir}") + if os.path.exists(build_dir): + shutil.rmtree(build_dir) + shutil.copytree(content_dir, build_dir) + + def generate_sitemap(build_dir=".build", base_url="https://cleberg.net"): """ Generates a sitemap.xml based on contents of the .build directory. @@ -355,6 +362,7 @@ def main(): remove_build_directory(build_dir) minify_css(css_src, css_min) run_emacs_publish(dev_mode=False) + copy_org_sources() update_index_html(html_snippet) minify_html("./.build/index.html", "./.build/index.html") generate_sitemap() @@ -368,6 +376,7 @@ def main(): remove_build_directory(build_dir) minify_css(css_src, css_min) run_emacs_publish(dev_mode=True) + copy_org_sources() update_index_html(html_snippet) minify_html("./.build/index.html", "./.build/index.html") generate_sitemap() |
