From 0add875c15bbdf3591ace613f226121f734b169d Mon Sep 17 00:00:00 2001 From: Martijn Laarman Date: Tue, 10 Dec 2024 14:04:31 +0100 Subject: [PATCH] Persist UrlPathPrefix into link map --- src/Elastic.Markdown/IO/LinkReference.cs | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/Elastic.Markdown/IO/LinkReference.cs b/src/Elastic.Markdown/IO/LinkReference.cs index b0f502e..576215a 100644 --- a/src/Elastic.Markdown/IO/LinkReference.cs +++ b/src/Elastic.Markdown/IO/LinkReference.cs @@ -12,6 +12,10 @@ public record LinkReference { [JsonPropertyName("origin")] public required GitConfiguration Origin { get; init; } + + [JsonPropertyName("url_path_prefix")] + public required string? UrlPathPrefix { get; init; } + [JsonPropertyName("links")] public required string[] Links { get; init; } = []; @@ -20,6 +24,11 @@ public static LinkReference Create(DocumentationSet set) var links = set.FlatMappedFiles.Values .OfType() .Select(m => m.RelativePath).ToArray(); - return new LinkReference { Origin = set.Context.Git, Links = links }; + return new LinkReference + { + UrlPathPrefix = set.Context.UrlPathPrefix, + Origin = set.Context.Git, + Links = links + }; } }