-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
feat: browser exporter #1972
feat: browser exporter #1972
Conversation
✅ Deploy Preview for slidev ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
@slidev/client
@slidev/parser
create-slidev
@slidev/cli
create-slidev-theme
@slidev/types
commit: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's have it as experimental and ship it to iterates. I have some UI adjustment in mind but I think the feature wise is very solid already. Thanks a lot for working on it!
docs/custom/index.md
Outdated
@@ -27,6 +27,8 @@ keywords: keyword1,keyword2 | |||
|
|||
# enable presenter mode, can be boolean, 'dev' or 'build' | |||
presenter: true | |||
# enable exporting UI, can be boolean, 'dev' or 'build' | |||
exportingUI: dev |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think just export
would be good enough :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We already have an export
field in the headmatter:
# export options
# use export CLI options in camelCase format
# Learn more: https://sli.dev/guide/exporting.html
export:
format: pdf
timeout: 30000
dark: false
withClicks: false
withToc: false
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about export.browser
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
export.*
are correspondent to the CLI options of slidev export
, but there is't a --browser
CLI option, which may cause confusion 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess that would be fine. We could update the docs mentioning about that. The name exportingUI
feels a bit verbose and we don't usually have the concept of UI
. Or I don't know if we could call it exporter
to differentiate with the CLI export
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or browserExport
or browserExporter
to be more specific?
Let's have it and iterate on the main. I am open for better naming |
This PR introduces a new page on
/export
as an alternate to theslidev export
CLI.slidev
, the exporting URL will be shown.slidev export
, a tip will be shown to inform the user to use the exporting UI.Warning
Both PDF exporting and image capturing don't work well on Firefox. And I don't have a Safari to test.
The Approach
Screenshots (by 2024/12/5 11:55)
On non-Chromium or chrome<94:
Todos
Maybe adding some UI for #1732?