Skip to content

Build multiple decks doesn't update base #2368

@mAAdhaTTah

Description

@mAAdhaTTah

Describe the bug

I have multiple decks that I run the build for accordingly: slidev build --base /talks/ --out public/talks talks/*.md. Those multiple decks are correctly output into public/talks/deck-1 and public/talks/deck-2 respectively. However, the assets path injected into the index.html files generated is only prefixed with /talks/, rather than /talks/deck-1 respectively, so the relevant assets aren't found when the deck is served from /talks/deck-1/assets where they live.

Minimal reproduction

Steps to reproduce the behavior:

  1. Create multiple decks
  2. Run the build command with a glob for multiple decks
  3. See that they're correctly output into individual folders
  4. See that the assets path don't reference those folders.

I can push an example to my personal site where I'm trying to configure this if it's helpful. Feasibly, I could also figure out a workaround (glob all of the files, iterate over them and call build with the proper base & out) if this isn't considered a bug but given the support for building multiple decks, I'm thinking it is.

Environment

  • Slidev version: 52.8.0
  • Browser: Chrome
  • OS: Mac OS

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions