Skip to content

Commit 478ff78

Browse files
Render overview on route pages
1 parent 8ebbe83 commit 478ff78

2 files changed

Lines changed: 6 additions & 1 deletion

File tree

src/layouts/api-route.hbs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
# {{title}}
2+
{{#if overview}}
3+
4+
{{overview}}
5+
{{/if}}
26

37
{{#each resources}}
48
{{> api-resource }}

src/lib/layout/api-route.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ import type { PathMetadata } from 'lib/path-metadata.js'
1717

1818
export interface ApiRouteLayoutContext {
1919
title: string
20-
description: string
20+
overview: string | undefined
2121
path: string
2222
resources: Array<
2323
ApiRouteResource & {
@@ -91,6 +91,7 @@ export function setApiRouteLayoutContext(
9191
throw new Error(`Missing path metadata for ${route.path}`)
9292
}
9393
file.title = metadata.title
94+
file.overview = metadata.overview
9495
file.path = route.path
9596
file.endpoints = route.endpoints
9697
.filter(

0 commit comments

Comments
 (0)