How to create aliases and external links in Logseq

It’s also possible to link to pages outside of Logseq, i.e. websites. To point to a URL, either use the trigger menu by typing /link or use the keyboard shortcut Cmd-l (macOS)/Ctrl-l (Windows) to add the following shortcode to the block: [](). Between the brackets ([ ]), put the label (name) of the link. Between the parenthesis, put the URL:

[This is the label or name of the link](https://thisistheurl.com)

Apart from linking to pages outside of Logseq, you can also use the alias function to link to an internal page. This is handy for when you want to show a different label for an internal link. For example, [I worked on projects]([[Projects]]) will make the entire “I worked on projects” sentence clickable and point it to the Projects page.

Finally, for long page names that you use often it’s best to add a page alias. For example, you might want the link [[PKM]] as an alias pointing to the page Personal Knowledge Management. To do this, add the following in the first block of the page Personal Knowledge Management: alias:: PKM

Now, anytime you click a [[PKM]] link, you’ll end up on the Personal Knowledge Management page.

4 Likes

The functionality of aliases also allows multiple names for the same page.
Like on the page chicken with alias:: hen, rooster,chick.
It is done by listing them, separated with a comma each, with or without a space. This means you cannot create an alias with a , as part of it (at least at the moment, there is a feature request for making it possible with a backslash \, .

(This is not meant as a question or request, I just wanted to add this here as I found this page way quicker than the info on how to do this.)

It’s

alias:: [[Foo, bar]]

:slightly_smiling_face:

1 Like

Quick question, I noticed that LogSeq creates an extra (suppressed?) page just for the alias, which somewhat defeats the purpose. Is there a way to disable that, is this intended at all or a bug?
I think I used it correctly, because clicking at [[alias]] takes me to the desired [[main]], but when looking at the Graph view, there is always an extra node called “alias” between the node “main” and any nodes where I’ve referenced [[alias]].
I’ve included an image, where the page “Maximum Torque per Ampere” has the alias “MTPA”, which I used as reference in a publication page. Obviously having that node there just clutters the Graph view, and clicking on it takes me to the main page.
Capture

1 Like

Funnily enough, I just noticed that if you toggle “exclude-from-graph-view:: true”, the main node disappears from the Graph View, but the Alias node remais :smiley: