Skip to content

Commit da270ce

Browse files
committed
fix: make TS happy
1 parent 825d363 commit da270ce

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

src/components/pageGrid.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ export function PageGrid({header}: Props) {
2222
}
2323

2424
const children: DocNode[] = parentNode.frontmatter.next_steps?.length
25-
? (parentNode.frontmatter.next_steps as string[])
25+
? parentNode.frontmatter.next_steps
2626
.map(p => nodeForPath(rootNode, path.join(parentNode.path, p)))
2727
.filter(isTruthy) ?? []
2828
: parentNode.children;

src/types/frontmatter.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,16 @@ export interface FrontMatter {
2222
* A list of keywords for indexing with search.
2323
*/
2424
keywords?: string[];
25+
/**
26+
* relative links to use in the "next steps" section of the page grid
27+
* takes precendence over children when present
28+
*/
29+
next_steps?: string[];
2530
/**
2631
* Set this to true to disable indexing (robots, algolia) of this content.
2732
*/
2833
noindex?: boolean;
34+
2935
/**
3036
* Specific guides that this page is not relevant to.
3137
*/
@@ -45,8 +51,8 @@ export interface FrontMatter {
4551
* optional sidebar title
4652
*/
4753
sidebar_title?: string;
48-
4954
sourcePath?: string;
55+
5056
/**
5157
* Specific guides that this page is relevant to.
5258
*/

0 commit comments

Comments
 (0)