At times, I need to use the same link at multiple places in a long document.
For those cases it would be useful to have link IDs like in markdown. From markdown syntax ref,
You can optionally use a space to separate the sets of brackets:
This is [an example] [id] reference-style link.
Then, anywhere in the document, you define your link label like this, on a line by itself:
[id]: http://example.com/ "Optional Title Here"
I believed that the Link Abbreviation in org-mode would work the same way (without tags) but it doesn't.
The purpose of link IDs is to have a central place for editing the links. A good location would be at the end of the document. Full links are defined in the ID but only the ID is used elsewhere in the document where we need to place the hyperlinks. When exporting, the IDs are replaced with the actual hyperlinks.
Benefits of this approach are,
- When the links change, we need to just modify the ID definitions. On exporting, the hyperlinks in the document will be updated to that.
- Faster hyperlink insertion when writing the document as one doesn't have to get and paste the full links every time. You type the IDs in the document and define them in a block at the end of the document.
[[Link][Link Name]]
. But the ID approach like in Markdown will be cleaner.