From 0c1caf26d2e2defae3ed2a15ad0df21c4745007a Mon Sep 17 00:00:00 2001 From: Tim Van Baak Date: Tue, 19 Sep 2023 21:29:41 -0700 Subject: [PATCH] Build to publish in a separate path --- .gitignore | 1 + Makefile | 9 ++++++--- build.py | 5 ++--- src/about/index.md | 4 +--- 4 files changed, 10 insertions(+), 9 deletions(-) diff --git a/.gitignore b/.gitignore index 1fe8d35..4c18edd 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ out/ +srv/ venv \ No newline at end of file diff --git a/Makefile b/Makefile index ce0441c..dd7a8f1 100644 --- a/Makefile +++ b/Makefile @@ -1,11 +1,12 @@ .PHONY: * build: - ./build.py + ./build.py out/ pagefind --site out/ clean: - test -e out && rm -rf out + test -e out && rm -rf out || true + test -e srv && rm -rf srv || true watch: while inotifywait -r -e modify -e move -e create -e delete build.py Makefile src/; do make build; done @@ -14,4 +15,6 @@ serve: python -m http.server --directory out/ publish: - rsync -av out/* ssh.alogoulogoi.com:/srv/www.alogoulogoi.com \ No newline at end of file + ./build.py srv/ + pagefind --site srv/ + rsync -av srv/* ssh.alogoulogoi.com:/srv/www.alogoulogoi.com \ No newline at end of file diff --git a/build.py b/build.py index a3dcab1..ed660cd 100755 --- a/build.py +++ b/build.py @@ -12,11 +12,10 @@ import markdown def main(): parser = argparse.ArgumentParser() - parser.add_argument("src", help="source directory", nargs="?", default="./src") - parser.add_argument("out", help="output directory", nargs="?", default="./out") + parser.add_argument("out", help="output directory") args = parser.parse_args() - src = pathlib.Path(args.src) + src = pathlib.Path("src") out = pathlib.Path(args.out) md = markdown.Markdown(extensions=["attr_list", "footnotes", "md_in_html", "meta"]) diff --git a/src/about/index.md b/src/about/index.md index f39b742..ac0f016 100644 --- a/src/about/index.md +++ b/src/about/index.md @@ -8,7 +8,7 @@ I self-host a Gitea instance at [git.alogoulogoi.com](https://git.alogoulogoi.co # Colophon -**Technology:** This website is built from [Markdown and HTML sources](https://git.alogoulogoi.com/Jaculabilis/www) using [Python-Markdown](https://python-markdown.github.io/). It is hosted on a NixOS VPS running Nginx and serving static files deployed via `rsync`. +This website is built from [Markdown and HTML sources](https://git.alogoulogoi.com/Jaculabilis/www) using [Python-Markdown](https://python-markdown.github.io/). The static files are deployed to a NixOS VPS via `rsync` and served by Nginx. Before the Internet was a deployment system for JavaScript, it was a web of interlinked hypertext documents. This site's design reflects that forgotten dream. The pages are self-contained, the styling is minimal, and the content is accessible without scripting enabled. @@ -17,5 +17,3 @@ A selection of other sites used as design inspiration: * [brutalist-web.design](https://brutalist-web.design/) * [blog.aqwari.net](https://blog.aqwari.net/) * [spectrum-os.org](https://spectrum-os.org/) - -**Privacy:** Nginx keeps request logs, but I never check them. I don't know what I'd do with them, either.