Skip to content

Standardize documentation plotting setup and prefer SVG output #549

Description

@ocots

Problem

The CTBase documentation build loads both Plots.jl and CairoMakie, but the plotting setup is not centralized in docs/make.jl. The current page-level setup disables PNG only for Plots.Plot, while CairoMakie is not explicitly configured to use SVG output.

With DocumenterVitepress, plot objects can advertise both image/png and image/svg+xml; PNG has the higher MIME priority and is selected unless PNG is disabled. This makes the generated documentation heavier and inconsistent with the desired vector output.

Proposed change

Update docs/make.jl so the global plotting setup:

  • uses using Plots and import CairoMakie;
  • activates CairoMakie with CairoMakie.activate!(; type="svg");
  • disables image/png for Plots.Plot;
  • disables image/png for CairoMakie.Makie.Figure.

Then remove redundant page-local MIME overrides and ensure all current and future @example blocks use SVG consistently.

Verification

julia --project=. docs/make.jl

The build should complete successfully and generate SVG assets without PNG plot assets.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions