LuxDL / DocumenterVitepress.jl

Documentation with Documenter.jl and VitePress
https://luxdl.github.io/DocumenterVitepress.jl/
MIT License
73 stars 11 forks source link

Don't force inlining of svgs #157

Closed jkrumbiegel closed 3 months ago

jkrumbiegel commented 3 months ago

In Makie I noticed that the inlined images don't always look right and it would be simpler to just use separate files. So I've added this branch where the condition is checked which seems to be the reason that the previous workaround existed. Although I can't get a valid svg display anyway in Firefox if I remove the xmlns from a test string.

lazarusA commented 3 months ago

if we want this to be supported by default, we should add the setting also to the template.

Here: https://github.com/LuxDL/DocumenterVitepress.jl/blob/master/template/src/.vitepress/config.mts

Edit: Or mention the setting here, so that people know what to do: https://luxdl.github.io/DocumenterVitepress.jl/dev/mime_examples

Don't force inlining of svgs

::: info config.mts

 vite: {
    build: {
      assetsInlineLimit: 0, // so we can tell whether we have created inlined images or not, we don't let vite inline them
    }
  },

:::