Skip to content

Commit

Permalink
Persist UrlPathPrefix into link map (#100)
Browse files Browse the repository at this point in the history
  • Loading branch information
Mpdreamz authored Dec 10, 2024
1 parent e09de44 commit ce7d1cc
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/Elastic.Markdown/IO/LinkReference.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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; } = [];

Expand All @@ -20,6 +24,11 @@ public static LinkReference Create(DocumentationSet set)
var links = set.FlatMappedFiles.Values
.OfType<MarkdownFile>()
.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
};
}
}

0 comments on commit ce7d1cc

Please sign in to comment.