[Techtalk] sphinx rst-- generate 2 different HTML index pages from one source file

Carla Schroder carla at bratgrrl.com
Sat Mar 7 00:44:54 UTC 2015


Sorry, I am not getting it! How will that edit the contents of the file?
Look at my examples again-- one index.html has .org URLs, and the other
has .com URLs. If all I needed was the exact same file for both sites there
would be no problem :)


Carla

On Sat, 07 Mar 2015 09:17:25 +1000
Miriam English <mim at miriam-english.org> wrote:

> 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
> >
> 



-- 
++++++++++++++++++++++++++++++++++++++++
Ace Linux guru                         +
carlaschroder.com                      +
There's a dance in the old dame yet    +
++++++++++++++++++++++++++++++++++++++++


More information about the Techtalk mailing list