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',
|
||||
name: 'Recipes',
|
||||
matchers: ['/recipes/'],
|
||||
name: 'Guides',
|
||||
matchers: ['/recipes/', '/guides/'],
|
||||
relatedDocuments: [],
|
||||
},
|
||||
{
|
||||
id: '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: [],
|
||||
},
|
||||
{
|
||||
|
||||
@ -288,6 +288,9 @@ export const getStaticProps: GetStaticProps = async ({
|
||||
githubStarsCount: await fetchGithubStarCount(),
|
||||
},
|
||||
menu,
|
||||
relatedDocuments: tagsApi
|
||||
.getAssociatedItemsFromTags(document.tags)
|
||||
.filter((item) => item.path !== '/' + params.segments.join('/')), // Remove currently displayed item
|
||||
},
|
||||
};
|
||||
} catch (e) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user