From 57fb6db20ea5c7bcf22829d6248a389ffd10a987 Mon Sep 17 00:00:00 2001 From: Felipe Cotti Date: Thu, 10 Jul 2025 16:35:38 -0300 Subject: [PATCH 1/2] Force allow the root page to be indexed. --- src/Elastic.Markdown/HtmlWriter.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Elastic.Markdown/HtmlWriter.cs b/src/Elastic.Markdown/HtmlWriter.cs index b53e57a5a..283379594 100644 --- a/src/Elastic.Markdown/HtmlWriter.cs +++ b/src/Elastic.Markdown/HtmlWriter.cs @@ -135,7 +135,7 @@ private async Task RenderLayout(MarkdownFile markdown, MarkdownDoc UrlPathPrefix = markdown.UrlPathPrefix, AppliesTo = markdown.YamlFrontMatter?.AppliesTo, GithubEditUrl = editUrl, - AllowIndexing = DocumentationSet.Context.AllowIndexing && (markdown is DetectionRuleFile || !current.Hidden), + AllowIndexing = DocumentationSet.Context.AllowIndexing && (markdown.Url.Equals("/docs/", StringComparison.OrdinalIgnoreCase) || markdown is DetectionRuleFile || !current.Hidden), CanonicalBaseUrl = DocumentationSet.Context.CanonicalBaseUrl, GoogleTagManager = DocumentationSet.Context.GoogleTagManager, Features = DocumentationSet.Configuration.Features, From 4b7d588d4df04c4d1d1aaa926d934bed77c46689 Mon Sep 17 00:00:00 2001 From: Felipe Cotti Date: Thu, 10 Jul 2025 17:03:05 -0300 Subject: [PATCH 2/2] Adjust check for root page --- src/Elastic.Markdown/HtmlWriter.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Elastic.Markdown/HtmlWriter.cs b/src/Elastic.Markdown/HtmlWriter.cs index 283379594..521ce7092 100644 --- a/src/Elastic.Markdown/HtmlWriter.cs +++ b/src/Elastic.Markdown/HtmlWriter.cs @@ -135,7 +135,7 @@ private async Task RenderLayout(MarkdownFile markdown, MarkdownDoc UrlPathPrefix = markdown.UrlPathPrefix, AppliesTo = markdown.YamlFrontMatter?.AppliesTo, GithubEditUrl = editUrl, - AllowIndexing = DocumentationSet.Context.AllowIndexing && (markdown.Url.Equals("/docs/", StringComparison.OrdinalIgnoreCase) || markdown is DetectionRuleFile || !current.Hidden), + AllowIndexing = DocumentationSet.Context.AllowIndexing && (markdown.CrossLink.Equals("docs-content://index.md", StringComparison.OrdinalIgnoreCase) || markdown is DetectionRuleFile || !current.Hidden), CanonicalBaseUrl = DocumentationSet.Context.CanonicalBaseUrl, GoogleTagManager = DocumentationSet.Context.GoogleTagManager, Features = DocumentationSet.Configuration.Features,