Skip to content

Commit

Permalink
[docs] update to Documenter@1 (#2266)
Browse files Browse the repository at this point in the history
  • Loading branch information
blegat authored Sep 18, 2023
1 parent 2e39090 commit e98bee2
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 11 deletions.
8 changes: 7 additions & 1 deletion .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,13 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # For authentication with GitHub Actions token
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }} # For authentication with SSH deploy key
run: julia --project=docs/ docs/make.jl
DOCUMENTER_LATEX_DEBUG: ${{ github.workspace }}/latex-debug-logs
run: julia --color=yes --project=docs/ docs/make.jl
- uses: actions/upload-artifact@v3
if: ${{ always() }}
with:
name: PDF build logs
path: ${{ github.workspace }}/latex-debug-logs
- uses: errata-ai/vale-action@reviewdog
with:
files: docs/src
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ test/Benchmarks/*.json
Manifest.toml
*.swp
docs/src/release_notes.md
docs/src/MathOptInterface.pdf
2 changes: 1 addition & 1 deletion docs/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ JSONSchema = "7d188eb4-7ad8-530c-ae41-71a32a6d4692"
MathOptInterface = "b8f27783-ece8-5eb3-8dc8-9495eed66fee"

[compat]
Documenter = "0.27.10"
Documenter = "1"
JSON = "0.21"
JSONSchema = "1"
18 changes: 16 additions & 2 deletions docs/make.jl
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,10 @@ end
# Build the HTML docs
# ==============================================================================

# Needed to make Documenter think that there is a PDF in the right place when
# link checking. Inn production we replace this by running the LaTeX build.
write(joinpath(@__DIR__, "src", "MathOptInterface.pdf"), "")

@time Documenter.makedocs(
sitename = "MathOptInterface",
authors = "The JuMP core developers and contributors",
Expand All @@ -128,9 +132,18 @@ end
prettyurls = get(ENV, "CI", nothing) == "true",
mathengine = Documenter.MathJax2(),
collapselevel = 1,
# Do no check for large pages.
size_threshold_ignore = [
"changelog.md",
"release_notes.md",
"reference/models.md",
"reference/standard_form.md",
"submodules/Bridges/list_of_bridges.md",
"submodules/Bridges/reference.md",
"submodules/Utilities/reference.md",
],
),
clean = true,
strict = true,
linkcheck = true,
linkcheck_ignore = [
# Ignore the PDF link, because it hasn't been built yet.
Expand Down Expand Up @@ -168,7 +181,8 @@ if _PDF
# includes lots of extraneous LaTeX files.
cp(
joinpath(@__DIR__, "latex_build", "MathOptInterface.pdf"),
joinpath(@__DIR__, "build", "MathOptInterface.pdf"),
joinpath(@__DIR__, "build", "MathOptInterface.pdf");
force = true,
)
end

Expand Down
7 changes: 0 additions & 7 deletions docs/src/assets/custom.sty

This file was deleted.

0 comments on commit e98bee2

Please sign in to comment.