When developing a theme, the create-slidev-theme template puts theme: ./ in the frontmatter (source). This adds a new root to Slidev's roots option, which coincides with the userRoot and should be deduplicated (source), but isn't because the theme contains a final slash and the user root does not.
As a result, when developing a theme, global layers are rendered twice because each duplicated root contributes one rendered global-top.vue for example.
Replacing theme: ./ with theme: . in the frontmatter works around the issue, fortunately.
Describe the bug
When developing a theme, the create-slidev-theme template puts
theme: ./
in the frontmatter (source). This adds a new root to Slidev's roots option, which coincides with the userRoot and should be deduplicated (source), but isn't because the theme contains a final slash and the user root does not.As a result, when developing a theme, global layers are rendered twice because each duplicated root contributes one rendered
global-top.vue
for example.Replacing
theme: ./
withtheme: .
in the frontmatter works around the issue, fortunately.Minimal reproduction
Steps to reproduce the behavior:
global-top.vue
file to the root of the theme, with some content.DEBUG=slidev:options
.roots
shows something like this:Environment