beaussan / update-time-on-edit-obsidian

MIT License
165 stars 15 forks source link

I can' t use the templater function "Folder template" if I use this plugin #50

Closed lisasuosuo closed 1 year ago

lisasuosuo commented 1 year ago

If I use templater to create a new file in a folder , this plugin will add the YAML "update",so my template can't use.I think may be it has conflict with it.

beaussan commented 1 year ago

This should be fixed with the 2.0.1 version :tada: Feel free to reopen an issue if this is still an issue

lisasuosuo commented 1 year ago

It works! Thanks for your great work!

danielo515 commented 1 year ago

I have the 2.0.1 version, but I still get some weird things. For example, inserting a template the plugin gets triggered and I run into similar problems

beaussan commented 1 year ago

@danielo515 can you try updating to the latest version? And if that is still an issue, feel free to create a new issue with a reproduction. I use templater heavily and I don't have issues around using it with this plugin currently

danielo515 commented 1 year ago

sorry, what is the latest version? is not yet published?

danielo515 commented 1 year ago

Here is an example template for newly created note that conflicts with this plugin. By the time my template completes, this plugin has inserted a first front-matter:

<%*
  let title = tp.file.title
  if (title.startsWith("Untitled")) {
    title = await tp.system.prompt("Title");
    await tp.file.rename(title);
  } 
  const tags = ['type/']
_%>
---
tags: <% tags %>
aliases: 
title:  <%* tR += title %>
created: <% tp.date.now() %>
---

<%tp.file.cursor(1)%>
elvarb commented 1 year ago

Same issue here, happens most of the time with my templates. I think this is because this plugin triggers as soon as the page is created and we have issues as templates can be applied in many ways/steps when creating a page that uses a template.

Issues when...

No issues when...