2009/5/4 Jose Guzman <[email protected]>

>
> Actually what I wanted to do, is to have one main
> documentation project with access to 3 or 4 small documentation pieces
> inside that (everyone in subdirectories under the main project
> directory). This is similar to the python DOCUMENTATION page, you can
> see it here : http://docs.python.org/.
>

Jose,

You need to create a new template for the index page for this to work. So in
the "_templates" directory, you need to add these files:

1) File '_templates/index.html

--------------------------------------------------------------------------------------------
{% extends "layout.html" %}
{% set title = 'Home' %}
{% block body %}

   <h1>{{ docstitle }}</h1>
   <p>This is the official documentation for {{project}} {{release}}.</p>

   <h2>Sections</h2>
   <table class="contentstable" align="center">
      <tr valign="top"><td width="50%">
      <p class="biglink">
         <a class="biglink" href="{{ pathto('overview') }}">
            Overview</a><br>
         <span class="linkdescr">
            Get started with {{project}}.
         </span></p>

      <p class="biglink">
         <a class="biglink" href="{{ pathto('install') }}">
            Installation Steps</a><br>
         <span class="linkdescr">
            Quickly install {{project}} to your system.
         </span></p>

      <p class="biglink">
         <a class="biglink" href="{{ pathto('developers') }}">
            Developers Reference</a><br>
         <span class="linkdescr">
            Overview of what's in {{project}} and how to use it.
         </span></p>

   </td><td width="50%">

      <p class="biglink">
         <a class="biglink" href="{{ pathto('changelog') }}">
            What's new in {{project}}?</a><br>
         <span class="linkdescr">
            Changes made in each {{project}} release.
         </span></p>

      <p class="biglink">
         <a class="biglink" href="{{ pathto('license') }}">
            License Info</a><br>
         <span class="linkdescr">
            How you can use this software and the source code.
         </span></p>

   </td></tr></table>

   <h2>Indices and Tables</h2>

   <table class="contentstable" align="center">
      <tr valign="top"><td width="50%">
      <p class="biglink">
         <a class="biglink" href="{{ pathto('contents') }}">
            Table of Contents</a><br>
         <span class="linkdescr">
            Lists all sections and subsections.
         </span></p>

      <p class="biglink">
         <a class="biglink" href="{{ pathto('search') }}">
            Search Page</a><br>
         <span class="linkdescr">
            Search this documentation.
         </span></p>

      </td><td width="50%">

      <p class="biglink">
         <a class="biglink" href="{{ pathto('genindex') }}">
            Index</a><br>
         <span class="linkdescr">
            All functions, classes, terms.
         </span></p>

    </td></tr></table>

{% endblock %}
--------------------------------------------------------------------------------------------

2) File "_templates/layout.html"
--------------------------------------------------------------------------------------------
{% extends "!layout.html" %}

{# put the sidebar before the body #}
{% block sidebar1 %}{{ sidebar() }}{% endblock %}
{% block sidebar2 %}{% endblock %}

{# update static links in the relbar #}
{% block rootrellink %}
<li><a href={{ pathto('index') }}>Docs Home </a> |&nbsp;</li>
<li><a href={{ pathto(master_doc) }}>TOC </a> |&nbsp;</li>
<li><a href={{ pathto('search') }}>Search </a></li>
{% endblock %}
--------------------------------------------------------------------------------------------


After all that is done, make sure you "conf.py" Sphinx file does NOT
reference "index", but in this case "context" as your top level reST file.

--------------------------------------------------------------------------------------------
...
master_doc = 'contents'
...
latex_documents = [
  ('contents', 'Project.tex', u'Project Documentation', u'Author's Name',
'manual'),
]
...
--------------------------------------------------------------------------------------------


Hope that gets you started.

- Casey

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sphinx-dev" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/sphinx-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to