JuliaDocs / DocumenterTools.jl

Extra tools for setting up Documenter
Other
30 stars 19 forks source link

Another breakage w.r.t. Documenter v1 #82

Open Datseris opened 1 year ago

Datseris commented 1 year ago

After PR #81 my docs correctly install Documenter v1+ (https://github.com/JuliaDynamics/Attractors.jl/actions/runs/6321627234/job/17170682108?pr=94#step:4:331). However there is another breakage I can't seem to figure out:

https://github.com/JuliaDynamics/Attractors.jl/actions/runs/6321627234/job/17170682108?pr=94#step:5:1

To be clear of how we build the docs theme: we do

# Load documenter
using Documenter
using DocumenterTools: Themes
ENV["JULIA_DEBUG"] = "Documenter"
# download the themes
import Downloads
for file in ("juliadynamics-lightdefs.scss", "juliadynamics-darkdefs.scss", "juliadynamics-style.scss")
    Downloads.download("https://raw.githubusercontent.com/JuliaDynamics/doctheme/master/$file", joinpath(@__DIR__, file))
end
# create the themes
for w in ("light", "dark")
    header = read(joinpath(@__DIR__, "juliadynamics-style.scss"), String)
    theme = read(joinpath(@__DIR__, "juliadynamics-$(w)defs.scss"), String)
    write(joinpath(@__DIR__, "juliadynamics-$(w).scss"), header*"\n"*theme)
end
# compile the themes
Themes.compile(joinpath(@__DIR__, "juliadynamics-light.scss"), joinpath(@__DIR__, "src/assets/themes/documenter-light.css"))
Themes.compile(joinpath(@__DIR__, "juliadynamics-dark.scss"), joinpath(@__DIR__, "src/assets/themes/documenter-dark.css"))
mortenpi commented 1 year ago

I think it's probably because your SCSS files are outdated. Basically, it looks like there is some conflict between your SCSS and the Documenter ones it pulls in. I also had to fix it for Documenter in https://github.com/JuliaDocs/Documenter.jl/pull/2071#issuecomment-1469395962 with https://github.com/JuliaDocs/Documenter.jl/pull/2071/commits/8389ff0c24f97c97165b5c7e72500c4c5dcb9ead.