From cbcb056567aa03912cf7bff2010092b1fdbffd54 Mon Sep 17 00:00:00 2001 From: Jan Calanog Date: Tue, 17 Jun 2025 09:17:06 +0200 Subject: [PATCH] Fix search meta tags --- src/Elastic.Markdown/Slices/_Layout.cshtml | 36 ++++++++++++---------- 1 file changed, 20 insertions(+), 16 deletions(-) diff --git a/src/Elastic.Markdown/Slices/_Layout.cshtml b/src/Elastic.Markdown/Slices/_Layout.cshtml index 4094c2275..a6d2e03aa 100644 --- a/src/Elastic.Markdown/Slices/_Layout.cshtml +++ b/src/Elastic.Markdown/Slices/_Layout.cshtml @@ -2,25 +2,29 @@ @implements IUsesLayout @functions { public GlobalLayoutViewModel LayoutModel => Model; - protected override Task ExecuteSectionAsync(string name) + protected override async Task ExecuteSectionAsync(string name) { - if (name == GlobalSections.Footer && Model.Layout is not LayoutName.Archive) + switch (name) { - + case GlobalSections.Head: + await RenderSectionAsync(GlobalSections.Head); + break; + case GlobalSections.Footer when Model.Layout is not LayoutName.Archive: + + break; } - return Task.CompletedTask; } private async Task RenderDefault() {