Skip to content

Commit

Permalink
Merge pull request #16 from Ellerbach/update-tools
Browse files Browse the repository at this point in the history
Added flag for handling index.md generation with 1 file in folder in DocFxTocGenerator
  • Loading branch information
mtirionMSFT authored Jan 18, 2023
2 parents 745bc76 + 6eaa6d3 commit f353d29
Show file tree
Hide file tree
Showing 3 changed files with 114 additions and 70 deletions.
1 change: 1 addition & 0 deletions src/DocFxTocGenerator/DocFxTocGenerator.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,6 @@
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.OpenApi.Readers" Version="1.5.0" />
</ItemGroup>
</Project>
7 changes: 7 additions & 0 deletions src/DocFxTocGenerator/Domain/CommandlineOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,5 +51,12 @@ public class CommandlineOptions
/// </summary>
[Option('i', "index", Required = false, HelpText = "Auto-generate a file index in each folder.")]
public bool AutoIndex { get; set; }

/// <summary>
/// Gets or sets a value indicating whether NOT to generate an index in a folder with 1 file.
/// Is supplementary to the -i option and doesn't work without that flag.
/// </summary>
[Option('n', "notwithone", Required = false, HelpText = "Do not auto-generate a file index when only contains 1 file. Additional to -i flag.")]
public bool NoAutoIndexWithOneFile { get; set; }
}
}
Loading

0 comments on commit f353d29

Please sign in to comment.