Commits

Anonymous committed 1aad046

Beginnings of epub work. An epub can now be produced easily, and will not contain the extra header/footer/sidebar that would be expected for the web site.

Comments (0)

Files changed (4)

 *~
 toscasample/dist/
 main/Pagination/*.zip
-devdata.db
+devdata.db
+*.egg-info/*
 	@echo
 	@echo "Build finished. The HTML pages are in _build/html."
 
+epub:
+	mkdir -p _build/epub _build/doctress
+	$(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) _build/epub
+	@echo
+	@echo "Build finished. The epub is in _build/html"
 web:
 	mkdir -p _build/web _build/doctrees
 	$(SPHINXBUILD) -b web $(ALLSPHINXOPTS) _build/web

docs/_templates/layout.html

 {% block relbar1 %}{% endblock %}
 
 {% block sidebar1 %}
+{% if not embedded %}
 <!--[if gte IE 5.5]>
 <![if lt IE 7]>
 <style type="text/css">
   </ul>
   
 </div>
+{% endif %}
 {% endblock %}
 
 {% block rootrellink %}
+{% if not embedded %}
   <li>
   <a href="{{ pathto('index') }}"><b>TurboGears--{{ release }}</b></a>
   </li>
+{% endif %}
 {% endblock %}
 
 {% block relbaritems %}
+{% if not embedded %}
   {% if current_page_name != 'index' %}
     <li> <b>/</b> <a href="{{ pathto(current_page_name) }}">{{ title }}</a></li>
   {% endif %}
+{% endif %}
 {% endblock %}
 
 {%- block document %}
       {%- endif %}
           <div class="body">
             {% block body %}{% endblock %}
+{% if not embedded %}
             <div id="disqus_thread"></div><script type="text/javascript" src="http://disqus.com/forums/tg-site/embed.js"></script><noscript><a href="http://tg-site.disqus.com/?url=ref">View the discussion thread.</a></noscript>
           </div>
+{% endif %}
       {%- if builder != 'htmlhelp' %}
         </div>
       {%- endif %}
 {% block footer %}
 {{ super() }}
 
+{% if not embedded %}
 <script type="text/javascript">
 //<![CDATA[
 (function() {
 pageTracker._trackPageview();
 } catch(err) {}</script>
 
+{% endif %}
 {% endblock %}
 # Output file base name for HTML help builder.
 htmlhelp_basename = 'TG2doc'
 
+# Options for epub output
+# -----------------------
+epub_basename = 'TurboGears_2.1'
+epub_title = 'TurboGears Documentation for Version ' + release
+epub_author = 'TurboGears Documentation Team'
+epub_language = 'en'
+epub_publisher = 'TurboGears'
+epub_identifier = 'http://www.turbogears.org/'
+epub_scheme = 'URL'
+epub_pre_files = []
+epub_post_files = []
+epub_exclude_files = ['_downloads/ToscaSample-0.2dev.zip', '_static/doctools.js', '_static/underscore.js',
+                      '_static/screenshot.tiff', '_static/searchtools.js', '_static/turbogears.pdf',
+                      '_static/ToscaWidgetsFormsExample.zip', '_static/trunk.zip', '_static/jquery.js',
+                      '_static/Wiki20_final.zip', '_static/tutorials/Helloworld.zip', '_static/tutorials/Wiki-20.zip',
+                      '_static/tutorials/sqlautocode/moviedemo.db'
+                      ]
+epub_tocdepth = 2
 
 # Options for LaTeX output
 # ------------------------
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.