platers / obsidian-linter

An Obsidian plugin that formats and styles your notes with a focus on configurability and extensibility.
https://platers.github.io/obsidian-linter/
MIT License
1.19k stars 80 forks source link

FR: `YAML Timestamp` section is wonderful, but it needs to ignore your templates. #1156

Closed businessBoris closed 4 weeks ago

businessBoris commented 4 weeks ago

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

The Linter YAML timestamp section is exactly what I've been looking for. Keep my timestamps updated or static as the case may be.

However, if after making use of YAML Timestamp very happily, you are unfortunate enough to load a template into Obsidian, your template fields are overwritten with the templates 'real' values. Not optimal.

Describe the Solution You'd Like

Avoid all directories nominated as Template directories. Provide the user a field to provide the user's template directory [1] to avoid any template directory linting replacing template<% %> etc expressions with 'absolute values'.

[1] It is suggested that the Template core plugin for Obsidian is turned off if the Templater third-party plugin is being used. The template directory in core-plugin Templates is not reliable.

Describe Alternatives You've Considered

The alternative would be to scan the JSON created by Templater, Periodic Notes, and others looking to pick up their values. Not realistic and subject to change without notice.

Obsidian/.obsidian/plugins/templater-obsidian/data.json
3:  "templates_folder": "Templates",

Thank you for your excellent work.

pjkaufman commented 4 weeks ago

@businessBoris , Thanks for the feedback. Could you explain how folders to ignore is not adequate for this already?

businessBoris commented 4 weeks ago

I'm sorry, @pjkaufman, I can't! I messed up. I haven't seen that field before. Profuse apologies.

pjkaufman commented 4 weeks ago

No worries. It might help if you search the Linter's website when you are looking to see if a feature exists. Here is the link to the documentation website: https://platers.github.io/obsidian-linter/