Skip to content

Commit 169ffee

Browse files
authored
Fail docfx on invalid internal link, fix build warning based on dotnet/docfx#9804 (#1681)
1 parent 1e8275c commit 169ffee

File tree

3 files changed

+64
-50
lines changed

3 files changed

+64
-50
lines changed

.github/workflows/build.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ jobs:
133133
run: |
134134
cd docs
135135
& ./generate-examples.ps1
136-
dotnet docfx docfx.json
136+
dotnet docfx docfx.json --warningsAsErrors true
137137
if ($LastExitCode -ne 0) {
138138
Write-Error "docfx failed with exit code $LastExitCode."
139139
}

docs/build-dev.ps1

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ if (-Not $NoBuild -Or -Not (Test-Path -Path _site)) {
4040
dotnet tool restore
4141
VerifySuccessExitCode
4242

43-
dotnet docfx ./docfx.json
43+
dotnet docfx ./docfx.json --warningsAsErrors true
4444
VerifySuccessExitCode
4545

4646
Copy-Item -Force home/*.html _site/

docs/docfx.json

+62-48
Original file line numberDiff line numberDiff line change
@@ -1,53 +1,67 @@
11
{
2-
"metadata": [
2+
"metadata": [
3+
{
4+
"properties": {
5+
"ProduceReferenceAssembly": "true"
6+
},
7+
"src": [
38
{
4-
"src": [
5-
{
6-
"files": [ "**/JsonApiDotNetCore.csproj","**/JsonApiDotNetCore.Annotations.csproj" ],
7-
"src": "../"
8-
}
9-
],
10-
"dest": "api",
11-
"disableGitFeatures": false
9+
"files": [
10+
"**/JsonApiDotNetCore.csproj",
11+
"**/JsonApiDotNetCore.Annotations.csproj"
12+
],
13+
"src": "../"
1214
}
13-
],
14-
"build": {
15-
"content": [
16-
{
17-
"files": [
18-
"api/**.yml",
19-
"api/index.md",
20-
"getting-started/**.md",
21-
"getting-started/**/toc.yml",
22-
"usage/**.md",
23-
"request-examples/**.md",
24-
"internals/**.md",
25-
"toc.yml",
26-
"*.md"
27-
],
28-
"exclude": [
29-
"**/README.md"
30-
]
31-
}
32-
],
33-
"resource": [
34-
{
35-
"files": [ "diagrams/*.svg" ]
36-
}
37-
],
38-
"overwrite": [
39-
{
40-
"exclude": [ "obj/**", "_site/**" ]
41-
}
42-
],
43-
"dest": "_site",
44-
"globalMetadataFiles": [],
45-
"fileMetadataFiles": [],
46-
"template": [ "default", "modern" ],
47-
"postProcessors": [],
48-
"noLangKeyword": false,
49-
"keepFileLink": false,
50-
"cleanupCacheHistory": false,
51-
"disableGitFeatures": false
15+
],
16+
"dest": "api",
17+
"disableGitFeatures": false
5218
}
19+
],
20+
"build": {
21+
"content": [
22+
{
23+
"files": [
24+
"api/**.yml",
25+
"api/index.md",
26+
"getting-started/**.md",
27+
"getting-started/**/toc.yml",
28+
"usage/**.md",
29+
"request-examples/**.md",
30+
"internals/**.md",
31+
"toc.yml",
32+
"*.md"
33+
],
34+
"exclude": [
35+
"**/README.md"
36+
]
37+
}
38+
],
39+
"resource": [
40+
{
41+
"files": [
42+
"diagrams/*.svg"
43+
]
44+
}
45+
],
46+
"overwrite": [
47+
{
48+
"exclude": [
49+
"obj/**",
50+
"_site/**"
51+
]
52+
}
53+
],
54+
"dest": "_site",
55+
"globalMetadataFiles": [],
56+
"fileMetadataFiles": [],
57+
"template": [
58+
"default",
59+
"modern"
60+
],
61+
"postProcessors": [],
62+
"noLangKeyword": false,
63+
"keepFileLink": false,
64+
"cleanupCacheHistory": false,
65+
"disableGitFeatures": false
66+
}
5367
}

0 commit comments

Comments
 (0)