Base url for HTML docs

10 views
Skip to first unread message

Andrew Scholer

unread,
Jun 16, 2026, 7:51:39 PM (4 days ago) Jun 16
to prete...@googlegroups.com
Mostly for Rob...

I need to set a <base> element in the <head> of some HTML pages with the document's base url on Runestone builds.

It looks like the base URL doesn't exist as a standalone template for RS books. The closest is in the canonical-link template, which makes a local site-root variable.

I can just copy that logic, but it looks like there is a TODO, attached to it, so maybe this is a spot to rework?

There is of course baseurl, which is closely related, but we don't seem to expect RS authors to set that manually.

Would it make sense to promote site-root to global? Or maybe we should we automatically set $baseurl for Runestone books? Or make some new thing?



Sean Fitzpatrick

unread,
Jun 16, 2026, 8:10:56 PM (4 days ago) Jun 16
to PreTeXt development
The baseurl is set in the publisher file, so the publisher file for Runestone could be configured to point to the right place. 

But it just occurred to me that I have not done this with APEX (or my other book on Runestone)!

However, this was likely due to ignorance of what the correct URL should be on Runestone. On the off chance that this is not just me, perhaps it would make sense to set the base URL automatically for Runestone builds. 
(Then my follow-up question is about what happens when the book is on a local Runestone server!)

--
You received this message because you are subscribed to the Google Groups "PreTeXt development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pretext-dev...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/pretext-dev/CACm44N-iNrYutBn7RAnn-6S%3DDAy_qEcURxk9zFPX5V0cc4pL0A%40mail.gmail.com.

Andrew Scholer

unread,
Jun 17, 2026, 2:24:35 PM (3 days ago) Jun 17
to prete...@googlegroups.com
Yes, if there is a baseurl, it would make sense to assume that it is the base to use. That way books on local Runestone servers can point to their own base.

But, absent a baseurl, how should I manufacture the default URL? That is the part that may intersect with the existing code and TODO note.



Reply all
Reply to author
Forward
0 new messages