From 4544bd18b3d2b84e122ab8a3acb65301ca650fb4 Mon Sep 17 00:00:00 2001 From: filzrev <103790468+filzrev@users.noreply.github.com> Date: Mon, 25 Mar 2024 15:58:02 +0900 Subject: [PATCH 1/2] chore: update config reference document --- docs/reference/docfx-json-reference.md | 34 +++++++++++++++++++++++--- src/Docfx.Dotnet/MetadataJsonConfig.cs | 9 ++++--- 2 files changed, 35 insertions(+), 8 deletions(-) diff --git a/docs/reference/docfx-json-reference.md b/docs/reference/docfx-json-reference.md index 6f4b2b183c9..35dd78001dc 100644 --- a/docs/reference/docfx-json-reference.md +++ b/docs/reference/docfx-json-reference.md @@ -10,9 +10,9 @@ The `docfx.json` file indicates that the directory is the root of a docfx projec } ``` -## Global properties +## Global properties -### `rules` +## `rules` Overrides default log message severity level. Key is the log code, supported values are `verbose`, `info`, `suggestion`, `warning`, `error`: @@ -148,6 +148,7 @@ Templates are used to transform YAML files generated by `docfx` to human-readabl } } ``` + ```json { "build": { @@ -166,7 +167,6 @@ The themes applied to the documentation. Theme is used to customize the styles g Theme is to provide general styles for all the generated pages. Files inside a theme will be generally copied to the output folder. A typical usage is, after YAML files are transformed to HTML pages, well-designed CSS style files in a Theme can then overwrite the default styles defined in template, e.g. `main.css`. - ### `xref` Specifies the urls of xrefmap used by content files. Currently, it supports following scheme: http, https, file. @@ -199,6 +199,22 @@ Sets the max parallelism. Setting 0 (default) is the same as setting to the coun Sets the parameters for the markdown engine, value is a JSON object. +### `customLinkResolver` + +Set the name of the `ICustomHrefGenerator` derived class. + +### `groups` + +Specifies the output folder of specified group name. + +```json +"groups": + "v1": { + "dest": "output_dir_v1" + } +} +``` + ### `sitemap` Specifies the options for generating [sitemap.xml](https://www.sitemaps.org/protocol.html) file: @@ -320,6 +336,12 @@ Specifies the output folder of the generated metadata files relative to `docfx.j If set to true, DocFX would not render triple-slash-comments in source code as markdown. +### `references` + +Specify additinal assembly reference files. +This settings is used when generating metadata from DLLs or source files. +Solution or project file-based metadata generation does not use this property. + ### `filter` Specifies the filter configuration file, please go to [How to filter out unwanted apis attributes](../tutorial/howto_filter_out_unwanted_apis_attributes.md) for more details. @@ -332,6 +354,10 @@ Disables the default filter configuration file. Disables generation of view source links. +### `codeSourceBasePath` + +Specify the base directory that is used to resolve code source (e.g. ``). + ### `properties` Specifies an optional set of MSBuild properties used when interpreting project files. These are the same properties that are passed to msbuild via the `/property:name=value` command line argument. @@ -372,7 +398,7 @@ Specifies how member pages are organized: When enabled, continues documentation generation in case of compilation errors. -### `EnumSortOrder` +### `enumSortOrder` Specifies how enum members are sorted: diff --git a/src/Docfx.Dotnet/MetadataJsonConfig.cs b/src/Docfx.Dotnet/MetadataJsonConfig.cs index b80631776a2..7159602245a 100644 --- a/src/Docfx.Dotnet/MetadataJsonConfig.cs +++ b/src/Docfx.Dotnet/MetadataJsonConfig.cs @@ -118,10 +118,11 @@ internal class MetadataJsonItemConfig [JsonPropertyName("shouldSkipMarkup")] public bool? ShouldSkipMarkup { get; set; } - [JsonProperty("raw")] - [JsonPropertyName("raw")] - public bool? Raw { get; set; } - + /// + /// Specify additinal assembly reference files. + /// This settings is used when generating metadata from DLLs or source files. + /// Solution or project file-based metadata generation does not use this property. + /// [JsonProperty("references")] [JsonPropertyName("references")] public FileMapping References { get; set; } From 39e2c907ff1c3d46511e631b35796236ef8d2f0c Mon Sep 17 00:00:00 2001 From: filzrev <103790468+filzrev@users.noreply.github.com> Date: Mon, 25 Mar 2024 15:58:02 +0900 Subject: [PATCH 2/2] chore: update config reference document --- src/Docfx.App/Config/BuildJsonConfig.cs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/Docfx.App/Config/BuildJsonConfig.cs b/src/Docfx.App/Config/BuildJsonConfig.cs index 8ced4880a34..6aad661c579 100644 --- a/src/Docfx.App/Config/BuildJsonConfig.cs +++ b/src/Docfx.App/Config/BuildJsonConfig.cs @@ -202,14 +202,13 @@ internal class BuildJsonConfig public string CustomLinkResolver { get; set; } /// - /// Define groups. + /// Specifies the output folder of specified group name. /// /// /// /// groups:{ /// "v1": { - /// "dest": "v1", - /// "extraMetadata01": {} + /// "dest": "output_dir_v1" /// } /// } ///