Skip to content

Commit

Permalink
Release 0.4.0 (#61)
Browse files Browse the repository at this point in the history
  • Loading branch information
josefpihrt authored Aug 17, 2023
1 parent f2090ea commit 699d458
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 10 deletions.
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [0.4.0-beta2] - 2023-07-29
## [0.4.0] - 2023-08-17

## [0.4.0-beta.2] - 2023-07-29

### Added

Expand Down
2 changes: 1 addition & 1 deletion src/DocumentationGenerator/DocumentationGenerator.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="DotMarkdown.Docusaurus" Version="0.3.0-beta" />
<PackageReference Include="DotMarkdown.Docusaurus" Version="0.3.0" />
<PackageReference Include="CommandLineParser" Version="2.8.0" />
</ItemGroup>

Expand Down
13 changes: 5 additions & 8 deletions src/DocumentationGenerator/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -264,18 +264,15 @@ private static void AddFootnote(MDocument document)

private static void WriteFrontMatter(DocusaurusMarkdownWriter mw, int? position = null, string? label = null)
{
if (position is not null
|| label is not null)
{
var items = new List<(string, object)>();
mw.WriteDocusaurusFrontMatter(GetItems());

IEnumerable<(string, object)> GetItems()
{
if (position is not null)
items.Add(("sidebar_position", position));
yield return ("sidebar_position", position);

if (label is not null)
items.Add(("sidebar_label", label));

mw.WriteDocusaurusFrontMatter(items);
yield return ("sidebar_label", label);
}
}
}

0 comments on commit 699d458

Please sign in to comment.