Skip to content

feat: allow to set title/level from preparser via frontmatter keys#2103

Merged
antfu merged 1 commit into
slidevjs:mainfrom
jgosmann:transform-title-level
Mar 5, 2025
Merged

feat: allow to set title/level from preparser via frontmatter keys#2103
antfu merged 1 commit into
slidevjs:mainfrom
jgosmann:transform-title-level

Conversation

@jgosmann

@jgosmann jgosmann commented Mar 4, 2025

Copy link
Copy Markdown
Contributor

I went with this solution as it doesn't change the transformSlide function signature. Otherwise, the change would either be breaking or we need to add the SlideInfo as redundant function argument (it also contains content and frontmatter). Having the whole SlideInfo might enable more use cases, but also might have the potential for modifications that shouldn't be done.

Closes #2095.

I went with this solution as it doesn't change the `transformSlide` function signature. Otherwise, the change would either be breaking or we need to add the SlideInfo as redundant function argument (it also contains `content` and `frontmatter`). Having the whole SlideInfo might enable more use cases, but also might have the potential for modifications that shouldn't be done.

Closes slidevjs#2095.
@netlify

netlify Bot commented Mar 4, 2025

Copy link
Copy Markdown

Deploy Preview for slidev ready!

Name Link
🔨 Latest commit 8fc1984
🔍 Latest deploy log https://app.netlify.com/sites/slidev/deploys/67c745ac50042d000842ac2a
😎 Deploy Preview https://deploy-preview-2103--slidev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@pkg-pr-new

pkg-pr-new Bot commented Mar 4, 2025

Copy link
Copy Markdown

Open in Stackblitz

@slidev/client

npm i https://pkg.pr.new/slidevjs/slidev/@slidev/client@2103

create-slidev

npm i https://pkg.pr.new/slidevjs/slidev/create-slidev@2103

create-slidev-theme

npm i https://pkg.pr.new/slidevjs/slidev/create-slidev-theme@2103

@slidev/parser

npm i https://pkg.pr.new/slidevjs/slidev/@slidev/parser@2103

@slidev/cli

npm i https://pkg.pr.new/slidevjs/slidev/@slidev/cli@2103

@slidev/types

npm i https://pkg.pr.new/slidevjs/slidev/@slidev/types@2103

commit: 8fc1984

@antfu
antfu merged commit cb0ac1b into slidevjs:main Mar 5, 2025
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

Successfully merging this pull request may close these issues.

Modifying title/level from a preparser

2 participants