Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion docs/make.jl
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,15 @@ using Test
using Coverage
using DifferentiationInterface
using Plots
import CairoMakie
using CairoMakie: CairoMakie, Makie # qualified `using`: loads CairoMakie and exposes
# CairoMakie/Makie without importing Makie's `plot`/`plot!`
# into Main (avoids clashing with Plots in `@docs` blocks).

# DocumenterVitepress picks the highest-priority MIME type a plot object responds to
# (image/png: 4.0 over image/svg+xml: 3.0) — the opposite of Documenter.HTML, which
# prefers SVG. Both Plots.jl and CairoMakie respond to `image/png`, so PNG wins for
# every figure unless it is disabled. Set once here so it covers every page, present
# or future. See Handbook/VITEPRESS-DOC.md "Plot image format — SVG vs PNG".
Base.showable(::MIME"image/png", ::Plots.Plot) = false
CairoMakie.activate!(; type="svg")
Base.showable(::MIME"image/png", ::CairoMakie.Makie.Figure) = false
Expand Down
Loading