slidev icon indicating copy to clipboard operation
slidev copied to clipboard

Add index page for multiple slides build

Open jaanli opened this issue 1 year ago • 1 comments

Describe the bug

Cannot host multiple entries.

Minimal reproduction

Steps to reproduce the behavior:

  1. Go to documentation: https://sli.dev/guide/hosting#multiple-builds

  2. Edit your build command in Vercel Screenshot 2024-07-31 at 06 54 41

  3. Verify that the build works locally

  4. Verify that the build fails and that no index is created.

To reproduce with code, see here:

https://github.com/onefact/talks.onefact.org (and see the dist directory from vite to see an example of how there is no index page from which to access multiple slide decks!)

Environment

  • Slidev version: latest (https://github.com/onefact/talks.onefact.org has the package-lock.json file if needed for specifics)
  • Browser: chrome / safari / firefox
  • OS: Sonoma 14.5 MBP

jaanli avatar Jul 31 '24 10:07 jaanli

In fact, currently, Slidev doesn't create an index page for your slides. slidev build a.md b.md is the same as slidev build a.md --out dist/a/ && slidev build b.md --out dist/b/. In your repo, it seems that the dist directory wasn't cleared after previous builds.

About how to host multiple slides, this discussion may help: https://github.com/slidevjs/slidev/discussions/1777#discussioncomment-10126886

kermanx avatar Jul 31 '24 14:07 kermanx