Skip to content

Commit f43495c

Browse files
Fix documentation generation
1 parent 3b361e3 commit f43495c

File tree

3 files changed

+21
-16
lines changed

3 files changed

+21
-16
lines changed

build/BenchmarkDotNet.Build/ChangeLogBuilder.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -136,11 +136,11 @@ string PresentContributor(GitHubCommit commit)
136136
.Distinct()
137137
.ToImmutableList();
138138

139-
var milestoneHtmlUlr = $"https://github.com/{Repo.Owner}/{Repo.Name}/issues?q=milestone:{currentVersion}";
139+
var milestoneHtmlUlr = $"https://github.com/{Repo.Owner}/{Repo.Name}/issues?q=milestone:v{currentVersion}";
140140

141141
builder.AppendLine("## Milestone details");
142142
builder.AppendLine();
143-
builder.AppendLine($"In the [{currentVersion}]({milestoneHtmlUlr}) scope, ");
143+
builder.AppendLine($"In the [v{currentVersion}]({milestoneHtmlUlr}) scope, ");
144144
builder.Append(issues.Count + " issues were resolved and ");
145145
builder.AppendLine(pullRequests.Count + " pull requests were merged.");
146146
builder.AppendLine($"This release includes {commits.Count} commits by {contributors.Count} contributors.");

build/BenchmarkDotNet.Build/Runners/DocumentationRunner.cs

+15-14
Original file line numberDiff line numberDiff line change
@@ -133,13 +133,13 @@ private void GenerateChangelogToc()
133133
{
134134
var content = new StringBuilder();
135135

136-
content.AppendLine($"- name: {context.VersionHistory.CurrentVersion}");
137-
content.AppendLine($" href: {context.VersionHistory.CurrentVersion}.md");
136+
content.AppendLine($"- name: v{context.VersionHistory.CurrentVersion}");
137+
content.AppendLine($" href: v{context.VersionHistory.CurrentVersion}.md");
138138

139139
foreach (var version in context.VersionHistory.StableVersions.Reverse())
140140
{
141-
content.AppendLine($"- name: {version}");
142-
content.AppendLine($" href: {version}.md");
141+
content.AppendLine($"- name: v{version}");
142+
content.AppendLine($" href: v{version}.md");
143143
}
144144

145145
content.AppendLine("- name: Full ChangeLog");
@@ -158,9 +158,9 @@ private void GenerateChangelogFull()
158158
content.AppendLine("# Full ChangeLog");
159159
content.AppendLine("");
160160
content.AppendLine(
161-
$"[!include[{context.VersionHistory.CurrentVersion}]({context.VersionHistory.CurrentVersion}.md)]");
161+
$"[!include[v{context.VersionHistory.CurrentVersion}](v{context.VersionHistory.CurrentVersion}.md)]");
162162
foreach (var version in context.VersionHistory.StableVersions.Reverse())
163-
content.AppendLine($"[!include[{version}]({version}.md)]");
163+
content.AppendLine($"[!include[v{version}](v{version}.md)]");
164164

165165
context.GenerateFile(changelogFullFile, content);
166166
}
@@ -174,9 +174,9 @@ private void GenerateChangelogIndex()
174174
content.AppendLine("");
175175
content.AppendLine("# ChangeLog");
176176
content.AppendLine("");
177-
content.AppendLine($"* @changelog.{context.VersionHistory.CurrentVersion}");
177+
content.AppendLine($"* @changelog.v{context.VersionHistory.CurrentVersion}");
178178
foreach (var version in context.VersionHistory.StableVersions.Reverse())
179-
content.AppendLine($"* @changelog.{version}");
179+
content.AppendLine($"* @changelog.v{version}");
180180
content.AppendLine("* @changelog.full");
181181

182182
context.GenerateFile(changelogIndexFile, content);
@@ -185,17 +185,18 @@ private void GenerateChangelogIndex()
185185
private void DocfxChangelogGenerate(string version)
186186
{
187187
EnsureChangelogDetailsExist();
188-
var header = ChangelogSrcDirectory.Combine("header").CombineWithFilePath(version + ".md");
189-
var footer = ChangelogSrcDirectory.Combine("footer").CombineWithFilePath(version + ".md");
190-
var details = ChangelogSrcDirectory.Combine("details").CombineWithFilePath(version + ".md");
191-
var release = ChangelogDirectory.CombineWithFilePath(version + ".md");
188+
var md = $"v{version}.md";
189+
var header = ChangelogSrcDirectory.Combine("header").CombineWithFilePath(md);
190+
var footer = ChangelogSrcDirectory.Combine("footer").CombineWithFilePath(md);
191+
var details = ChangelogSrcDirectory.Combine("details").CombineWithFilePath(md);
192+
var release = ChangelogDirectory.CombineWithFilePath(md);
192193

193194
var content = new StringBuilder();
194195
content.AppendLine("---");
195-
content.AppendLine("uid: changelog." + version);
196+
content.AppendLine("uid: changelog.v" + version);
196197
content.AppendLine("---");
197198
content.AppendLine("");
198-
content.AppendLine("# BenchmarkDotNet " + version);
199+
content.AppendLine("# BenchmarkDotNet v" + version);
199200
content.AppendLine("");
200201
content.AppendLine("");
201202

docs/template/public/main.css

+4
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,8 @@
55

66
#breadcrumb {
77
display: none;
8+
}
9+
10+
.affix {
11+
display: none !important;
812
}

0 commit comments

Comments
 (0)