emacsorphanage / org-page

[INACTIVE] A static site generator based on Emacs and org mode.
674 stars 99 forks source link

Link support #194

Open lsankar4033 opened 8 years ago

lsankar4033 commented 8 years ago

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.

sillykelvin commented 8 years ago

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

tsdh commented 7 years ago

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?

sillykelvin commented 7 years ago

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 7 years ago

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.

sillykelvin commented 7 years ago

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 7 years ago

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

sillykelvin commented 7 years ago

Yes of course, definitely welcome!

stardiviner commented 7 years ago

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.