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

Add support for reading frontmatter in TOML #19

Open
mscno opened this issue Nov 15, 2021 · 2 comments
Open

Add support for reading frontmatter in TOML #19

mscno opened this issue Nov 15, 2021 · 2 comments
Labels
enhancement New feature or request

Comments

@mscno
Copy link

mscno commented Nov 15, 2021

Currently the parser only supports frontmatter in yaml format:

---
title: "my title"
---

For compatability with other SSGs it would be cool to also support TOML format in the frontmatter

+++
title= "my title"
+++

The two are equivalent, but the toml is surrounded by +++ instead of ---.

As an example Zola SSG (getzola.org) supports both.

@begleynk
Copy link
Member

Thanks for opening this. Could you talk a bit about what you had in mind when you say "compatibility" with other SSGs? Just making it easier to move from another SSG to Doctave? Or did you have a specific case/workflow in mind?

This seems like a fine addition, but I think realistically it's going to be a bit lower priority compared to some larger features and important fixes coming up.

@begleynk begleynk added the enhancement New feature or request label Nov 19, 2021
@mscno
Copy link
Author

mscno commented Nov 19, 2021

The motivation was that I have a bunch of markdown files that are currently used in Zola. Zola supports reading toml files and these files were originally specified with toml frontmatter. In order to use these files with Doctave, Doctave would need to support reading toml frontmatter. However, I ended up migrating these files to yaml since Zola supports both formats.

Fully agree that this should be a lower priority enhancement, as there are workarounds available.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants