Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

export --format md --output dist/ produces dist/.md (and --output dist/slides.md fails) #1874

Open
vorburger opened this issue Sep 21, 2024 · 2 comments

Comments

@vorburger
Copy link
Contributor

Describe the bug

I would like to Export PNGs and Markdown... primarily so that I can send a PR to https://github.com/slidevjs/docs/blob/main/.vitepress/showcases.ts with a cover: ... 😄

In order for e.g. that Cover PNG to be available, I want it to be in my dist/, along side the HTML app/site, and the PDF which I'm also putting there.

I've tried export --format md --output dist/ - but that produces a dist/.md - note the "empty" filename, which is a bit weird, agreed?

Using export --dark --format md --output dist/slides.md fails, like this:

●■▲
Slidev v0.49.29

theme @slidev/theme-seriph
css engine unocss
entry /workspaces/LearningMachineLearning/docs/prez/sli.dev/slides.md
▲ rendering...[Error: EISDIR: illegal operation on a directory, open 'dist/slides.md'] {
errno: -21,
code: 'EISDIR',
syscall: 'open',
path: 'dist/slides.md'
}

Environment

  • Slidev version: 0.49.29

Proposal

Perhaps you would like consider permitting --output dist/slides.md and using that instead of defaulting to dist/.md ?

@vorburger
Copy link
Contributor Author

Oh... wait; so: Using export --format md --output dist/png works! (The difference being it not ending in a trailing slash.)

That produces dist/png.md and dist/png/*.png - which makes sense, actually.

Perhaps you would consider handling --output with trailing slash, and automagically chopping it? Just an idea.

Or do you want a PR with an update for a note about this in the doc?

@vorburger
Copy link
Contributor Author

Using export --format md --output dist/png works!

Actually, nope, that doesn't really "work" - the links in the MD are broken, they point to ./dist/png/1.png (instead of just png/1.png).

I'm working around this like this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant