Skip to content

Commit 6da3fdb

Browse files
committed
Add "guide" to See Also section
1 parent e7f1180 commit 6da3fdb

2 files changed

Lines changed: 9 additions & 1 deletion

File tree

web/src/pages/guides/PHP-SDK.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ Visit the [releases page on GitHub](https://github.com/multitheftauto/mtasa-php-
8383

8484
<SeeAlsoSection seeAlsoLinks={getSeeAlsoLinksFromList([
8585
'reference:Resource_Web_Access',
86-
'reference:CEF-tutorial',
86+
'guide:CEF-introduction',
8787
])} currentId='' />
8888

8989
</AutoStarlightPage>

web/src/utils/general.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,13 @@ export function getSeeAlsoLinksFromList(seeAlsoList: string[]): SeeAlsoLinkGroup
129129
groupedMap.get(title)!.push({ name: refPage, link: `/reference/${refPage}` });
130130
continue;
131131
}
132+
if (type === 'guide') {
133+
const name = rest[0];
134+
const title = 'Guide';
135+
if (!groupedMap.has(title)) groupedMap.set(title, []);
136+
groupedMap.get(title)!.push({ name: name, link: `/guides/${name}` });
137+
continue;
138+
}
132139
if (type === 'external') {
133140
const title = rest[0];
134141
const httpprefix = rest[1];
@@ -176,6 +183,7 @@ export function getSeeAlsoLinksFromList(seeAlsoList: string[]): SeeAlsoLinkGroup
176183
if (!type || rest.length === 0) return null;
177184
if (type === 'article') return 'Articles';
178185
if (type === 'reference') return 'Reference';
186+
if (type === 'guide') return 'Guide';
179187
if (type === 'external') return 'Links';
180188
return makeTitle(rest[0], rest[1], type);
181189
})

0 commit comments

Comments
 (0)