[Python-checkins] r56738 - in doctools/trunk: Doc-26/conf.py Doc-3k/conf.py sphinx/builder.py sphinx/templates/index.html sphinx/templates/sidebar.html

georg.brandl python-checkins at python.org
Sat Aug 4 19:16:56 CEST 2007


Author: georg.brandl
Date: Sat Aug  4 19:16:56 2007
New Revision: 56738

Modified:
   doctools/trunk/Doc-26/conf.py
   doctools/trunk/Doc-3k/conf.py
   doctools/trunk/sphinx/builder.py
   doctools/trunk/sphinx/templates/index.html
   doctools/trunk/sphinx/templates/sidebar.html
Log:
Replace some XXXs on the index page.

Port the download page, still needs to be populated.


Modified: doctools/trunk/Doc-26/conf.py
==============================================================================
--- doctools/trunk/Doc-26/conf.py	(original)
+++ doctools/trunk/Doc-26/conf.py	Sat Aug  4 19:16:56 2007
@@ -46,3 +46,6 @@
 
 # If true, '()' will be appended to :func: etc. cross-reference text.
 add_function_parentheses = True
+
+# The base URL for download links.
+download_base_url = 'http://docs.python.org/ftp/python/doc/'

Modified: doctools/trunk/Doc-3k/conf.py
==============================================================================
--- doctools/trunk/Doc-3k/conf.py	(original)
+++ doctools/trunk/Doc-3k/conf.py	Sat Aug  4 19:16:56 2007
@@ -47,3 +47,6 @@
 
 # If true, '()' will be appended to :func: etc. cross-reference text.
 add_function_parentheses = True
+
+# The base URL for download links.
+download_base_url = 'http://docs.python.org/ftp/python/doc/'

Modified: doctools/trunk/sphinx/builder.py
==============================================================================
--- doctools/trunk/sphinx/builder.py	(original)
+++ doctools/trunk/sphinx/builder.py	Sat Aug  4 19:16:56 2007
@@ -441,6 +441,14 @@
         )
         self.handle_file('modindex.rst', modindexcontext, 'modindex')
 
+        # the download page
+        downloadcontext = dict(
+            pathto = relpath_to(self, self.get_target_uri('download.rst')),
+            current_page_name = 'download',
+            download_base_url = self.config['download_base_url'],
+        )
+        self.handle_file('download.rst', downloadcontext, 'download')
+
         # the index page
         indexcontext = dict(
             pathto = relpath_to(self, self.get_target_uri('index.rst')),

Modified: doctools/trunk/sphinx/templates/index.html
==============================================================================
--- doctools/trunk/sphinx/templates/index.html	(original)
+++ doctools/trunk/sphinx/templates/index.html	Sat Aug  4 19:16:56 2007
@@ -1,6 +1,5 @@
 {% extends "layout.html" %}
 {% set title = 'Overview' %}
-{% set current_page_name = 'index' %}
 {% set page_links = [
   (pathto('@rss/recent'), 'application/rss+xml', 'Recent Comments')
 ] %}

Modified: doctools/trunk/sphinx/templates/sidebar.html
==============================================================================
--- doctools/trunk/sphinx/templates/sidebar.html	(original)
+++ doctools/trunk/sphinx/templates/sidebar.html	Sat Aug  4 19:16:56 2007
@@ -28,13 +28,24 @@
           {% endif %}
           {% if current_page_name == "index" %}
             <h3>Download</h3>
-            <p>
-              XXX: Add download links here.
-            </p>
-            <h3>Old docs</h3>
-            <p>
-              XXX: Add links to old docs/essays/etc. here.
-            </p>
+            <p><a href="{{ pathto('download.rst')|e }}">Download these documents</a></p>
+            <h3>Other resources</h3>
+            <ul>
+              {# XXX: many of these should probably be merged in the main docs #}
+              <li><a href="http://www.python.org/doc/faq/">FAQs</a></li>
+              <li><a href="http://www.python.org/doc/intros/">Introductions</a></li>
+              <li><a href="http://www.python.org/doc/essays/">Guido's Essays</a></li>
+              <li><a href="http://www.python.org/doc/newstyle/">New-style Classes</a></li>
+              <li><a href="http://www.python.org/dev/peps/">PEP Index</a></li>
+              <li><a href="http://wiki.python.org/moin/BeginnersGuide">Beginner's Guide</a></li>
+              <li><a href="http://www.python.org/topics/">Topic Guides</a></li>
+              <li><a href="http://wiki.python.org/moin/PythonBooks">Book List</a></li>
+              <li><a href="http://www.python.org/doc/av/">Audio/Visual Talks</a></li>
+              <li><a href="http://www.python.org/doc/other/">Other Doc Collections</a></li>
+              <li>&nbsp;</li>
+              <li><a href="http://www.python.org/doc/versions/">Previous versions</a></li>
+              <li>&nbsp;</li>
+            </ul>
           {% endif %}
           {% if current_page_name != "search" %}
             <h3>{{ builder == 'web' and 'Keyword' or 'Quick' }} search</h3>


More information about the Python-checkins mailing list