Skip to content

Commit e98bee2

Browse files
authored
[docs] update to Documenter@1 (#2266)
1 parent 2e39090 commit e98bee2

File tree

5 files changed

+25
-11
lines changed

5 files changed

+25
-11
lines changed

.github/workflows/documentation.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,13 @@ jobs:
2424
env:
2525
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # For authentication with GitHub Actions token
2626
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }} # For authentication with SSH deploy key
27-
run: julia --project=docs/ docs/make.jl
27+
DOCUMENTER_LATEX_DEBUG: ${{ github.workspace }}/latex-debug-logs
28+
run: julia --color=yes --project=docs/ docs/make.jl
29+
- uses: actions/upload-artifact@v3
30+
if: ${{ always() }}
31+
with:
32+
name: PDF build logs
33+
path: ${{ github.workspace }}/latex-debug-logs
2834
- uses: errata-ai/vale-action@reviewdog
2935
with:
3036
files: docs/src

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,4 @@ test/Benchmarks/*.json
99
Manifest.toml
1010
*.swp
1111
docs/src/release_notes.md
12+
docs/src/MathOptInterface.pdf

docs/Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@ JSONSchema = "7d188eb4-7ad8-530c-ae41-71a32a6d4692"
55
MathOptInterface = "b8f27783-ece8-5eb3-8dc8-9495eed66fee"
66

77
[compat]
8-
Documenter = "0.27.10"
8+
Documenter = "1"
99
JSON = "0.21"
1010
JSONSchema = "1"

docs/make.jl

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,10 @@ end
120120
# Build the HTML docs
121121
# ==============================================================================
122122

123+
# Needed to make Documenter think that there is a PDF in the right place when
124+
# link checking. Inn production we replace this by running the LaTeX build.
125+
write(joinpath(@__DIR__, "src", "MathOptInterface.pdf"), "")
126+
123127
@time Documenter.makedocs(
124128
sitename = "MathOptInterface",
125129
authors = "The JuMP core developers and contributors",
@@ -128,9 +132,18 @@ end
128132
prettyurls = get(ENV, "CI", nothing) == "true",
129133
mathengine = Documenter.MathJax2(),
130134
collapselevel = 1,
135+
# Do no check for large pages.
136+
size_threshold_ignore = [
137+
"changelog.md",
138+
"release_notes.md",
139+
"reference/models.md",
140+
"reference/standard_form.md",
141+
"submodules/Bridges/list_of_bridges.md",
142+
"submodules/Bridges/reference.md",
143+
"submodules/Utilities/reference.md",
144+
],
131145
),
132146
clean = true,
133-
strict = true,
134147
linkcheck = true,
135148
linkcheck_ignore = [
136149
# Ignore the PDF link, because it hasn't been built yet.
@@ -168,7 +181,8 @@ if _PDF
168181
# includes lots of extraneous LaTeX files.
169182
cp(
170183
joinpath(@__DIR__, "latex_build", "MathOptInterface.pdf"),
171-
joinpath(@__DIR__, "build", "MathOptInterface.pdf"),
184+
joinpath(@__DIR__, "build", "MathOptInterface.pdf");
185+
force = true,
172186
)
173187
end
174188

docs/src/assets/custom.sty

Lines changed: 0 additions & 7 deletions
This file was deleted.

0 commit comments

Comments
 (0)