> > I made the original FR. I use AstroJS in my blog. It requires using > > relative URLs to link between pages. Details here: > > https://docs.astro.build/en/basics/astro-pages/#link-between-pages. > > > > I think, it would be too complicated to have such links as valid links > > Org buffers as you'd need to implement the routing logic of the web > > framework (in this case AstroJS) which varies across users. You'd need to > > find how a relative URL > > maps to user's content directory structure. For example, a user can have a > > URL > > in his site like https://a.b.com/articles/someawesomearticle, and that > > may be located in src/content/someawesomearticle under his site project > > root. Whereas another user > > can use a URL as simple as https://a.b.com/someawesomearticle, but have > > his content source in src/content/articles/someawesomearticle. The URL > > structure is decided by how the user implemented routing logic of his > > website under pages/ subdirectory. > > I do not see much problem. > Similar to how we prepend custom header according to > #+HTML_LINK_HOME: > we can replace that header. > For example, > > #+HTML_LINK_HOME: https://www.example.com > > [[https://www.example.com/page/subpage/foo.html]] can be automatically > exported to <a href="/page/subpage/foo.html"> ... </a> > > That way, we will even keep the actual Org links inside the buffer working. >
If I understand you correctly, you are basically saying that ox-md should just recognize `org-html-link-home'? ox-md is derived from ox-html so I think that is already the case. So really all I would need to do is add a variable like `org-html-home/up-format' to ox-md and then add special handling in the case `org-html-link-home' or `org-html-link-up' is defined, similar to what `org-html-template' does? > My major concern is that the patch implemented this feature for all > export backends, not just html. That implied that it should be useful > beyond html export - very different from what you describe. > > > And, regarding the other issues you mentioned, I never used those Org > > mode features. So, I have no idea about them. Maybe with a bit more > > explanation, I can help. Thank you. > > I mostly listed other part of Org that are broken when using the > proposed patch (not feature, but the specific implementation proposed in > the patch). > My bad. I didn't want to write the same code for ox-html and ox-md so I did this instead. I should've looked at some way to make this export backend dependent. Le mar. 16 juin 2026 à 22:36, Khalid Rafi <[email protected]> a écrit : > > Ah, yes, that way we can avoid broken links though it refers to the > website itself and not the actual Org source file. Another issue that may > arise is when user is writing a draft not yet published on his > website. But, that may not be significant. And, yes, this patch only > makes sense for html or markdown export. > -- > Khalid Rafi > Sent with Emacs
