Use case: I am reading a main document (.md) where I would like to make certain key-word links to sub-documents.
One example text in the main document is: “three main ways to call AWS APIs.”.
A sub-document would be API.md and to that document I would like to link any instance of the word, word variation or word phrases, such as “API”; “APIs”; “AWS APIs”.
To that document Alias I added : APIs; AW APIs;
In the main document, where there are instances of “AW APIs”, when I select: tools > item links > convert wikilinks to item links, the display updates to show for “AW APIs” : AWS APIs](x-DEVONthink-item://E5C309F4-E877-4BBC-AC00-297B3A5D6C32)
Two links are shown, one does not work (a [ is added), the second jumps to the API document.
Note: " are added to highlight the word. Not using quotes in the words.
Questions: what can I do to achieve my objective? (link multiple words or phrases to a single .md file. (without causing this type of link error to appear))
Also, when I delete the link, the word or phrase are visible with a link. It is only when I run the ‘convert wikilinks’ that it shows the link, as explained.
Discourse uses markdown to format posts. If you just paste directly from the document, all we see is rendered text. Or in this case what looks like half-rendered, broken formatting.
We need to see the raw markdown to understand what is going on. Wrap the markdown source in a code block.
"why are you converting them to item links? " As I have read in multiple instances, item links are more persistent when moving them around. I will eventually move the documents around.
Sub-document, yes, my convention, used as a way to distinguish the main document with mixed topics, and the separate document where I am focusing on one topic.
You define an alias consisting of multiple words. One of those words is already defined as an alias on its own. I’m not sure how you expect that to work?
You have created a situation with conflicting aliases / multiple matches for the same string.
I guess one could imagine WikiLinks would prioritize the longest of the aliases. I don’t know how this works under the hood and if that is feasible.
Here you instead get 2 links – one for the alias AWS APIs, one for AWS, but tangled up in each other.
In the aliases: APIs; AWS APIs;
The one that is causing problems is the AWS APIs, because, as mentioned by @troejgaard, the world APIs is already mentioned. I tried adding quotes “AWS APIs” to distinguish as a separate word/phrase but that did not work. Can you suggest another method?
I would like to treat instances of API; APIs and AWS APIs as separate but linking to the same document. Perhaps it is not possible in a simple way.
I never really started using aliases. I do uses WikiLinks some of the time. But I don’t have a lot of experience with how they interact.
I think the problem is that you have enabled “Names and Aliases”. This detects WikiLinks based on matching names and aliases everywhere in the text automatically.
It works here if I only enable square brackets. Then you define the string boundary yourself, and DT doesn’t automatically detect 2 aliases in the same string. (I’m still on DT3 if that makes a difference)
I just gave a random document the aliases Test Alias; Alias.
Another thing worth raising (though I am sure you are aware) is that in settings -> wikiLinks you can create a template for a document if it doesn’t yet exist.
So you can put [[ ]] around a word/phrase then click on it and a document will be created to the template you have defined in settings. Using placeholders you can set things like a title, creation date or a link back to the source document.