slidevjs / slidev

Presentation Slides for Developers
https://sli.dev
MIT License
33.08k stars 1.34k forks source link

Add index page for multiple slides build #1791

Open jaanli opened 2 months ago

jaanli commented 2 months ago

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

KermanX commented 2 months ago

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