Skip to content

Commit 74d682a

Browse files
Render overview on route pages (#597)
1 parent 2591236 commit 74d682a

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
}
9292

9393
file.title = metadata.title
94+
file.overview = metadata.overview
9495
file.path = route.path
9596

9697
const eventsByRoutePath = groupEventsByRoutePath(blueprint.events)

0 commit comments

Comments
 (0)