You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As I mentioned in issue #27, I would to use Org's [[file:path/to/file.org]] links to be able to browse Org files in Emacs the same way I would in a web browser.
But I just found an issue with this way of linking internal pages: If a have a link like [[file:example.txt]] in a post posts/post.org its rendered href HTML property (i.e. example.txt) will work just fine in a web browser, which will use the http://example.net/posts/ as the base URL. But the same won't work in RSS files causing it to be rendered as http://example.net/example.txt.
This issue won't happen if I link stuff using the form [[url_for:ROUTE,slug=SLUG]] because it generates an absolute URL but this might be an issue if you try to export this same file, let's say to Markdown, using org-publish. Also, if you use #+OPTIONS: toc, the anchored links it generates will also be relative and won't work in a RSS reader.
So my proposal here is to make post.html to always render internal links as absolute URLs.
The text was updated successfully, but these errors were encountered:
semente
changed the title
Make relative URLs in [{ post.html }} rendered as absolute URLs
Make relative URLs in {{ post.html }} rendered as absolute URLs
Feb 22, 2021
great find! thank you once again for the thoroughly written report 🙇🏾
I'll look for a setting that could be passed to ox-html to render links with absolute URLs!
As I mentioned in issue #27, I would to use Org's
[[file:path/to/file.org]]
links to be able to browse Org files in Emacs the same way I would in a web browser.But I just found an issue with this way of linking internal pages: If a have a link like
[[file:example.txt]]
in a postposts/post.org
its renderedhref
HTML property (i.e.example.txt
) will work just fine in a web browser, which will use thehttp://example.net/posts/
as the base URL. But the same won't work in RSS files causing it to be rendered ashttp://example.net/example.txt
.This issue won't happen if I link stuff using the form
[[url_for:ROUTE,slug=SLUG]]
because it generates an absolute URL but this might be an issue if you try to export this same file, let's say to Markdown, using org-publish. Also, if you use#+OPTIONS: toc
, the anchored links it generates will also be relative and won't work in a RSS reader.So my proposal here is to make
post.html
to always render internal links as absolute URLs.The text was updated successfully, but these errors were encountered: