fix(build): drop the _site_site workaround that mdPress 0.8.1 made obsolete

The build script anticipated an older mdPress behaviour where a shared
--output made the site land in a sibling directory, then moved it back:

  mdpress build --format site --output _site && rm -rf _site && mv _site_site _site

mdPress 0.8.1 writes straight into --output, so the sibling never appears and
the mv aborts the step:

  ✓ Generated site  → .../docker_practice/_site/index.html
  mv: cannot stat '_site_site': No such file or directory

Caught by a smoke test after 0.8.1 shipped, before any content push fanned it
out — this repo is the only one with a live copy of the workaround (the three
matches in other repos are inside gitignored _book/ build artifacts).

The site itself built fine; only the post-processing dance failed.
This commit is contained in:
yeasy
2026-07-23 17:14:19 -07:00
parent f8691a8868
commit b7d4410cf0
+1 -1
View File
@@ -9,7 +9,7 @@
"scripts": {
"test": "node scripts/check_metadata.js && python3 -m unittest tools.test_prepare_pdf_sources && python3 -m unittest discover -s tests -p 'test_*.py' && python3 tools/test_examples.py",
"mdpress:help": "mdpress --help",
"build": "rm -rf _site _site_site && mdpress build --format site --output _site && rm -rf _site && mv _site_site _site",
"build": "rm -rf _site && mdpress build --format site --output _site",
"serve": "mdpress serve",
"start": "mdpress serve",
"pdf": "rm -rf /tmp/docker_practice-pdf-src && python3 tools/prepare_pdf_sources.py --book-dir . --out /tmp/docker_practice-pdf-src && cd /tmp/docker_practice-pdf-src && mdpress build --format pdf --output \"${INIT_CWD:-$PWD}/docker_practice.pdf\""