From 2bf08f673e916b897db31bb33a6d713f4e8361e7 Mon Sep 17 00:00:00 2001 From: Paul Eichler Date: Wed, 21 Jan 2026 13:54:54 +0100 Subject: [PATCH 1/2] fix: sitemap.xml no longer on localhost add: display GitHub Repo (and edit button) on TACO webpage This commit fixes the sitemap.xml by replacing the occurences of localhost with the actual URL. This must be conducted with an extra bash script, as there does not seem to be a myst configuration option. Additionally, it adds the GitHub repo URL to the myst configuration, such that the edit button and the GitHub link should now be working. --- .github/workflows/static.yml | 3 ++- CHANGELOG.md | 4 ++++ docs/myst.yml | 23 +++++++++++++++++++++++ scripts/replace-urls.sh | 33 +++++++++++++++++++++++++++++++++ 4 files changed, 62 insertions(+), 1 deletion(-) create mode 100755 scripts/replace-urls.sh diff --git a/.github/workflows/static.yml b/.github/workflows/static.yml index 1b908f8..dbc3e8f 100644 --- a/.github/workflows/static.yml +++ b/.github/workflows/static.yml @@ -44,7 +44,8 @@ jobs: cargo +${RUST_VERSION} install --locked cargo-about - name: Generate Docs run: | - cd ./docs && myst build --html && cd ../ + cd ./docs && myst build --html --ci --port 3042 && cd ../ + export URL="https://taco-mc.dev" && ./scripts/replace-urls.sh mkdir -p ./public && mv ./docs/_build/html/* ./public/ cargo doc --no-deps --document-private-items --workspace mkdir -p ./public/dev-docs && mv ./target/doc/* ./public/dev-docs/ diff --git a/CHANGELOG.md b/CHANGELOG.md index 95734e3..6d09972 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,10 @@ ## [Unreleased] +### Fixed + +- replaced `localhost` reference in `sitemap.xml` and `robots.txt` (#1) + ## [v0.1.0] ### Added diff --git a/docs/myst.yml b/docs/myst.yml index df8143b..f97bdcb 100644 --- a/docs/myst.yml +++ b/docs/myst.yml @@ -27,6 +27,8 @@ project: license: code: "Apache-2.0" content: "CC-BY-4.0" + github: "https://github.com/cispa/TACO" + source_url: "https://github.com/cispa/TACO/tree/main/docs" bibliography: ./references.bib copyright: "2026 - The TACO contributors" abbreviations: @@ -52,6 +54,27 @@ project: - file: ./usage-cli/tla-specification.md - file: ./usage-cli/advanced-configuration.md - file: dev-docs.md + children: + - url: https://taco-mc.dev/dev-docs/taco_interval_ta/index.html + title: taco-interval-ta + - url: https://taco-mc.dev/dev-docs/taco_threshold_automaton/index.html + title: taco-threshold-automaton + - url: https://taco-mc.dev/dev-docs/taco_model_checker/index.html + title: taco-model-checker + - url: https://taco-mc.dev/dev-docs/taco_smt_model_checker/index.html + title: taco-smt-model-checker + - url: https://taco-mc.dev/dev-docs/taco_zcs_model_checker/index.html + title: taco-zcs-model-checker + - url: https://taco-mc.dev/dev-docs/taco_zcs_model_checker/index.html + title: taco-zcs-model-checker + - url: https://taco-mc.dev/dev-docs/taco_bdd/index.html + title: taco-bdd + - url: https://taco-mc.dev/dev-docs/taco_cli/index.html + title: taco-cli + - url: https://taco-mc.dev/dev-docs/taco_display_utils/index.html + title: taco-display-utils + - url: https://taco-mc.dev/dev-docs/taco_smt_encoder/index.html + title: taco-smt-encoder - file: about.md plugins: - ./resources/tla-highlighter.mjs diff --git a/scripts/replace-urls.sh b/scripts/replace-urls.sh new file mode 100755 index 0000000..f4b0acf --- /dev/null +++ b/scripts/replace-urls.sh @@ -0,0 +1,33 @@ +#!/bin/bash +# Replaces occurrences of http://localhost:3042 with the value of the URL +# environment variable in the _build folder. This is necessary for sitemap.xml +# and robots.txt to be valid when the site is generated in the CI and deployed +# via GitHub actions. + +if [ -z "$URL" ]; then + echo "Error: URL environment variable is not set." + echo "Usage: URL=\"https://your-domain.com\" $0" + exit 1 +fi + +# Determine target directory +TARGET_DIR="" +if [ -d "docs/_build" ]; then + TARGET_DIR="docs/_build" +elif [ -d "_build" ]; then + TARGET_DIR="_build" +else + echo "Error: Could not find 'docs/_build' or '_build' directory." + exit 1 +fi + +echo "Target directory: $TARGET_DIR" +echo "Replacing 'http://localhost:3042' with '$URL'..." + +# Find files containing the string and replace them +# grep -r: recursive +# grep -l: print filename only +# xargs -r: do not run if no input +grep -rl "http://localhost:3042" "$TARGET_DIR" | xargs -r sed -i "s|http://localhost:3042|$URL|g" + +echo "Done." From b2428f6af3c2d258eb7023ae05a71348ed48a0c7 Mon Sep 17 00:00:00 2001 From: Paul Eichler Date: Wed, 21 Jan 2026 14:26:34 +0100 Subject: [PATCH 2/2] fixup! fix: sitemap.xml no longer on localhost add: display GitHub Repo (and edit button) on TACO webpage --- docs/myst.yml | 4 ++-- scripts/replace-urls.sh | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/docs/myst.yml b/docs/myst.yml index f97bdcb..c81a4b7 100644 --- a/docs/myst.yml +++ b/docs/myst.yml @@ -65,8 +65,8 @@ project: title: taco-smt-model-checker - url: https://taco-mc.dev/dev-docs/taco_zcs_model_checker/index.html title: taco-zcs-model-checker - - url: https://taco-mc.dev/dev-docs/taco_zcs_model_checker/index.html - title: taco-zcs-model-checker + - url: https://taco-mc.dev/dev-docs/taco_acs_model_checker/index.html + title: taco-acs-model-checker - url: https://taco-mc.dev/dev-docs/taco_bdd/index.html title: taco-bdd - url: https://taco-mc.dev/dev-docs/taco_cli/index.html diff --git a/scripts/replace-urls.sh b/scripts/replace-urls.sh index f4b0acf..562cf4d 100755 --- a/scripts/replace-urls.sh +++ b/scripts/replace-urls.sh @@ -4,6 +4,9 @@ # and robots.txt to be valid when the site is generated in the CI and deployed # via GitHub actions. +# Strict mode with error reporting +set -euo pipefail + if [ -z "$URL" ]; then echo "Error: URL environment variable is not set." echo "Usage: URL=\"https://your-domain.com\" $0"