docs(nx-dev): fix issue with related docs not loading (#31605)
make sure new paths work for related docs resolution include related docs for 'legacy' fallback page logic ## before: on the `/features/manage-releases` route  on the `/ci/features/affected` route  ## after: on the `/features/manage-releases` route  on the `/ci/features/affected` route  rename recipes to guides for the related docs card 
This commit is contained in:
parent
87234da015
commit
b97222ded4
@ -26,14 +26,15 @@ export function categorizeRelatedDocuments(
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 'recipes',
|
id: 'recipes',
|
||||||
name: 'Recipes',
|
name: 'Guides',
|
||||||
matchers: ['/recipes/'],
|
matchers: ['/recipes/', '/guides/'],
|
||||||
relatedDocuments: [],
|
relatedDocuments: [],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 'reference',
|
id: 'reference',
|
||||||
name: 'Reference',
|
name: 'Reference',
|
||||||
matchers: ['/workspace/', '/nx-api/'],
|
// TODO(caleb): including /technologies/ in the route will duplicate the display of `recipes/guides` so leaving off for now
|
||||||
|
matchers: ['/workspace/', '/nx-api/', '/core-api/'],
|
||||||
relatedDocuments: [],
|
relatedDocuments: [],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
@ -288,6 +288,9 @@ export const getStaticProps: GetStaticProps = async ({
|
|||||||
githubStarsCount: await fetchGithubStarCount(),
|
githubStarsCount: await fetchGithubStarCount(),
|
||||||
},
|
},
|
||||||
menu,
|
menu,
|
||||||
|
relatedDocuments: tagsApi
|
||||||
|
.getAssociatedItemsFromTags(document.tags)
|
||||||
|
.filter((item) => item.path !== '/' + params.segments.join('/')), // Remove currently displayed item
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user