docs(nxdev): improve related documentation link matcher (#13982)
This commit is contained in:
parent
02983d45e8
commit
e5108b84df
@ -1333,7 +1333,7 @@
|
||||
},
|
||||
{
|
||||
"name": "Nx Devkit",
|
||||
"path": "/packages#devkit",
|
||||
"path": "/packages/devkit/index",
|
||||
"id": "packages-devkit",
|
||||
"isExternal": true,
|
||||
"children": [],
|
||||
@ -1400,7 +1400,7 @@
|
||||
},
|
||||
{
|
||||
"name": "Nx Devkit",
|
||||
"path": "/packages#devkit",
|
||||
"path": "/packages/devkit/index",
|
||||
"id": "packages-devkit",
|
||||
"isExternal": true,
|
||||
"children": [],
|
||||
@ -1543,7 +1543,7 @@
|
||||
},
|
||||
{
|
||||
"name": "--skip-nx-cache flag",
|
||||
"path": "/nx/affected#skip-nx-cache",
|
||||
"path": "/packages/nx/documents/affected#skip-nx-cache",
|
||||
"id": "skip-nx-cache-flag",
|
||||
"isExternal": true,
|
||||
"children": [],
|
||||
@ -1602,7 +1602,7 @@
|
||||
},
|
||||
{
|
||||
"name": "--skip-nx-cache flag",
|
||||
"path": "/nx/affected#skip-nx-cache",
|
||||
"path": "/packages/nx/documents/affected#skip-nx-cache",
|
||||
"id": "skip-nx-cache-flag",
|
||||
"isExternal": true,
|
||||
"children": [],
|
||||
|
||||
@ -1663,7 +1663,7 @@
|
||||
"file": "",
|
||||
"itemList": [],
|
||||
"isExternal": true,
|
||||
"path": "/packages#devkit",
|
||||
"path": "/packages/devkit/index",
|
||||
"tags": ["create-your-own-plugin"]
|
||||
},
|
||||
{
|
||||
@ -1741,14 +1741,14 @@
|
||||
"path": "/packages",
|
||||
"tags": []
|
||||
},
|
||||
"/packages#devkit": {
|
||||
"/packages/devkit/index": {
|
||||
"id": "packages-devkit",
|
||||
"name": "Nx Devkit",
|
||||
"description": "",
|
||||
"file": "",
|
||||
"itemList": [],
|
||||
"isExternal": true,
|
||||
"path": "/packages#devkit",
|
||||
"path": "/packages/devkit/index",
|
||||
"tags": ["create-your-own-plugin"]
|
||||
},
|
||||
"/reference/glossary": {
|
||||
@ -1925,7 +1925,7 @@
|
||||
"file": "",
|
||||
"itemList": [],
|
||||
"isExternal": true,
|
||||
"path": "/nx/affected#skip-nx-cache",
|
||||
"path": "/packages/nx/documents/affected#skip-nx-cache",
|
||||
"tags": ["cache-task-results"]
|
||||
},
|
||||
{
|
||||
@ -1993,14 +1993,14 @@
|
||||
"path": "/nx-cloud/intro/what-is-nx-cloud",
|
||||
"tags": ["cache-task-results", "distribute-task-execution"]
|
||||
},
|
||||
"/nx/affected#skip-nx-cache": {
|
||||
"/packages/nx/documents/affected#skip-nx-cache": {
|
||||
"id": "skip-nx-cache-flag",
|
||||
"name": "--skip-nx-cache flag",
|
||||
"description": "",
|
||||
"file": "",
|
||||
"itemList": [],
|
||||
"isExternal": true,
|
||||
"path": "/nx/affected#skip-nx-cache",
|
||||
"path": "/packages/nx/documents/affected#skip-nx-cache",
|
||||
"tags": ["cache-task-results"]
|
||||
},
|
||||
"/reference/nx-json#tasks-runner-options": {
|
||||
|
||||
@ -91,7 +91,7 @@
|
||||
"file": "",
|
||||
"id": "skip-nx-cache-flag",
|
||||
"name": "--skip-nx-cache flag",
|
||||
"path": "/nx/affected#skip-nx-cache"
|
||||
"path": "/packages/nx/documents/affected#skip-nx-cache"
|
||||
},
|
||||
{
|
||||
"description": "",
|
||||
@ -620,7 +620,7 @@
|
||||
"file": "",
|
||||
"id": "packages-devkit",
|
||||
"name": "Nx Devkit",
|
||||
"path": "/packages#devkit"
|
||||
"path": "/packages/devkit/index"
|
||||
},
|
||||
{
|
||||
"description": "",
|
||||
|
||||
@ -539,7 +539,7 @@
|
||||
"id": "packages-devkit",
|
||||
"tags": ["create-your-own-plugin"],
|
||||
"file": "",
|
||||
"path": "/packages#devkit",
|
||||
"path": "/packages/devkit/index",
|
||||
"isExternal": true
|
||||
},
|
||||
{
|
||||
@ -613,7 +613,7 @@
|
||||
"id": "skip-nx-cache-flag",
|
||||
"file": "",
|
||||
"tags": ["cache-task-results"],
|
||||
"path": "/nx/affected#skip-nx-cache",
|
||||
"path": "/packages/nx/documents/affected#skip-nx-cache",
|
||||
"isExternal": true
|
||||
},
|
||||
{
|
||||
|
||||
@ -2,10 +2,14 @@ import { RelatedDocument } from './documents.models';
|
||||
|
||||
interface RelatedDocumentsCategory {
|
||||
id: string;
|
||||
name: string;
|
||||
/**
|
||||
* Matcher that will be evaluated against a path.
|
||||
*/
|
||||
matchers: string[];
|
||||
name: string;
|
||||
relatedDocuments: RelatedDocument[];
|
||||
}
|
||||
|
||||
export function categorizeRelatedDocuments(
|
||||
items: RelatedDocument[]
|
||||
): RelatedDocumentsCategory[] {
|
||||
@ -13,25 +17,25 @@ export function categorizeRelatedDocuments(
|
||||
{
|
||||
id: 'concepts',
|
||||
name: 'Concepts',
|
||||
matchers: ['concepts', 'more-concepts'],
|
||||
matchers: ['/concepts/', '/more-concepts/'],
|
||||
relatedDocuments: [],
|
||||
},
|
||||
{
|
||||
id: 'recipes',
|
||||
name: 'Recipes',
|
||||
matchers: ['recipes'],
|
||||
matchers: ['/recipes/'],
|
||||
relatedDocuments: [],
|
||||
},
|
||||
{
|
||||
id: 'reference',
|
||||
name: 'Reference',
|
||||
matchers: ['nx', 'workspace'],
|
||||
matchers: ['/workspace/', '/packages/'],
|
||||
relatedDocuments: [],
|
||||
},
|
||||
{
|
||||
id: 'see-also',
|
||||
name: 'See also',
|
||||
matchers: ['see-also'],
|
||||
matchers: ['/see-also/'],
|
||||
relatedDocuments: [],
|
||||
},
|
||||
];
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user