pvojtechovsky / obsidian-link-with-alias

Obsidian plugin for handy creation of links and alias in front matter of target document
MIT License
33 stars 1 forks source link

[FEATURE REQUEST] Use command "Templater: create new note from template" to create new notes #19

Closed rsenna closed 4 months ago

rsenna commented 11 months ago

Describe the bug It seems that obsidian-link-with-alias uses always a frontmatter block with a single aliases field. That does not play well with the Folder Templates from the Templater plugin, which are note templates triggered when a new empty file is created in a given folder, and that define content to be added automatically to new notes, including fronmatter fields.

To Reproduce Steps to reproduce the behavior:

  1. Create ParentNote.md on the root folder of your vault
  2. If not already installed, make sure you install the Templater Plugin
  3. Configure Templater to use a specific template on the root folder. Make sure that template define content, such as multiple frontmatter fields.
  4. In ParentNote.md, select a text and use obsidian-link-with-alias to generate a new note (by using either "Create Link" or "Create link with alias" (at the root folder)
  5. The new note will not follow the template defined in the step 3

Expected behavior The created note should use the same template defined in the Templater plugin for the current folder

Screenshots

Additional Information

pvojtechovsky commented 11 months ago

Thanks for interesting idea and clear and understandable description. I think it is clear what you need. I would not call it bug, but feature request, because it is about integration of my plugin with Templater plugin.

I can imagine solution like this: Whenever link-with-alias plugin needs to create new file, it can try to detect whether Templater plugin is installed and to ask it to make new Note. Note that "Templater: create new note from template" command is probably an asynchronous process. It will be probably not so easy to detect when Templater is done with that. But I will do it somehow and then I can access new note and add there missing alias.

I expect effort on my side about 5 hours to do it.

As long as I don't need that feature for me, it makes no sense for me to do it for free. Feel free to create a Pull request here and I will gladly check it and integrate into my plugin.

If you are not developer or don't know any developer who can do it for You, then my price to implement this feature is 50€. If we agree on that price and delivery date, than you can pay it on ko-fi.com after I deliver the feature and you test it.