From 8f346cb57f37d7c836fde6f5c1ad639e8823c165 Mon Sep 17 00:00:00 2001 From: Roger-luo Date: Wed, 24 Jun 2026 11:36:08 -0400 Subject: [PATCH] fix(docs): repair Pages URLs/base for public project page MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The repo was open-sourced, moving GitHub Pages from the private random subdomain (served at root) to the public project page `https://queracomputing.github.io/ppvm/` (served under `/ppvm/`). The docs config still assumed the old root-served subdomain, so: - the README "Docs" badge + prose link 404'd (dead subdomain), and the badge image used malformed shields syntax (`docs-6437FF` rendered as a text badge, not a coloured pill); - the live docs page was unstyled/un-navigable — assets and nav links were emitted as `/_astro/…` and `/quickstart` (base `/`) instead of `/ppvm/…`, all 404 under the project page. Fixes: - README: point Docs badge + doc link at queracomputing.github.io/ppvm/, fix badge syntax to `docs-online-6437FF`, and collapse the two broken CI badges (rust-ci.yml / python-ci.yml don't exist) into one accurate `ci.yml` badge. - astro.config.mjs: default `site` → https://queracomputing.github.io and update the deploy-target comment block. - docs.yml: build with PPVM_BASE=/ppvm/ on main and /ppvm/pr-preview/pr- on PRs, PPVM_SITE → queracomputing.github.io. Templates already derive links from `import.meta.env.BASE_URL`, so the correct build-time base repairs every asset and nav link. Co-Authored-By: Claude Opus 4.8 (1M context) --- .github/workflows/docs.yml | 14 +++++++++----- README.md | 7 +++---- docs/astro.config.mjs | 14 +++++++------- 3 files changed, 19 insertions(+), 16 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index b6eb280e5..fa648283f 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -2,10 +2,14 @@ name: Docs # Deploy the Astro docs site at `docs/` to GitHub Pages. # +# The repo is public, so Pages serves from the project page +# `https://queracomputing.github.io/ppvm/` — every build is based under +# `/ppvm/` (gh-pages branch root maps to the `/ppvm/` URL prefix). +# # Behaviour: -# - Push to `main` → build with PPVM_BASE=/ and publish +# - Push to `main` → build with PPVM_BASE=/ppvm/ and publish # to the gh-pages branch root. -# - Pull request (opened / → build with PPVM_BASE=/pr-preview/pr- +# - Pull request (opened / → build with PPVM_BASE=/ppvm/pr-preview/pr- # synchronize / reopened) and let rossjrw/pr-preview-action publish # the build to gh-pages under # `pr-preview/pr-/`. Triggered only when @@ -106,9 +110,9 @@ jobs: id: compute-base run: | if [[ "${{ github.event_name }}" == "pull_request" ]]; then - echo "base=/pr-preview/pr-${{ github.event.pull_request.number }}" >> "$GITHUB_OUTPUT" + echo "base=/ppvm/pr-preview/pr-${{ github.event.pull_request.number }}" >> "$GITHUB_OUTPUT" else - echo "base=/" >> "$GITHUB_OUTPUT" + echo "base=/ppvm/" >> "$GITHUB_OUTPUT" fi - name: Compute git ref for source links @@ -132,7 +136,7 @@ jobs: # hatches a developer would use locally. working-directory: docs env: - PPVM_SITE: https://congenial-bassoon-l436wp3.pages.github.io + PPVM_SITE: https://queracomputing.github.io PPVM_BASE: ${{ steps.compute-base.outputs.base }} PPVM_GIT_REF: ${{ steps.compute-ref.outputs.ref }} RUSTFLAGS: "-C target-feature=+aes,+sse2" diff --git a/README.md b/README.md index 80f821a46..35efed931 100644 --- a/README.md +++ b/README.md @@ -2,9 +2,8 @@ A fast quantum circuit simulator written in Rust, with Python bindings. -[![Docs](https://img.shields.io/badge/docs-6437FF)](https://congenial-bassoon-l436wp3.pages.github.io/) -[![CI - rust](https://github.com/QuEraComputing/ppvm/actions/workflows/rust-ci.yml/badge.svg)](https://github.com/QuEraComputing/ppvm/actions/workflows/rust-ci.yml) -[![CI - python](https://github.com/QuEraComputing/ppvm/actions/workflows/python-ci.yml/badge.svg)](https://github.com/QuEraComputing/ppvm/actions/workflows/python-ci.yml) +[![Docs](https://img.shields.io/badge/docs-online-6437FF)](https://queracomputing.github.io/ppvm/) +[![CI](https://github.com/QuEraComputing/ppvm/actions/workflows/ci.yml/badge.svg)](https://github.com/QuEraComputing/ppvm/actions/workflows/ci.yml) [![License](https://img.shields.io/badge/license-Apache--2.0-blue.svg)](LICENSE) ## Install @@ -52,7 +51,7 @@ r0, r1 = tab.measure(0), tab.measure(1) print(f"Qubit 0: {r0}, Qubit 1: {r1}") # always correlated ``` -See the [documentation](https://congenial-bassoon-l436wp3.pages.github.io/) for the Rust API, Stim integration, and symbolic propagation. +See the [documentation](https://queracomputing.github.io/ppvm/) for the Rust API, Stim integration, and symbolic propagation. ## License & contributing diff --git a/docs/astro.config.mjs b/docs/astro.config.mjs index 30d573e59..3b913ea47 100644 --- a/docs/astro.config.mjs +++ b/docs/astro.config.mjs @@ -1,13 +1,13 @@ import { defineConfig } from "astro/config"; // `site` + `base` are read from env in CI so the same astro config powers -// three deploy targets: -// · local dev: PPVM_SITE=http://localhost:4321 PPVM_BASE=/ -// · main → gh-pages: PPVM_SITE=https://congenial-bassoon-l436wp3.pages.github.io PPVM_BASE=/ -// · PR preview deploy: PPVM_SITE=https://congenial-bassoon-l436wp3.pages.github.io PPVM_BASE=/pr-preview/pr- -const site = - process.env.PPVM_SITE ?? - "https://congenial-bassoon-l436wp3.pages.github.io"; +// three deploy targets. The repo is public, so Pages serves from the +// `queracomputing.github.io/ppvm/` project page — every deploy except +// local dev is therefore based under `/ppvm/`: +// · local dev: PPVM_SITE=http://localhost:4321 PPVM_BASE=/ +// · main → gh-pages: PPVM_SITE=https://queracomputing.github.io PPVM_BASE=/ppvm/ +// · PR preview deploy: PPVM_SITE=https://queracomputing.github.io PPVM_BASE=/ppvm/pr-preview/pr- +const site = process.env.PPVM_SITE ?? "https://queracomputing.github.io"; const base = process.env.PPVM_BASE ?? "/"; export default defineConfig({