Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/layouts/api-route.hbs
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
# {{title}}
{{#if overview}}

{{overview}}
{{/if}}

{{#each resources}}
{{> api-resource }}
Expand Down
3 changes: 2 additions & 1 deletion src/lib/layout/api-route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import type { PathMetadata } from 'lib/path-metadata.js'

export interface ApiRouteLayoutContext {
title: string
description: string

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

description wasn't used previously, so it's safe to rename it

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@DebbieAtSeam would we want both a description and overview for route pages?
image

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@razor-x So, I'm not sure that both are being used now, but does it make sense to future-proof and allow for the possibility of both page description and overview?

overview: string | undefined
path: string
resources: Array<
ApiRouteResource & {
Expand Down Expand Up @@ -91,6 +91,7 @@ export function setApiRouteLayoutContext(
throw new Error(`Missing path metadata for ${route.path}`)
}
file.title = metadata.title
file.overview = metadata.overview
file.path = route.path
file.endpoints = route.endpoints
.filter(
Expand Down
Loading