diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b42c08d59c..d16479acd2 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -133,7 +133,7 @@ jobs: run: | cd docs & ./generate-examples.ps1 - dotnet docfx docfx.json + dotnet docfx docfx.json --warningsAsErrors true if ($LastExitCode -ne 0) { Write-Error "docfx failed with exit code $LastExitCode." } diff --git a/docs/build-dev.ps1 b/docs/build-dev.ps1 index d65826687a..6345875fc7 100644 --- a/docs/build-dev.ps1 +++ b/docs/build-dev.ps1 @@ -40,7 +40,7 @@ if (-Not $NoBuild -Or -Not (Test-Path -Path _site)) { dotnet tool restore VerifySuccessExitCode -dotnet docfx ./docfx.json +dotnet docfx ./docfx.json --warningsAsErrors true VerifySuccessExitCode Copy-Item -Force home/*.html _site/ diff --git a/docs/docfx.json b/docs/docfx.json index eb94da412e..da0c58cac8 100644 --- a/docs/docfx.json +++ b/docs/docfx.json @@ -1,53 +1,67 @@ { - "metadata": [ + "metadata": [ + { + "properties": { + "ProduceReferenceAssembly": "true" + }, + "src": [ { - "src": [ - { - "files": [ "**/JsonApiDotNetCore.csproj","**/JsonApiDotNetCore.Annotations.csproj" ], - "src": "../" - } - ], - "dest": "api", - "disableGitFeatures": false + "files": [ + "**/JsonApiDotNetCore.csproj", + "**/JsonApiDotNetCore.Annotations.csproj" + ], + "src": "../" } - ], - "build": { - "content": [ - { - "files": [ - "api/**.yml", - "api/index.md", - "getting-started/**.md", - "getting-started/**/toc.yml", - "usage/**.md", - "request-examples/**.md", - "internals/**.md", - "toc.yml", - "*.md" - ], - "exclude": [ - "**/README.md" - ] - } - ], - "resource": [ - { - "files": [ "diagrams/*.svg" ] - } - ], - "overwrite": [ - { - "exclude": [ "obj/**", "_site/**" ] - } - ], - "dest": "_site", - "globalMetadataFiles": [], - "fileMetadataFiles": [], - "template": [ "default", "modern" ], - "postProcessors": [], - "noLangKeyword": false, - "keepFileLink": false, - "cleanupCacheHistory": false, - "disableGitFeatures": false + ], + "dest": "api", + "disableGitFeatures": false } + ], + "build": { + "content": [ + { + "files": [ + "api/**.yml", + "api/index.md", + "getting-started/**.md", + "getting-started/**/toc.yml", + "usage/**.md", + "request-examples/**.md", + "internals/**.md", + "toc.yml", + "*.md" + ], + "exclude": [ + "**/README.md" + ] + } + ], + "resource": [ + { + "files": [ + "diagrams/*.svg" + ] + } + ], + "overwrite": [ + { + "exclude": [ + "obj/**", + "_site/**" + ] + } + ], + "dest": "_site", + "globalMetadataFiles": [], + "fileMetadataFiles": [], + "template": [ + "default", + "modern" + ], + "postProcessors": [], + "noLangKeyword": false, + "keepFileLink": false, + "cleanupCacheHistory": false, + "disableGitFeatures": false + } }