Skip to content

Conversation

@jzyinq
Copy link

@jzyinq jzyinq commented Sep 1, 2025

Fixes #96

@jzyinq jzyinq changed the title @merwok fix for content metadata key conflict fix for content metadata key conflict Sep 2, 2025
@eyeseast
Copy link
Owner

Sorry to let this sit so long. I appreciate it.

I tested this locally, and there's another issue, which is my fault: There are two ways to serialize the resulting post to a dictionary, and they give different results.

---
content: bad key
---

Ooops!
>>> import frontmatter
>>> p = frontmatter.load('oops.md')
>>> p.content
'Ooops!'
>>> dict(p)
{'content': 'bad key'}
>>> p['content']
'bad key
>>> p.metadata
{'content': 'bad key'}
>>> p.to_dict()
{'content': 'Ooops!'}

So that's a problem, and it needs a decision more than a technical solution. No matter what, it's going to be a breaking change somewhere.

@jzyinq
Copy link
Author

jzyinq commented Dec 19, 2025

I understand, but do you plan to release a new major version then? It seems that in the end, making new major with instruction how to migrate will be beneficial for many ppl anyway.

I see that many forks are created just to add that fix.

@eyeseast
Copy link
Owner

I will push a new release soon, just haven't had time yet with work stuff. I need to decide on this one and pull together any other breaking changes.

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.

Using 'content' as a metadata key breaks frontmatter

2 participants