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
1 change: 0 additions & 1 deletion app/components/AppHeaderBrand.vue
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ onMounted(() => {
viewBox="0 0 16 16"
width="16"
>
<title>Slash forward icon</title>
<path
clip-rule="evenodd"
d="m4.02 15.4.3-.7 6-14 .29-.68 1.37.59-.3.69-6 14-.29.68z"
Expand Down
9 changes: 7 additions & 2 deletions modules/config/runtime/server/plugins/llms.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,18 @@ function navigationSections(navigation: NavigationItem[]): LLMsSection[] {
return sections
}

/** Every page in the subtree, depth first, linked on its page URL. */
/**
* Every page in the subtree, depth first, linked on its page URL. A directory `index.md` is both the
* section node and its own first child, so a path seen twice is listed once, keeping its description.
*/
function pageLinks(items: NavigationItem[]): NonNullable<LLMsSection['links']> {
const links: NonNullable<LLMsSection['links']> = []
const collect = (entries: NavigationItem[]) => {
for (const entry of entries) {
if (entry.page !== false && entry.path && entry.path !== '/') {
links.push({ title: entry.title, description: entry.description, href: entry.path })
const seen = links.find((link) => link.href === entry.path)
if (seen) seen.description ||= entry.description
else links.push({ title: entry.title, description: entry.description, href: entry.path })
}
if (entry.children?.length) collect(entry.children)
}
Expand Down
Loading