Skip to content

Commit

Permalink
Merge pull request #217 from LuxDL/la/logo_svg
Browse files Browse the repository at this point in the history
look for svg if png not avail
  • Loading branch information
lazarusA authored Feb 18, 2025
2 parents 863b4e1 + 1c320a7 commit b466913
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/vitepress_config.jl
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,8 @@ function modify_config_file(doc, settings, deploy_decision)
if occursin("logo:", config)
if isfile(joinpath(doc.user.build, settings.md_output_path, "public", "logo.png"))
push!(replacers, "logo: 'REPLACE_ME_DOCUMENTER_VITEPRESS'" => "logo: { src: '/logo.png', width: 24, height: 24}")
elseif isfile(joinpath(doc.user.build, settings.md_output_path, "public", "logo.svg"))
push!(replacers, "logo: 'REPLACE_ME_DOCUMENTER_VITEPRESS'" => "logo: { src: '/logo.svg', width: 24, height: 24}")
else
@warn "DocumenterVitepress: No logo.png file found in `docs/src/assets`. Skipping logo replacement."
push!(replacers, "logo: 'REPLACE_ME_DOCUMENTER_VITEPRESS'," => "")
Expand Down

0 comments on commit b466913

Please sign in to comment.