[Techtalk] sphinx rst-- generate 2 different HTML index pages from one source file
Carla Schroder
carla at bratgrrl.com
Fri Mar 6 18:20:09 UTC 2015
Hola techtalkers,
I have been assigned the task of creating a single source .rst file,
index.html, to create a documentation index for two domains, one .com
and one .org. The doc index is the same except for the domains, so the
output needs to look like this:
http://doc.example.com/admin_manual < print this link in index.html
only for the .com site
http://doc.example.org/admin_manual < print this link in index.html
only for the .org site
The site builder (Jenkins) automatically builds the manuals from a
single repo to both sites. That part is easy, because Sphinx' Make
targets automatically build both .com and .org versions, and then there
are two separate Jenkins jobs, one for .com and one for .org.
One option is to create two documentation index pages: one html and one
htm. But my overlords really want a single source page all full of
conditionals for html only, and I'm pretty sure it can be done. I know
how to to do simple subsitutions with .. ifconfig:: , but I haven't a
clue how to write conditionals that parse URLs for specific domains.
Sphinx is abundantly-documented, but unfortunately not in a very
helpful way.
TIA,
Carla
--
++++++++++++++++++++++++++++++++++++++++
Ace Linux guru +
carlaschroder.com +
There's a dance in the old dame yet +
++++++++++++++++++++++++++++++++++++++++
More information about the Techtalk
mailing list