Skip to content

Commit e252305

Browse files
yufeihp-kostov
authored andcommitted
feat: add --memberLayout argument to metadata command (dotnet#9244)
feat: add --memberLayout arg to metadata command Co-authored-by: Yufei Huang <yufeih@users.noreply.github.com>
1 parent 4fb8f11 commit e252305

File tree

3 files changed

+7
-1
lines changed

3 files changed

+7
-1
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,9 @@ jobs:
4444
- run: dotnet run -c Release --no-build -f net8.0 --project src/docfx -- docs/docfx.json
4545

4646
- run: dotnet run -c Release --no-build -f net8.0 --project src/docfx -- metadata samples/seed/docfx.json
47+
- run: dotnet run -c Release --no-build -f net8.0 --project src/docfx -- metadata samples/seed/docfx.json --outputFormat markdown --output samples/seed/md
48+
- run: dotnet run -c Release --no-build -f net8.0 --project src/docfx -- metadata samples/seed/docfx.json --outputFormat markdown --output samples/seed/md2 --namespaceLayout nested --memberLayout separatePages
4749
- run: dotnet run -c Release --no-build -f net8.0 --project src/docfx -- build samples/seed/docfx.json --output docs/_site/seed
48-
- run: dotnet run -c Release --no-build -f net8.0 --project src/docfx -- metadata samples/seed/docfx.json --outputFormat markdown --output docs/_site/seed/md
4950

5051
- uses: actions/upload-artifact@v3
5152
if: matrix.os == 'ubuntu-latest'

src/docfx/Models/MetadataCommand.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ private static void MergeOptionsToConfig(MetadataCommandOptions options, Metadat
2929
item.DisableGitFeatures |= options.DisableGitFeatures;
3030
item.DisableDefaultFilter |= options.DisableDefaultFilter;
3131
item.NamespaceLayout = options.NamespaceLayout ?? item.NamespaceLayout;
32+
item.MemberLayout = options.MemberLayout ?? item.MemberLayout;
3233
item.OutputFormat = options.OutputFormat ?? item.OutputFormat;
3334

3435
if (!string.IsNullOrEmpty(options.FilterConfigFile))

src/docfx/Models/MetadataCommandOptions.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,4 +48,8 @@ internal class MetadataCommandOptions : LogOptions
4848
[Description("Determines the namespace layout in table of contents.")]
4949
[CommandOption("--namespaceLayout")]
5050
public NamespaceLayout? NamespaceLayout { get; set; }
51+
52+
[Description("Determines the member page layout.")]
53+
[CommandOption("--memberLayout")]
54+
public MemberLayout? MemberLayout { get; set; }
5155
}

0 commit comments

Comments
 (0)