
- TechDocs is a Backstage plugin (backend + frontend) that generates and displays static documentation for catalog entities.
- It typically uses MkDocs (often with the mkdocs-material theme) to render Markdown into a static site that Backstage can serve or publish to object storage.
Backstage backend: enable the TechDocs backend plugin
Open your backend bootstrap (where backend plugins are wired) and confirm TechDocs backend is added. Example:
app-config.yaml. Use environment variables for secrets — never hardcode tokens.
Project repository layout
Place MkDocs config and Markdown documentation alongside your code so documentation is versioned with the project.
Example
package.json (trimmed):
.gitignore (example):
mkdocs.yml (or mkdocs.yaml) at repo root. TechDocs commonly uses mkdocs-material.
docs_dir:
docs/. Example docs/index.md:
mkdocs.yml and the docs/ folder by adding the TechDocs annotation to catalog-info.yaml. Quote the annotation value to avoid YAML parsing issues.
'backstage.io/techdocs-ref': 'dir:.'tells Backstage to readmkdocs.ymlfrom the repository root and use the defaultdocs/folder.- To point to a subfolder, update the
dir:path (for example'dir:docs/subfolder') or setdocs_dirinmkdocs.yml.
techdocs config:
- Backstage fetches the repository referenced by the catalog entity.
- The generator runs MkDocs (inside Docker or locally) to produce a static site.
- The publisher stores the generated site (local storage or cloud object storage) and the frontend serves it when you click “View TechDocs”.
- Push repository changes (include
catalog-info.yaml,mkdocs.yml, anddocs/) to your Git host. - Import or refresh the component in the Backstage catalog.
- Open the component page and click “View TechDocs” (or the Docs tab). Backstage will generate and display the documentation according to your configured builder/generator/publisher.

For production, Backstage recommends generating TechDocs artifacts in CI and publishing the generated static site to cloud storage (Google Cloud Storage or AWS S3) instead of using the local publisher. This improves scalability, reduces on-demand build latency, and allows serving docs from highly-available object storage.
- Never commit secrets or tokens to
app-config.yaml. Use environment variables or secret management. - Prefer CI-based builds and cloud publishers (
googleGcsorawsS3) for production workloads. - Use
mkdocs-materialfor a polished default theme that integrates well with TechDocs. - If using generator
runIn: docker, ensure your backend host can run Docker, or switch to CI-based generation for environments where Docker isn’t available.
- TechDocs integrates MkDocs with Backstage to render component docs inside the catalog.
- Enable the TechDocs backend plugin and configure builder/generator/publisher in
app-config.yaml. - Add
mkdocs.ymland adocs/folder to your repository and annotate the entity with'backstage.io/techdocs-ref'. - For production, build docs in CI and publish to cloud storage for scalability and faster page loads.
- Backstage TechDocs docs: https://backstage.io/docs/features/techdocs/
- MkDocs: https://www.mkdocs.org/
- mkdocs-material theme: https://squidfunk.github.io/mkdocs-material/
- Google Cloud Storage: https://cloud.google.com/storage
- AWS S3: https://aws.amazon.com/s3/