Skip to content

fix(docs): make VitePress base path configurable for deploys#180

Merged
PatrickRitchie merged 2 commits into
TrakHound:masterfrom
ottobolyos:fix/docs-base-path
Jun 1, 2026
Merged

fix(docs): make VitePress base path configurable for deploys#180
PatrickRitchie merged 2 commits into
TrakHound:masterfrom
ottobolyos:fix/docs-base-path

Conversation

@ottobolyos

@ottobolyos ottobolyos commented May 31, 2026

Copy link
Copy Markdown
Contributor

Summary

Sets the VitePress base from a DOCS_BASE environment variable (defaulting to /), wires the docs workflow to pass DOCS_BASE: /MTConnect.NET/ at build time, and adds a contributor-facing page that documents the docs-site build and the new variable. Fixes the rendering issue on https://trakhound.github.io/MTConnect.NET/ where the deployed page loaded without CSS or JavaScript because asset URLs were absolute-from-domain-root (/assets/...) instead of project-prefixed (/MTConnect.NET/assets/...).

  • docs/.vitepress/config.ts: replace the commented-out base line with base: process.env.DOCS_BASE ?? '/'. Local vitepress dev and vitepress build keep the bare-root behavior when DOCS_BASE is unset; CI and other deployment targets opt in by setting the variable.
  • .github/workflows/docs.yml: pass DOCS_BASE: /MTConnect.NET/ on the VitePress build step so the GitHub Pages deploy receives correctly-prefixed asset URLs.
  • docs/development/docs-site.md: new contributor-facing page covering local dev, the production build, the DOCS_BASE environment variable (with a four-row table mapping deploy URLs to base values), how CI sets the base, and the diagnostic symptoms of a base mismatch. Wired into the /development/ sidebar in docs/.vitepress/config.ts.

@ottobolyos ottobolyos marked this pull request as ready for review May 31, 2026 20:46
@ottobolyos ottobolyos marked this pull request as draft May 31, 2026 20:53
@PatrickRitchie PatrickRitchie moved this from In Progress to Reviewing in MTConnect.NET-Development May 31, 2026
@PatrickRitchie PatrickRitchie moved this from Reviewing to In Progress in MTConnect.NET-Development May 31, 2026
@ottobolyos ottobolyos marked this pull request as ready for review June 1, 2026 04:35
@PatrickRitchie PatrickRitchie moved this from In Progress to Reviewing in MTConnect.NET-Development Jun 1, 2026
@PatrickRitchie PatrickRitchie merged commit 69f4f4e into TrakHound:master Jun 1, 2026
5 checks passed
@github-project-automation github-project-automation Bot moved this from Reviewing to Done in MTConnect.NET-Development Jun 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Development

Successfully merging this pull request may close these issues.

2 participants