Skip to content

Adds parse_frontmatter option, defaults to false#18

Merged
sotte merged 1 commit intosotte:mainfrom
neonvoidx:main
Sep 27, 2025
Merged

Adds parse_frontmatter option, defaults to false#18
sotte merged 1 commit intosotte:mainfrom
neonvoidx:main

Conversation

@neonvoidx
Copy link

📃 Summary

This will parse out frontmatter contained in ---. Example:

---
frontmatter
stuff
here
---

📸 Preview

Example markdown slides:

---
id: Slides Test
aliases: []
tags: []
---

#### Advanced Slides Obsidian Plugin 

 https://mszturc.github.io/obsidian-advanced-slides/

---

#### Code
```typescript
const x = () => {
   console.log("HELL WORLD")
}

If parse_frontmatter is set to `true` then first slide rendered in this example would be the Advanced Slides Obsidian Plugin section with link. If false, the frontmatter would be the first slide. 

To note: if you set parse_frontmatter to true, but your slides dont actually have frontmatter this wont work. I can't think of a good way to truly do this, I thought maybe we could see if the content inside the suspected frontmatter is in the format of key value like:

key: value

but obviously that's a naive approach and I think this is good enough (for now at least)


## 📝 Checklist

- [x] I ran `make all` locally and checked for errors.
- [x] I have updated the `CHANGELOG.md` file.

This will parse out frontmatter contained in `---`. Example:
```
---
frontmatter
stuff
here
---
```
@neonvoidx neonvoidx requested a review from sotte as a code owner September 26, 2025 15:07
@neonvoidx
Copy link
Author

Solves #12

Copy link
Owner

@sotte sotte left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR!

@sotte sotte merged commit e782459 into sotte:main Sep 27, 2025
3 checks passed
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.

3 participants