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

Router mode hash doesn't work with --with-clicks option when exporting to PDF #1599

Closed
biozz opened this issue May 17, 2024 · 0 comments · Fixed by #1603
Closed

Router mode hash doesn't work with --with-clicks option when exporting to PDF #1599

biozz opened this issue May 17, 2024 · 0 comments · Fixed by #1603
Labels
bug Something isn't working

Comments

@biozz
Copy link

biozz commented May 17, 2024

Describe the bug

When exporting slides with option --with-clicks and routerMode: 'hash' SliDev doesn't generate a slide per page for each click.

To Reproduce

  1. Create new slidev project
  2. Install playwright-chromium
  3. Go to package.json and add --with-clicks option to the export script.
  4. Replace the contents of the slides.md with:
---
layout: default
routerMode: 'hash'
---

<v-clicks depth="2">

- 1
  - 1.1
- 2

</v-clicks>
  1. Export the slides (pn export in my case)
  2. Open the PDF.

The PDF contains 1 slide.

Now comment-out routerMode and export again. The PDF contains 4 slides, as expected.

Desktop (please complete the following information):

  • OS: MacOS X 14
  • Browser: whatever version of Chromium comes with Playwright in playwright-chromium version 1.44.0
  • Slidev version: 0.49.2

If I may, one possible solution for the issue is to ignore routerMode when exporting. SliDev spins up its own server and there is no user interaction or any strict requirements about how the router should work.

@KermanX KermanX added the bug Something isn't working label May 21, 2024
KermanX added a commit to KermanX/slidev that referenced this issue May 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants