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

FR: Remove empty lines inside YAML frontmatter #1237

Open
jericjan opened this issue Dec 5, 2024 · 1 comment
Open

FR: Remove empty lines inside YAML frontmatter #1237

jericjan opened this issue Dec 5, 2024 · 1 comment
Labels
rule suggestion Suggestion to add or edit a rule

Comments

@jericjan
Copy link

jericjan commented Dec 5, 2024

Is Your Feature Request Related to a Problem? Please Describe.

Due to some other plugin's behavior, my Obsidian vault has files that have YAML frontmatter with blank lines in them.

---

title: test

Date: 2023-11-27T10:00:00+08:00
lastMod: 2024-12-05T14:09:55+08:00
---

My problem is that Hugo doesn't like when it receives YAML like that, so it would be best that they are removed.

Describe the Solution You'd Like

Add a toggle that removes empty lines inside YAML frontmatter

Example:

---

title: test

Date: 2023-11-27T10:00:00+08:00
lastMod: 2024-12-05T14:09:55+08:00
---
---
title: test
Date: 2023-11-27T10:00:00+08:00
lastMod: 2024-12-05T14:09:55+08:00
---
@jericjan jericjan added the rule suggestion Suggestion to add or edit a rule label Dec 5, 2024
@pjkaufman
Copy link
Collaborator

Hey @jericjan . Have you tried using Compact YAML? It should do exactly what you are describing here with removing the empty blank lines in the YAML frontmatter.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
rule suggestion Suggestion to add or edit a rule
Projects
None yet
Development

No branches or pull requests

2 participants