Adding handling which checks if the current entity (the catalog entity being loaded) has an annotation for an external entity's TechDocs. If it does then we will redirect there rather than allowing a 404 (mic drop). This helps keep older URLs routing to the updated locations.

Adding changesets.
Adding test coverage for external TechDocs entitiy redirect.

Signed-off-by: Owen Shartle <timeloveinvent+github@gmail.com>
This commit is contained in:
Owen Shartle
2025-08-25 15:39:29 -04:00
parent dae9dd1af0
commit a0b604cb6a
11 changed files with 255 additions and 20 deletions
+4
View File
@@ -57,3 +57,7 @@ your `mkdocs.yml` files per
If the host name of your source code hosting URL does not include `github` or
`gitlab`, an `integrations` entry in your `app-config.yaml` pointed at your
source code provider is also needed (only the `host` key is necessary).
#### What happens when you navigate to a TechDocs URL for an entity uses the `backstage.io/techdocs-entity` annotation?
If you navigate to a TechDocs URL in the format `docs/{namespace}/{kind}/{name}` for an entity that has the `backstage.io/techdocs-entity` annotation (instead of the `backstage.io/techdocs-ref` annotation), then Backstage will redirect to the TechDocs page of the entity referenced in the value of that annotation.