mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Merged revisions 64733,64743,64755,64795,64803 via svnmerge from
svn+ssh://pythondev@svn.python.org/doctools/branches/0.4.x ........ r64733 | georg.brandl | 2008-07-05 17:04:12 +0200 (Sat, 05 Jul 2008) | 2 lines Ask for common extensions in quickstart. ........ r64743 | georg.brandl | 2008-07-05 18:34:55 +0200 (Sat, 05 Jul 2008) | 2 lines Add a direct link to the examples page. ........ r64755 | georg.brandl | 2008-07-06 07:32:09 +0200 (Sun, 06 Jul 2008) | 2 lines Backport r64750. ........ r64795 | georg.brandl | 2008-07-08 16:48:58 +0200 (Tue, 08 Jul 2008) | 2 lines Use correct filename extension in search. ........ r64803 | georg.brandl | 2008-07-08 20:46:49 +0200 (Tue, 08 Jul 2008) | 2 lines Accept class options for modules too. ........
This commit is contained in:
parent
aa74c0b799
commit
4fb3723102
3
doc/_templates/index.html
vendored
3
doc/_templates/index.html
vendored
@ -44,6 +44,9 @@
|
|||||||
You can also download a <a href="http://sphinx.pocoo.org/sphinx.pdf">PDF version</a>
|
You can also download a <a href="http://sphinx.pocoo.org/sphinx.pdf">PDF version</a>
|
||||||
of the Sphinx documentation, generated from the LaTeX Sphinx produces.
|
of the Sphinx documentation, generated from the LaTeX Sphinx produces.
|
||||||
</p>
|
</p>
|
||||||
|
<p>Links to more documentation generated with Sphinx can be found on the
|
||||||
|
<a href="{{ pathto("examples") }}">Projects using Sphinx</a> page.
|
||||||
|
</p>
|
||||||
|
|
||||||
<h2>Documentation</h2>
|
<h2>Documentation</h2>
|
||||||
<table class="contentstable" align="center" style="margin-left: 30px"><tr>
|
<table class="contentstable" align="center" style="margin-left: 30px"><tr>
|
||||||
|
@ -378,6 +378,7 @@ class StandaloneHTMLBuilder(Builder):
|
|||||||
docstitle = self.config.html_title,
|
docstitle = self.config.html_title,
|
||||||
shorttitle = self.config.html_short_title,
|
shorttitle = self.config.html_short_title,
|
||||||
show_sphinx = self.config.html_show_sphinx,
|
show_sphinx = self.config.html_show_sphinx,
|
||||||
|
file_suffix = self.config.html_file_suffix,
|
||||||
rellinks = rellinks,
|
rellinks = rellinks,
|
||||||
builder = self.name,
|
builder = self.name,
|
||||||
parents = [],
|
parents = [],
|
||||||
|
@ -560,7 +560,8 @@ def members_option(arg):
|
|||||||
|
|
||||||
def setup(app):
|
def setup(app):
|
||||||
mod_options = {'members': members_option, 'undoc-members': directives.flag,
|
mod_options = {'members': members_option, 'undoc-members': directives.flag,
|
||||||
'noindex': directives.flag, 'synopsis': lambda x: x,
|
'noindex': directives.flag, 'inherited-members': directives.flag,
|
||||||
|
'show-inheritance': directives.flag, 'synopsis': lambda x: x,
|
||||||
'platform': lambda x: x, 'deprecated': directives.flag}
|
'platform': lambda x: x, 'deprecated': directives.flag}
|
||||||
cls_options = {'members': members_option, 'undoc-members': directives.flag,
|
cls_options = {'members': members_option, 'undoc-members': directives.flag,
|
||||||
'noindex': directives.flag, 'inherited-members': directives.flag,
|
'noindex': directives.flag, 'inherited-members': directives.flag,
|
||||||
|
@ -42,7 +42,7 @@ import sys, os
|
|||||||
|
|
||||||
# Add any Sphinx extension module names here, as strings. They can be extensions
|
# Add any Sphinx extension module names here, as strings. They can be extensions
|
||||||
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
|
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
|
||||||
#extensions = []
|
extensions = [%(extensions)s]
|
||||||
|
|
||||||
# Add any paths that contain templates here, relative to this directory.
|
# Add any paths that contain templates here, relative to this directory.
|
||||||
templates_path = ['%(dot)stemplates']
|
templates_path = ['%(dot)stemplates']
|
||||||
@ -397,6 +397,12 @@ document is a custom template, you can also set this to another filename.'''
|
|||||||
do_prompt(d, 'master', 'Name of your master document (without suffix)',
|
do_prompt(d, 'master', 'Name of your master document (without suffix)',
|
||||||
'index')
|
'index')
|
||||||
print '''
|
print '''
|
||||||
|
Please indicate if you want to use one of the following Sphinx extensions:'''
|
||||||
|
do_prompt(d, 'ext_autodoc', 'autodoc: automatically insert docstrings '
|
||||||
|
'from modules (y/n)', 'n', boolean)
|
||||||
|
do_prompt(d, 'ext_doctest', 'doctest: automatically test code snippets '
|
||||||
|
'in doctest blocks (y/n)', 'n', boolean)
|
||||||
|
print '''
|
||||||
If you are under Unix, a Makefile can be generated for you so that you
|
If you are under Unix, a Makefile can be generated for you so that you
|
||||||
only have to run e.g. `make html' instead of invoking sphinx-build
|
only have to run e.g. `make html' instead of invoking sphinx-build
|
||||||
directly.'''
|
directly.'''
|
||||||
@ -407,6 +413,9 @@ directly.'''
|
|||||||
d['year'] = time.strftime('%Y')
|
d['year'] = time.strftime('%Y')
|
||||||
d['now'] = time.asctime()
|
d['now'] = time.asctime()
|
||||||
d['underline'] = len(d['project']) * '='
|
d['underline'] = len(d['project']) * '='
|
||||||
|
d['extensions'] = ', '.join(
|
||||||
|
repr('sphinx.ext.' + name) for name in ('autodoc', 'doctest')
|
||||||
|
if d['ext_' + name].upper() in ('Y', 'YES'))
|
||||||
|
|
||||||
if not path.isdir(d['path']):
|
if not path.isdir(d['path']):
|
||||||
mkdir_p(d['path'])
|
mkdir_p(d['path'])
|
||||||
|
@ -363,8 +363,10 @@ var Search = {
|
|||||||
if (results.length) {
|
if (results.length) {
|
||||||
var item = results.pop();
|
var item = results.pop();
|
||||||
var listItem = $('<li style="display:none"></li>');
|
var listItem = $('<li style="display:none"></li>');
|
||||||
listItem.append($('<a/>').attr('href', item[0] + '.html' +
|
listItem.append($('<a/>').attr(
|
||||||
highlightstring).html(item[1]));
|
'href',
|
||||||
|
item[0] + DOCUMENTATION_OPTIONS.FILE_SUFFIX +
|
||||||
|
highlightstring).html(item[1]));
|
||||||
$.get('_sources/' + item[0] + '.txt', function(data) {
|
$.get('_sources/' + item[0] + '.txt', function(data) {
|
||||||
listItem.append($.makeSearchSummary(data, searchwords, hlwords));
|
listItem.append($.makeSearchSummary(data, searchwords, hlwords));
|
||||||
output.append(listItem);
|
output.append(listItem);
|
||||||
|
@ -102,9 +102,10 @@
|
|||||||
{%- if builder != 'htmlhelp' %}
|
{%- if builder != 'htmlhelp' %}
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
var DOCUMENTATION_OPTIONS = {
|
var DOCUMENTATION_OPTIONS = {
|
||||||
URL_ROOT: '{{ pathto("", 1) }}',
|
URL_ROOT: '{{ pathto("", 1) }}',
|
||||||
VERSION: '{{ release }}',
|
VERSION: '{{ release }}',
|
||||||
COLLAPSE_MODINDEX: false
|
COLLAPSE_MODINDEX: false,
|
||||||
|
FILE_SUFFIX: '{{ file_suffix }}'
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
<script type="text/javascript" src="{{ pathto('_static/jquery.js', 1) }}"></script>
|
<script type="text/javascript" src="{{ pathto('_static/jquery.js', 1) }}"></script>
|
||||||
|
Loading…
Reference in New Issue
Block a user