feat: serve TechDocs from GitHub Pages via custom publisher#986
Draft
feat: serve TechDocs from GitHub Pages via custom publisher#986
Conversation
- Add plugins/techdocs-backend-module-ghpages with GithubPagesPublisher implementing PublisherBase; proxies docs from GitHub Pages, no-op publish - Register publisher via techdocsPublisherExtensionPoint in backend module - Wire module into packages/backend - Switch app-config.yaml to builder: external, publisher: githubPages - Add docs/techdocs.md describing CI workflow repos must follow - 11 unit tests, all passing; lint and build clean Co-authored-by: hairmare <116588+hairmare@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Update Backstage to use GitHub Pages hosted TechDocs
feat: serve TechDocs from GitHub Pages via custom publisher
Mar 4, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Backstage was building and rendering TechDocs locally while the same docs were already pre-built and hosted on GitHub Pages. This switches Backstage to read directly from GitHub Pages, eliminating redundant local builds while preserving search indexing.
New plugin:
techdocs-backend-module-ghpagesImplements
PublisherBasefrom@backstage/plugin-techdocs-nodeas a GitHub Pages proxy:docsRouter()— maps/namespace/kind/name/…→baseUrl/name/…, streams responsefetchTechDocsMetadata()— fetchestechdocs_metadata.jsonfrombaseUrl/name/hasDocsBeenGenerated()— HEAD-checksbaseUrl/name/index.htmlpublish()— intentional no-op; builds happen in repo CIRegistered via
techdocsPublisherExtensionPointunder the custom key'githubPages'.Config change
Search indexing continues to work: the TechDocs collator reads through the same publisher.
What each repo needs to do
Documented in
docs/techdocs.mdandplugins/techdocs-backend-module-ghpages/README.md. In short: build withtechdocs-cli generate(which producestechdocs_metadata.jsonalongside the HTML) and deploy the entire./siteoutput togh-pages. The metadata file must be present at the root of the GitHub Pages site or Backstage cannot display the docs.Entity
metadata.namemust match the GitHub repository name (lower-case) since the publisher maps entity name directly to the GitHub Pages path segment.💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.