Skip to content

Commit ce7d1cc

Browse files
authored
Persist UrlPathPrefix into link map (#100)
1 parent e09de44 commit ce7d1cc

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

src/Elastic.Markdown/IO/LinkReference.cs

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ public record LinkReference
1212
{
1313
[JsonPropertyName("origin")]
1414
public required GitConfiguration Origin { get; init; }
15+
16+
[JsonPropertyName("url_path_prefix")]
17+
public required string? UrlPathPrefix { get; init; }
18+
1519
[JsonPropertyName("links")]
1620
public required string[] Links { get; init; } = [];
1721

@@ -20,6 +24,11 @@ public static LinkReference Create(DocumentationSet set)
2024
var links = set.FlatMappedFiles.Values
2125
.OfType<MarkdownFile>()
2226
.Select(m => m.RelativePath).ToArray();
23-
return new LinkReference { Origin = set.Context.Git, Links = links };
27+
return new LinkReference
28+
{
29+
UrlPathPrefix = set.Context.UrlPathPrefix,
30+
Origin = set.Context.Git,
31+
Links = links
32+
};
2433
}
2534
}

0 commit comments

Comments
 (0)