Skip to content

Commit

Permalink
feat: allow to set title/level from preparser via frontmatter keys (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
jgosmann authored Mar 5, 2025
1 parent 9f7e0d0 commit cb0ac1b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions packages/parser/src/core.ts
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,12 @@ export async function parse(
const newContent = await e.transformSlide(slide.content, slide.frontmatter)
if (newContent !== undefined)
slide.content = newContent
if (typeof slide.frontmatter.title === 'string') {
slide.title = slide.frontmatter.title
}
if (typeof slide.frontmatter.level === 'number') {
slide.level = slide.frontmatter.level
}
}
}
}
Expand Down

0 comments on commit cb0ac1b

Please sign in to comment.