How to link to a header

Can a link refer to a block by its # header (<h2>, <h3>, …) or : definition term (<dt>), instead of its randomly generated ID that’s unpredictable/unmemorisable? I tried to do it with [[(page title)#(section header)]] as in HTML, but # seems to get treated as part of the page title.

I’m aware that block IDs can be copied/pasted, but manually doing that can slow down the writing process. Also, I think I have to manually label it anyway, by [](), not using (()). Pasting the ID as (()) without a label would be a problem: an ID can be lost, if I delete the block after moving its content to somewhere else, and then I wouldn’t be able to figure out what this random-alphanumeric label-less link was originally pointing to.

in logseq you don’t need to specify a page#section, all paragraphs/headings/content are divided in blocks.

to link to a block, use the type-ahed/auto-complete list : type (( (or use slash command /block reference) and start typing characters from the content you’re looking for - heading or content doesn’t matter. eg: ((test))
A list of matching blocks will appear, choose the desired block or refine the matches by typing more characters. Once you validate, the corresponding block-ID will be inserted under the hood (meaning that you can also use the workflow you described in your post above to achieve the same result : copy-paste the block-id instead of using auto-completion from the block content)
If you want to show an alternate display label rather than the actual content, then use : [display-label](((searchterm))) - this is based on markdown’s display alias syntax : [newname](link) where link is the ((block-reference))

you can also embed a block (display the whole block including its children) using {{embed (())}} (or slash command /block embed) using the same type-ahead/autocompletion workflow

useful links related to logseq’s onboarding :

1 Like

I think that the poster is referring to the fact that block embed does not identify information in headings which is a real drawback. I have been trying to embed some notes by searching for the heading, and I am unable to do this.