Skip to content

Commit be414a1

Browse files
committed
Also add breadcrumbs to the hx-select-oob list
1 parent c44080f commit be414a1

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

src/Elastic.Markdown/Myst/Renderers/HtmxLinkInlineRenderer.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ protected override void Write(HtmlRenderer renderer, LinkInline link)
1919
_ = renderer.WriteEscapeUrl(link.GetDynamicUrl != null ? link.GetDynamicUrl() ?? link.Url : link.Url);
2020
_ = renderer.Write('"');
2121
_ = renderer.WriteAttributes(link);
22-
_ = renderer.Write(" hx-select-oob=\"#markdown-content,#toc-nav,#prev-next-nav\"");
22+
_ = renderer.Write(" hx-select-oob=\"#markdown-content,#toc-nav,#prev-next-nav,#breadcrumbs\"");
2323
_ = renderer.Write(" hx-swap=\"none\"");
2424
_ = renderer.Write(" hx-push-url=\"true\"");
2525
_ = renderer.Write(" hx-indicator=\"#htmx-indicator\"");

src/Elastic.Markdown/Slices/Layout/_Breadcrumbs.cshtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
@inherits RazorSlice<LayoutViewModel>
2-
<ol class="block w-full" itemscope="" itemtype="https://schema.org/BreadcrumbList">
2+
<ol id="breadcrumbs" class="block w-full" itemscope="" itemtype="https://schema.org/BreadcrumbList">
33
<li class="inline text-ink text-sm hover:text-ink leading-[1.2em] tracking-[-0.02em]" itemprop="itemListElement" itemscope="" itemtype="https://schema.org/ListItem">
44
<a itemprop="item" href="@Model.UrlPathPrefix/">
55
<span itemprop="name" class="hover:text-ink">Elastic</span>

src/Elastic.Markdown/Slices/Layout/_TocTreeNav.cshtml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
<div class="flex">
1111
<a
1212
hx-get="@f.Url"
13-
hx-select-oob="#markdown-content,#toc-nav,#prev-next-nav"
13+
hx-select-oob="#markdown-content,#toc-nav,#prev-next-nav,#breadcrumbs"
1414
hx-swap="none"
1515
hx-push-url="true"
1616
hx-indicator="#htmx-indicator"
@@ -49,7 +49,7 @@
4949
<a
5050
href="@g.Index?.Url"
5151
hx-get="@g.Index?.Url"
52-
hx-select-oob="#markdown-content,#toc-nav,#prev-next-nav"
52+
hx-select-oob="#markdown-content,#toc-nav,#prev-next-nav,#breadcrumbs"
5353
hx-swap="none"
5454
hx-push-url="true"
5555
hx-indicator="#htmx-indicator"

src/Elastic.Markdown/Slices/_Layout.cshtml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
<a
3737
href="@Model.Previous.Url"
3838
hx-get="@Model.Previous.Url"
39-
hx-select-oob="#markdown-content,#toc-nav,#prev-next-nav"
39+
hx-select-oob="#markdown-content,#toc-nav,#prev-next-nav,#breadcrumbs"
4040
hx-swap="none"
4141
hx-push-url="true"
4242
hx-indicator="#htmx-indicator"
@@ -59,7 +59,7 @@
5959
<a
6060
href="@Model.Next.Url"
6161
hx-get="@Model.Next.Url"
62-
hx-select-oob="#markdown-content,#toc-nav,#prev-next-nav"
62+
hx-select-oob="#markdown-content,#toc-nav,#prev-next-nav,#breadcrumbs"
6363
hx-swap="none"
6464
hx-push-url="true"
6565
hx-indicator="#htmx-indicator"

0 commit comments

Comments
 (0)