Open dlleigh opened 3 months ago
This is an excellent suggestion and I would also very much appreciate this kind of rule. My usecase is slightly different:
First H1 or Filename if H1 is missing
Proposed solution: It would be excellent if before running the 'Insert title into YAML' rule there could be a simple check: If the property 'title' is not empty, do nothing.
Thank you for the brilliant Linter plug-in!
Is Your Feature Request Related to a Problem? Please Describe.
I recently started creating all new notes with a timestamp filename and a descriptive
title
property. My older notes have a descriptive filename that includes a datestamp and have notitle
property. I would like to update all old notes to have atitle
property that matches the descriptive filename.The yaml-title rule works well for creating the desired property on the old notes, however it also replaces the descriptive title on the new notes that already have this property.
Describe the Solution You'd Like
I would like the yaml-title rule to optionally ignore files which already have the "title" key with a value.
Please include an example where applicable:
With the ignore option set:
expected outcome:
With the ignore option not set:
expected outcome:
Describe Alternatives You've Considered
The option to ignore existing keys & values could be rule-specific or a high-level option could potentially apply to multiple rules. The rule-specific implementation seems much more straightforward.