Skip to content

Commit 95ff79f

Browse files
committed
Move description below the title in the frontmatter output
1 parent c240fa7 commit 95ff79f

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/Elastic.Markdown/Exporters/LlmMarkdownExporter.cs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -111,9 +111,6 @@ private string CreateLlmContentWithMetadata(MarkdownExportFileContext context, s
111111
_ = metadata.AppendLine("---");
112112
_ = metadata.AppendLine($"title: {sourceFile.Title}");
113113

114-
if (!string.IsNullOrEmpty(sourceFile.Url))
115-
_ = metadata.AppendLine($"url: {context.BuildContext.CanonicalBaseUrl?.Scheme}://{context.BuildContext.CanonicalBaseUrl?.Host}{sourceFile.Url}");
116-
117114
if (!string.IsNullOrEmpty(sourceFile.YamlFrontMatter?.Description))
118115
_ = metadata.AppendLine($"description: {sourceFile.YamlFrontMatter.Description}");
119116
else
@@ -122,6 +119,10 @@ private string CreateLlmContentWithMetadata(MarkdownExportFileContext context, s
122119
var generateDescription = descriptionGenerator.GenerateDescription(context.Document);
123120
_ = metadata.AppendLine($"description: {generateDescription}");
124121
}
122+
123+
if (!string.IsNullOrEmpty(sourceFile.Url))
124+
_ = metadata.AppendLine($"url: {context.BuildContext.CanonicalBaseUrl?.Scheme}://{context.BuildContext.CanonicalBaseUrl?.Host}{sourceFile.Url}");
125+
125126
var configProducts = context.BuildContext.Configuration.Products.Select(p =>
126127
{
127128
if (Products.AllById.TryGetValue(p, out var product))

0 commit comments

Comments
 (0)