xsf / xeps

Hosts the markup for all XMPP Protocol Extensions.
https://xmpp.org/extensions/
Other
126 stars 122 forks source link

Make Travis check for relative links #338

Open SamWhited opened 7 years ago

SamWhited commented 7 years ago

Right now several XEP's link to eachother via ./xep-whatever.html#somesection (eg. XEP-0374/XEP-0373). This makes them non-portable (eg. what if you have a single XEP outside of the XEP's directory, or you have a PDF?)

It's not immediately clear to me what the correct behavior is if you want to link to a specific section in another XEP. Thoughts welcome.

SamWhited commented 7 years ago

Someone in chat suggested that we might be able to use <baseuri/> (or whatever the HTML element is) for this (although we'd need a way to fix it for the PDFs as well).

horazont commented 7 years ago

Do we want links in PDFs to point to the HTML version or to the PDF version?

If the former is okay, we could define a generic &xepbase; entity which resolves to something like https://xmpp.org/extensions/xep. That allows use like <a href="&xepbase;-1234#somesection">…</a>.

Otherwise, we can introduce a custom element we handle in the XSL, or maybe a (dare to say) namespaced attribute on <a/> elements, like <a xsf:href="1234#somesection"/>.

SamWhited commented 4 years ago

I'd say we want to just always link to the HTML version. I wouldn't bother with &xepbase; though, it's not likely to ever change. Let's just make CI complain and people can put https://xmpp.org before the link. No need to do anything complicated.