Skip to content

Commit

Permalink
Add section-name
Browse files Browse the repository at this point in the history
  • Loading branch information
jdkato committed Dec 24, 2024
1 parent 5753b99 commit 59ca87f
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 7 deletions.
10 changes: 5 additions & 5 deletions script/docsearch/index.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@
"strip_chars": "#›",
"selectors": {
"default": {
"lvl0": ".docs-header h1",
"lvl1": ".docs-content h2",
"lvl2": ".docs-content h3",
"lvl3": ".docs-content h4",
"lvl4": ".docs-content h5",
"lvl0": "#section-name",
"lvl1": ".docs-header h1",
"lvl2": ".docs-content h2",
"lvl3": ".docs-content h3",
"lvl4": ".docs-content h4",
"text": ".docs-content p"
}
}
Expand Down
4 changes: 3 additions & 1 deletion src/routes/docs/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@
<div class="mb-4 flex items-center space-x-1 text-sm text-muted-foreground">
<div class="overflow-hidden text-ellipsis whitespace-nowrap">Docs</div>
<ChevronRight class="h-4 w-4" />
<div class="overflow-hidden text-ellipsis whitespace-nowrap">{data.section}</div>
<div id="section-name" class="overflow-hidden text-ellipsis whitespace-nowrap">
{data.section}
</div>
<ChevronRight class="h-4 w-4" />
<div class="font-medium text-foreground">{doc.title}</div>
</div>
Expand Down
4 changes: 3 additions & 1 deletion src/routes/docs/[...slug]/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@
<div class="mb-4 flex items-center space-x-1 text-sm text-muted-foreground">
<div class="overflow-hidden text-ellipsis whitespace-nowrap">Docs</div>
<ChevronRight class="h-4 w-4" />
<div class="overflow-hidden text-ellipsis whitespace-nowrap">{data.section}</div>
<div id="section-name" class="overflow-hidden text-ellipsis whitespace-nowrap">
{data.section}
</div>
<ChevronRight class="h-4 w-4" />
<div class="font-medium text-foreground">{doc.title}</div>
</div>
Expand Down

0 comments on commit 59ca87f

Please sign in to comment.