Skip to content

Commit cbcb056

Browse files
committed
Fix search meta tags
1 parent c245d33 commit cbcb056

File tree

1 file changed

+20
-16
lines changed

1 file changed

+20
-16
lines changed

src/Elastic.Markdown/Slices/_Layout.cshtml

Lines changed: 20 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2,25 +2,29 @@
22
@implements IUsesLayout<Elastic.Documentation.Site._GlobalLayout, GlobalLayoutViewModel>
33
@functions {
44
public GlobalLayoutViewModel LayoutModel => Model;
5-
protected override Task ExecuteSectionAsync(string name)
5+
protected override async Task ExecuteSectionAsync(string name)
66
{
7-
if (name == GlobalSections.Footer && Model.Layout is not LayoutName.Archive)
7+
switch (name)
88
{
9-
<aside id="dismissible-banner" class="admonition tip">
10-
<div class="container flex justify-between items-center mx-auto">
11-
<p>
12-
Welcome to the docs for the <a class="link text-base" href="/docs/get-started/versioning-availability#find-docs-for-your-product-version">latest Elastic product versions</a>, including Elastic Stack 9.0 and Elastic Cloud Serverless.
13-
To view previous versions, go to <a class="link text-base" target="_blank" href="https://elastic.co/guide">elastic.co/guide</a>.
14-
</p>
15-
<button id="dismissible-button">
16-
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="size-6">
17-
<path stroke-linecap="round" stroke-linejoin="round" d="M6 18 18 6M6 6l12 12"/>
18-
</svg>
19-
</button>
20-
</div>
21-
</aside>
9+
case GlobalSections.Head:
10+
await RenderSectionAsync(GlobalSections.Head);
11+
break;
12+
case GlobalSections.Footer when Model.Layout is not LayoutName.Archive:
13+
<aside id="dismissible-banner" class="admonition tip">
14+
<div class="container flex justify-between items-center mx-auto">
15+
<p>
16+
Welcome to the docs for the <a class="link text-base" href="/docs/get-started/versioning-availability#find-docs-for-your-product-version">latest Elastic product versions</a>, including Elastic Stack 9.0 and Elastic Cloud Serverless.
17+
To view previous versions, go to <a class="link text-base" target="_blank" href="https://elastic.co/guide">elastic.co/guide</a>.
18+
</p>
19+
<button id="dismissible-button">
20+
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="size-6">
21+
<path stroke-linecap="round" stroke-linejoin="round" d="M6 18 18 6M6 6l12 12"/>
22+
</svg>
23+
</button>
24+
</div>
25+
</aside>
26+
break;
2227
}
23-
return Task.CompletedTask;
2428
}
2529
private async Task RenderDefault()
2630
{

0 commit comments

Comments
 (0)