From df49bb41b1be2f6b9647e8bb4cbe61309a47e8b8 Mon Sep 17 00:00:00 2001 From: Ed_ Date: Tue, 25 Aug 2026 13:04:24 -0400 Subject: [PATCH] adjust for using a subdomain instead. --- README.md | 4 ++-- index.md | 2 -- publish/quartz-patches/apply.py | 8 ++++---- publish/quartz-patches/test_apply.py | 11 ++++++----- publish/quartz.config.yaml | 5 ++--- 5 files changed, 14 insertions(+), 16 deletions(-) diff --git a/README.md b/README.md index 5deb7d9..5199b94 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ Recovered threads and submerged records. An [Obsidian](https://obsidian.md) vault published with [Quartz 5](https://quartz.jzhao.xyz) to GitHub Pages. The site is a convenient host for Twitter/X threads and other material that is not reliably web-indexed. -Live (after Pages is enabled): https://ed94.github.io/Threadwell +Live (after Pages is enabled): [threadwell.edsabode.dev](https://threadwell.edsabode.dev) ## Post an issue for an inaccuracy @@ -114,7 +114,7 @@ Open http://localhost:8080 1. Repo Settings → Pages → Source: **GitHub Actions** 2. If an old `github-pages` environment blocks the first deploy, delete it under Settings → Environments. The workflow recreates it. 3. Push `main`. CI clones Quartz into `site/`, applies `publish/quartz.config.yaml`, builds with `-d ..`. -4. Site: `https://ed94.github.io/Threadwell` +4. Site: `https://threadwell.edsabode.dev` `baseUrl` lives in `publish/quartz.config.yaml`. Change it if you attach a custom domain. diff --git a/index.md b/index.md index 01ea966..ced6806 100644 --- a/index.md +++ b/index.md @@ -6,8 +6,6 @@ description: Recovered threads and submerged records. tags: [] --- - - An archive of material that is not reliably web-indexed: Twitter/X threads, talks, and other primary sources, plus the notes distilled from them. - [[archive/index|Archive]] — objective records of threads and other sources diff --git a/publish/quartz-patches/apply.py b/publish/quartz-patches/apply.py index 6dd70e4..c23912d 100644 --- a/publish/quartz-patches/apply.py +++ b/publish/quartz-patches/apply.py @@ -1,4 +1,4 @@ -"""Keep in-site links under the /Threadwell/ path. +"""Keep in-site links under the path from `baseUrl`. Two stages: @@ -42,7 +42,7 @@ def read_base_url() -> tuple[str, str]: if stripped.startswith("baseUrl:"): host = stripped.split(":", 1)[1].strip() break - if not host or "/" not in host: + if not host: raise SystemExit(f"missing baseUrl in {OVERLAY}") if host.startswith("http://"): scheme = "http://" @@ -134,8 +134,8 @@ def patch_spa() -> bool: def page_dir_href(html_path: Path, public: Path, rel_base: str) -> str: """Return the path-absolute directory of a built HTML file. - `public/archive/threads/h/slug/index.html` with rel_base `/Threadwell/` - becomes `/Threadwell/archive/threads/h/slug/`. + `public/archive/threads/h/slug/index.html` with rel_base `/` + becomes `/archive/threads/h/slug/`. """ rel = html_path.relative_to(public).as_posix() if rel.endswith("/index.html"): diff --git a/publish/quartz-patches/test_apply.py b/publish/quartz-patches/test_apply.py index 140f4d8..188e399 100644 --- a/publish/quartz-patches/test_apply.py +++ b/publish/quartz-patches/test_apply.py @@ -14,7 +14,8 @@ DEEP_SLUG: str = ( "archive/threads/notimothylottes/2025-02-04-gelatinous-pixel-soup/index.html" ) PAGE_BASE: str = ( - "/Threadwell/archive/threads/notimothylottes/2025-02-04-gelatinous-pixel-soup/" + f"{apply.REL_BASE.rstrip('/')}/archive/threads/" + "notimothylottes/2025-02-04-gelatinous-pixel-soup/" ) SAMPLE: str = ( "" @@ -57,24 +58,24 @@ class ApplyBaseTests(unittest.TestCase): match = re.search(r'', text) self.assertIsNotNone(match) assert match is not None - resolved = urljoin("https://edsabode.dev" + match.group(1), DEEP_REL) + resolved = urljoin(urljoin(apply.ABS_BASE, match.group(1)), DEEP_REL) self.assertEqual( resolved, - "https://edsabode.dev/Threadwell/archive/threads/notimothylottes/", + urljoin(apply.ABS_BASE, "archive/threads/notimothylottes/"), ) def test_homepage_base_is_site_path(self) -> None: path = _write_public(self.public, "index.html", SAMPLE) apply.rewrite_html(path) text = path.read_text(encoding="utf-8") - self.assertIn('', text) + self.assertIn(f'', text) def test_title_link_is_site_path_not_domain_root(self) -> None: path = _write_public(self.public, DEEP_SLUG, SAMPLE) apply.rewrite_html(path) text = path.read_text(encoding="utf-8") self.assertIn( - '

', + f'

', text, ) self.assertNotIn('href="https://edsabode.dev/Threadwell/"', text) diff --git a/publish/quartz.config.yaml b/publish/quartz.config.yaml index 242ae6d..450f2a3 100644 --- a/publish/quartz.config.yaml +++ b/publish/quartz.config.yaml @@ -6,9 +6,8 @@ configuration: enablePopovers: true analytics: null locale: en-US - # Site is served at /Threadwell/ (project Pages + custom domain). - # Without the path, ./archive/ from /Threadwell (no slash) becomes /archive/. - baseUrl: edsabode.dev/Threadwell/ + # Site is served at the host root (project Pages custom domain). + baseUrl: threadwell.edsabode.dev ignorePatterns: - site - .github