Anonymous avatar Anonymous committed f28884e

Replace some XXXs on the index page.

Port the download page, still needs to be populated.

Comments (0)

Files changed (5)

 
 # 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/'
 
 # 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/'

sphinx/builder.py

         )
         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')),

sphinx/templates/index.html

 {% extends "layout.html" %}
 {% set title = 'Overview' %}
-{% set current_page_name = 'index' %}
 {% set page_links = [
   (pathto('@rss/recent'), 'application/rss+xml', 'Recent Comments')
 ] %}

sphinx/templates/sidebar.html

           {% 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>
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.