slidev icon indicating copy to clipboard operation
slidev copied to clipboard

`slidev build --output "$(pwd)/dist"` does not work

Open Davphla opened this issue 7 months ago • 1 comments

Describe the bug I would like to simply build slides from a directory presentation/slides.md, and receive my result in the root directory ./dist. But somehow, it does nothing — output is generated in relative directory.

I need it for hosting in Github Pages multiple presentation.

Minimal reproduction

  1. Created a markdown file at presentation/slides.md with basic Slidev syntax.

  2. Ran the command:

    npx slidev build presentation/slides.md --output dist  
    
  3. ./presentation/dist is created, and no output in ./dist.

Environment

  • Slidev version: v51.6.0
  • Browser: N/A
  • OS: Endehavour Arch Linux

Davphla avatar May 06 '25 20:05 Davphla

When using the slidev build command, note that the correct parameter for specifying the output directory is --out, not --output. The build process resolves paths relative to the input Markdown file's directory (the entry file). To achieve your desired output, use the following command format: npx slidev build presentation/slides.md --out ../dist

nekomoyi avatar May 21 '25 07:05 nekomoyi