[Techtalk] sphinx rst-- generate 2 different HTML index pages from one source file
Miriam English
mim at miriam-english.org
Fri Mar 6 23:17:25 UTC 2015
Hi Carla,
I may be barking up the wrong tree completely and misunderstanding what
you want, but it sounds like a symbolic link is all that's required. So
you could, for instance make the .htm a link to the .html file. That way
when you update the .html file nothing needs to be done for the .htm one
because when fetched it will still actually be the .html one.
Cheers,
- Miriam
On 07/03/15 04:20, Carla Schroder wrote:
>
> 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
>
--
If you don't have any failures then you're not trying hard enough.
- Dr. Charles Elachi, director of NASA's Jet Propulsion Laboratory
-----
Website: http://miriam-english.org
Blogs: http://miriam-e.dreamwidth.org
http://miriam-e.livejournal.com
More information about the Techtalk
mailing list