diff --git a/ADMIN_TASKS.md b/ADMIN_TASKS.md index 7e9ba2cc04..9caff3004c 100644 --- a/ADMIN_TASKS.md +++ b/ADMIN_TASKS.md @@ -133,3 +133,13 @@ $ dot dot/trpl04-01.dot -Tsvg > src/img/trpl04-01.svg In the generated SVG, remove the width and the height attributes from the `svg` element and set the `viewBox` attribute to `0.00 0.00 1000.00 1000.00` or other values that don't cut off the image. + +## Publish a preview to GitHub Pages + +We sometimes publish to GitHub Pages for in-progress previews. The recommended +flow for publishing is: + +- Install the `ghp-import` tool by running `pip install ghp-import` (or `pipx install ghp-import`, using [pipx][pipx]). +- In the root, run `tools/generate-preview.sh` + +[pipx]: https://pipx.pypa.io/stable/#install-pipx diff --git a/tools/generate-preview.sh b/tools/generate-preview.sh new file mode 100755 index 0000000000..c2b0f2f1da --- /dev/null +++ b/tools/generate-preview.sh @@ -0,0 +1,4 @@ +#!/usr/bin/env bash + +mdbook build +cp ./tools/preview-robots.txt ./book/robots.txt diff --git a/tools/preview-robots.txt b/tools/preview-robots.txt new file mode 100644 index 0000000000..1f53798bb4 --- /dev/null +++ b/tools/preview-robots.txt @@ -0,0 +1,2 @@ +User-agent: * +Disallow: /