Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ jobs:

- run: dotnet run -c Release --no-build -f net8.0 --project src/docfx -- metadata samples/seed/docfx.json
- run: dotnet run -c Release --no-build -f net8.0 --project src/docfx -- build samples/seed/docfx.json --output docs/_site/seed
- 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

- uses: actions/upload-artifact@v3
if: matrix.os == 'ubuntu-latest'
Expand Down
4 changes: 2 additions & 2 deletions samples/seed/dotnet/solution/CatLibrary/Class1.cs
Original file line number Diff line number Diff line change
Expand Up @@ -177,8 +177,8 @@ public void Jump(T ownType, K anotherOwnType, ref bool cheat)
/// <summary>
/// Addition operator of this class.
/// </summary>
/// <param name="lsr">...</param>
/// <param name="rsr">~~~</param>
/// <param name="lsr">..</param>
/// <param name="rsr">~~</param>
/// <returns>Result with <i>int</i> type.</returns>
public static int operator +(Cat<T, K> lsr, int rsr) { return 1; }

Expand Down
1 change: 1 addition & 0 deletions src/Docfx.Dotnet/DotnetApiCatalog.cs
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ private static ExtractMetadataConfig ConvertConfig(MetadataJsonItemConfig config
IncludePrivateMembers = configModel?.IncludePrivateMembers ?? false,
GlobalNamespaceId = configModel?.GlobalNamespaceId,
MSBuildProperties = configModel?.MSBuildProperties,
OutputFormat = configModel?.OutputFormat ?? default,
OutputFolder = Path.GetFullPath(Path.Combine(outputDirectory, outputFolder)),
CodeSourceBasePath = configModel?.CodeSourceBasePath,
DisableDefaultFilter = configModel?.DisableDefaultFilter ?? false,
Expand Down
2 changes: 2 additions & 0 deletions src/Docfx.Dotnet/ExtractMetadata/ExtractMetadataConfig.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ internal class ExtractMetadataConfig

public string OutputFolder { get; init; }

public MetadataOutputFormat OutputFormat { get; init; }

public bool ShouldSkipMarkup { get; init; }

public string FilterConfigFile { get; init; }
Expand Down
6 changes: 6 additions & 0 deletions src/Docfx.Dotnet/ExtractMetadata/ExtractMetadataWorker.cs
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,12 @@ await LoadCompilationFromProject(project.AbsolutePath) is { } compilation)
return;
}

if (_config.OutputFormat is MetadataOutputFormat.Markdown)
{
MarkdownFormatter.Save(assemblies, _config, _options);
return;
}

var projectMetadataList = new List<MetadataItem>();
var extensionMethods = assemblies.SelectMany(assembly => assembly.Item1.FindExtensionMethods()).ToArray();
var filter = new SymbolFilter(_config, _options);
Expand Down
Loading