emacsorphanage/org-page

Link support

lsankar4033 opened this issue · 8 comments

Is there a good way to define relative links to other parts of my org-page-site from a given page? Currently I'm just using absolute links based on my actual site URL, but that feels a bit janky.

Sorry, currently only image links are supported to convert automatically. :-(

tsdh commented

I'm using org-page since today and that's a question I've also just had. That would be a very welcome addition.

@KelvinH Images would have been my next question. Consider I write a posting with many images, where would I put the images and how would I link them?

Org-page do support image links and can convert them automatically, you can just put them in your repo, with a folder named like "images" or something else.

However, blog post links are hard to process, because they will change when converting from org to html, Org-page does not have the idea what the generated html file location is because user can define their own uri-generator.

tsdh commented

Couldn't you process all org files of all categories first building a hash-map from file names to generated URIs and then use that for adjusting the links?

WRT images, there's no restriction on where I put them, right? I'd possibly put then in a folder named according to the post so that I would have posts/Foo.org and posts/Foo/p1.jpg and posts/Foo/p2.jpg.

Yes, of course it could be done, I just say "hard" but not "can not", due to my limited free time on this project...

tsdh commented

Would you accept a PR for this in case I find some spare time?

Yes of course, definitely welcome!

I think this would be better to be in Org-mode built-in. I use Org-mode babel to generate inline image result link a lot.