pvojtechovsky / obsidian-link-with-alias

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

[BUG] The alias is not added #20

Closed parm-is-coding closed 5 months ago

parm-is-coding commented 6 months ago

obsidian Added the new file properties header to store file data instead of front matter image I perfer to store my aliases in this table instead of as front matter for my file system.
Describe the solution you'd like In the same way you implemented your previous iteration i'd like the option to use the file properties table to store my aliases instead of as front matter. so in terms of logic

if(propertiesTable == True){ if(parseForTable == true && aliasfieldFound){ add(Alias) }else{ create properties table //maybe add template support add(Alias) }

}

parm-is-coding commented 6 months ago

example Here is a better example of what im talking about

pvojtechovsky commented 6 months ago

Thanks for reporting it. I was able to reproduce it. I see it as bug and will try to fix it probably during this weekend.

pvojtechovsky commented 6 months ago

There is a workaround for now. Type in first the text Confirmation, then select it and activate the command Create link with alias, that should work

pvojtechovsky commented 5 months ago

Hi @parm-is-coding I analyzed what is happening there on your video and I see that 1) The alias is not there when you just enter link like [[Confirmation]] because there is no link display text. In this case my plugin creates no alias. It is as designed. I think it makes no sense to create the alias with the name of the file 2) Later when you go back to the file which contains [[Confirmation]] link and you enter the display text "confirm", the plugin already forgot that your link is the one which should be handled, so it doesn't apply alias. Solution: activate the link with alias command again.

Note: If you enter [[Confirmation|confirm]] link directly from the beginning, then plugin works and the confirm alias should be automatically added.

So is there still something what needs to be fixed? Let me know. Thanks