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
+2 -2
View File
@@ -64,7 +64,7 @@ export function getEntityRootTechDocsPath(entity: Entity): string {
/**
* Build the TechDocs URL for the given entity. This helper should be used anywhere there
* is a link to an entities TechDocs.
* is a link to an entity's TechDocs.
*
* @public
*/
@@ -104,7 +104,7 @@ export const buildTechDocsURL = (
});
// Add on the external entity path to the url if one exists. This allows deep linking into another
// entities TechDocs.
// entity's TechDocs.
const path = getEntityRootTechDocsPath(entity);
return `${url}${path}`;