Skip to content

Properly link to "internal" publications #66

@ardumont

Description

@ardumont

Linking to another page/post from the blog currently exports a file:// path.

Sample:

[[/permalink-to-another-blog-post]]

renders:

file:///permalink-to-another-blog-post

This is not what the users expect, they want a link to another post/page from
their own blog. Definitely a link which is browsable both locally (testing) and
remotely (without having to mention the full server url).

Indeed, manually removing file:// from the published post expectedly renders
a browsable link both locally and remotely.

The issue is within org-mode. If we don't write something sensible, link wise,
org-mode will, by default, refuse to export due to broken links. If we
deactivate the custom about broken link, the link disappears altogether when
the post is published/exported...

So that's not good.

Digging a bit further, aside modifying code, i think we cannot circumvent
this... But, we might be able to extend org-mode's hyperlink policy [1]

So I imagine something like adding a local or raw prefix to the link would
do. For example, the link could become (if I understood the doc right):

[[local:/permalink-to-another-blog-post]]

[1] https://orgmode.org/manual/Adding-Hyperlink-Types.html#Adding-Hyperlink-Types

@robertposthill might be interested as I started digging this when seeing his
question on stackexchange [2]. I started replying, but thought, first let's
check... Then, as it did not work ¯_(ツ)_/¯, started investigating [2]

[2] https://emacs.stackexchange.com/questions/58628/org2jekyll-and-links

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions