Best way to add internal link?

I am wondering how to add an internal link so I can jump inside a long-form page
I have tried HTML

<a href="#another-mark">anchor</a>
<h2 id="another-mark">link to anchor</h2>

But unfortunately, it failed to jump and instead, it opened a blank page.

The only thing that works is footnote.
For org syntax <<target>> does not work. I am not sure if markdown internal link works or not.

Also I have tried org ID as well. It does not work either.

1 Like

Same as my thread. There is no way to do this other than footnote.

I requested moderator to move my thread to bugs or feature request but with no effect yet.

@XRay Logseq has block references that work also across different pages. You can reference a block by typing (( and the content of the block to start a search. Or you can right click on any bullet point and copy the block reference for that block. Or again you can use Ctrl+C when editing a block and no word is selected.

The syntax look like these:

  • Block reference: ((5f43229a-a34c-4129-a989-408fe608c4f9))
  • Link to block: label

The links to blocks (and pages) are just Markdown links with block (or page) reference instead of a URL.


@km546 here on Discourse forum you need to use the @moderators handle.

1 Like

Thank you for the suggestions. I am well acquainted with block references, page references, and resource references in logseq. However, my use case requires jumping to specific elements within a text block, such as a particular paragraph, an embedded code snippet, or an image.

In my note system, blocks are treated with a formal structure, often accompanied by properties, tags, and followed by an org-block or org-drawer. Navigating to a reference within an org-drawer or code snippets proves challenging without establishing a footnote or a new block. Also please consider that in org syntax a code-snippet and lesser elements can only be put inside org-block. They are not logseq-block. (it may looks ok in logseq, but it looks horrible if you open it in other org editor as it is invalid org syntax).

Platforms like Obsidian permit internal linking with ^hash_tag or #anchor_alias. Similarly, org-mode employs <<target>> or [[org-id][alias]], facilitating links to locations beyond a headline/logseq-block. This feature would significantly enhance navigation within text blocks, catering to my specific requirements and long-form writing.

When I want to edit I see:

You cannot mention group moderators.
So I used report option to let then know.

Have you consider Markdown footnotes? They work in Logseq as long as anchor and note are visible on the same page.

Thanks for the suggestion. I am using org syntax footnote. But a footnote may not be the best solution.

  1. target is not highlighted. e.g. I can use <<This is a long paragraph that the link refers to ....... and it ends here>> with org syntax and if I jump to this place I know it is a reference text
  2. The footnote syntax works in a way that the logseq block has to begin with [fn:1]. And in most case it was put in the end of the page. But in my user case, I need to refer to a few words or a few lines inside another logseq-block. So not quite solve my problem.
    Aslo I am wondering why HTML target is not working in logseq? If I understand correctly, all org/md texts are represented in HTML, aren’t they?

If you use Developer Tools (Ctrl+Shift+i) to look at the HTML you can see that the URLs generated with href=#mark starts with the wrong path. I tried to correct it manually but Logseq just ignores #mark and open the page, not jumping to the mark.

That reminders me of an issue in GitHub.