mirror of
https://github.com/rust-lang/book.git
synced 2026-12-01 02:11:22 -06:00
infra: add robots.txt for GH Pages previews
Block *everything*. We do not want any of this to be indexed, because we *only* use it for previews, and do not want its content to be cached or (especially!) surfaced to readers, since it may have a variety of issues ranging from pedagogical missteps to outright errors!
This commit is contained in:
@@ -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
|
||||
|
||||
Executable
+4
@@ -0,0 +1,4 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
mdbook build
|
||||
cp ./tools/preview-robots.txt ./book/robots.txt
|
||||
@@ -0,0 +1,2 @@
|
||||
User-agent: *
|
||||
Disallow: /
|
||||
Reference in New Issue
Block a user