mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Closes #1735: Use https://doc.python.org/ instead of `http
protocol. It was used for
sphinx.ext.intersphinx` and some documentation.
This commit is contained in:
parent
59fedc0791
commit
b0d40ea22c
2
CHANGES
2
CHANGES
@ -7,6 +7,8 @@ Incompatible changes
|
||||
* Dependency requirement updates: docutils 0.11, Pygments 2.0
|
||||
* The ``gettext_enables`` config value has been renamed to
|
||||
`gettext_additional_targets`.
|
||||
* #1735: Use https://doc.python.org/ instead of ``http`` protocol.
|
||||
It was used for `sphinx.ext.intersphinx` and some documentation.
|
||||
|
||||
Features added
|
||||
--------------
|
||||
|
2
EXAMPLES
2
EXAMPLES
@ -53,7 +53,7 @@ Documentation using the default theme
|
||||
* PyPubSub: http://pubsub.sourceforge.net/
|
||||
* pyrticle: http://documen.tician.de/pyrticle/
|
||||
* pySPACE: http://pyspace.github.io/pyspace/
|
||||
* Python: http://docs.python.org/
|
||||
* Python: https://docs.python.org/
|
||||
* python-apt: http://apt.alioth.debian.org/python-apt-doc/
|
||||
* PyUblas: http://documen.tician.de/pyublas/
|
||||
* Quex: http://quex.sourceforge.net/doc/html/main.html
|
||||
|
2
doc/_templates/index.html
vendored
2
doc/_templates/index.html
vendored
@ -12,7 +12,7 @@
|
||||
<p>{%trans%}
|
||||
Sphinx is a tool that makes it easy to create intelligent and beautiful
|
||||
documentation, written by Georg Brandl and licensed under the BSD license.{%endtrans%}</p>
|
||||
<p>{%trans%}It was originally created for <a href="http://docs.python.org/">the
|
||||
<p>{%trans%}It was originally created for <a href="https://docs.python.org/">the
|
||||
new Python documentation</a>, and it has excellent facilities for the
|
||||
documentation of Python projects, but C/C++ is already supported as well,
|
||||
and it is planned to add special support for other languages as well. Of
|
||||
|
@ -84,7 +84,7 @@ texinfo_documents = [
|
||||
|
||||
# We're not using intersphinx right now, but if we did, this would be part of
|
||||
# the mapping:
|
||||
intersphinx_mapping = {'python': ('http://docs.python.org/2/', None)}
|
||||
intersphinx_mapping = {'python': ('https://docs.python.org/2/', None)}
|
||||
|
||||
# Sphinx document translation with sphinx gettext feature uses these settings:
|
||||
locale_dirs = ['locale/']
|
||||
|
@ -768,7 +768,7 @@ that use Sphinx's HTMLWriter class.
|
||||
output, and all pages will contain a ``<link>`` tag referring to it. Since
|
||||
OpenSearch doesn't support relative URLs for its search page location, the
|
||||
value of this option must be the base URL from which these documents are
|
||||
served (without trailing slash), e.g. ``"http://docs.python.org"``. The
|
||||
served (without trailing slash), e.g. ``"https://docs.python.org"``. The
|
||||
default is ``''``.
|
||||
|
||||
.. confval:: html_file_suffix
|
||||
|
@ -84,7 +84,7 @@ linking:
|
||||
To add links to modules and objects in the Python standard library
|
||||
documentation, use::
|
||||
|
||||
intersphinx_mapping = {'python': ('http://docs.python.org/3.4', None)}
|
||||
intersphinx_mapping = {'python': ('https://docs.python.org/3.4', None)}
|
||||
|
||||
This will download the corresponding :file:`objects.inv` file from the
|
||||
Internet and generate links to the pages under the given URI. The downloaded
|
||||
@ -94,12 +94,12 @@ linking:
|
||||
A second example, showing the meaning of a non-``None`` value of the second
|
||||
tuple item::
|
||||
|
||||
intersphinx_mapping = {'python': ('http://docs.python.org/3.4',
|
||||
intersphinx_mapping = {'python': ('https://docs.python.org/3.4',
|
||||
'python-inv.txt')}
|
||||
|
||||
This will read the inventory from :file:`python-inv.txt` in the source
|
||||
directory, but still generate links to the pages under
|
||||
``http://docs.python.org/3.4``. It is up to you to update the inventory file
|
||||
``https://docs.python.org/3.4``. It is up to you to update the inventory file
|
||||
as new objects are added to the Python documentation.
|
||||
|
||||
**Multiple target for the inventory**
|
||||
@ -113,7 +113,7 @@ linking:
|
||||
this to specify mirror sites for server downtime of the primary
|
||||
inventory::
|
||||
|
||||
intersphinx_mapping = {'python': ('http://docs.python.org/3.4',
|
||||
intersphinx_mapping = {'python': ('https://docs.python.org/3.4',
|
||||
(None, 'python-inv.txt'))}
|
||||
|
||||
.. confval:: intersphinx_cache_limit
|
||||
|
@ -133,7 +133,7 @@ These themes are:
|
||||
include ``px`` in the value.) Defaults to 230 pixels.
|
||||
|
||||
* **default** -- This is the default theme, which looks like `the Python
|
||||
documentation <http://docs.python.org/>`_. It can be customized via these
|
||||
documentation <https://docs.python.org/>`_. It can be customized via these
|
||||
options:
|
||||
|
||||
- **rightsidebar** (true or false): Put the sidebar on the right side.
|
||||
|
@ -273,7 +273,7 @@ Many Sphinx documents including the `Python documentation`_ are published on the
|
||||
internet. When you want to make links to such documents from your
|
||||
documentation, you can do it with :mod:`sphinx.ext.intersphinx`.
|
||||
|
||||
.. _Python documentation: http://docs.python.org/3
|
||||
.. _Python documentation: https://docs.python.org/3
|
||||
|
||||
In order to use intersphinx, you need to activate it in :file:`conf.py` by
|
||||
putting the string ``'sphinx.ext.intersphinx'`` into the :confval:`extensions`
|
||||
@ -282,7 +282,7 @@ list and set up the :confval:`intersphinx_mapping` config value.
|
||||
For example, to link to ``io.open()`` in the Python library manual, you need to
|
||||
setup your :confval:`intersphinx_mapping` like::
|
||||
|
||||
intersphinx_mapping = {'python': ('http://docs.python.org/3', None)}
|
||||
intersphinx_mapping = {'python': ('https://docs.python.org/3', None)}
|
||||
|
||||
And now, you can write a cross-reference like ``:py:func:`io.open```. Any
|
||||
cross-reference that has no matching target in the current documentation set,
|
||||
|
@ -37,7 +37,7 @@ class peek_iter(object):
|
||||
See Also
|
||||
--------
|
||||
`peek_iter` can operate as a drop in replacement for the built-in
|
||||
`iter <http://docs.python.org/2/library/functions.html#iter>`_ function.
|
||||
`iter <https://docs.python.org/2/library/functions.html#iter>`_ function.
|
||||
|
||||
Attributes
|
||||
----------
|
||||
|
@ -428,7 +428,7 @@ epub_exclude_files = ['search.html']
|
||||
INTERSPHINX_CONFIG = u'''
|
||||
|
||||
# Example configuration for intersphinx: refer to the Python standard library.
|
||||
intersphinx_mapping = {'http://docs.python.org/': None}
|
||||
intersphinx_mapping = {'https://docs.python.org/': None}
|
||||
'''
|
||||
|
||||
MASTER_FILE = u'''\
|
||||
|
@ -84,8 +84,8 @@ def test_missing_reference(tempdir, app, status, warning):
|
||||
inv_file = tempdir / 'inventory'
|
||||
inv_file.write_bytes(inventory_v2)
|
||||
app.config.intersphinx_mapping = {
|
||||
'http://docs.python.org/': inv_file,
|
||||
'py3k': ('http://docs.python.org/py3k/', inv_file),
|
||||
'https://docs.python.org/': inv_file,
|
||||
'py3k': ('https://docs.python.org/py3k/', inv_file),
|
||||
}
|
||||
app.config.intersphinx_cache_limit = 0
|
||||
|
||||
@ -94,7 +94,7 @@ def test_missing_reference(tempdir, app, status, warning):
|
||||
inv = app.env.intersphinx_inventory
|
||||
|
||||
assert inv['py:module']['module2'] == \
|
||||
('foo', '2.0', 'http://docs.python.org/foo.html#module-module2', '-')
|
||||
('foo', '2.0', 'https://docs.python.org/foo.html#module-module2', '-')
|
||||
|
||||
# create fake nodes and check referencing
|
||||
|
||||
@ -115,7 +115,7 @@ def test_missing_reference(tempdir, app, status, warning):
|
||||
# check resolution when a target is found
|
||||
rn = reference_check('py', 'func', 'module1.func', 'foo')
|
||||
assert isinstance(rn, nodes.reference)
|
||||
assert rn['refuri'] == 'http://docs.python.org/sub/foo.html#module1.func'
|
||||
assert rn['refuri'] == 'https://docs.python.org/sub/foo.html#module1.func'
|
||||
assert rn['reftitle'] == '(in foo v2.0)'
|
||||
assert rn[0].astext() == 'foo'
|
||||
|
||||
@ -164,8 +164,8 @@ def test_load_mappings_warnings(tempdir, app, status, warning):
|
||||
inv_file = tempdir / 'inventory'
|
||||
inv_file.write_bytes(inventory_v2)
|
||||
app.config.intersphinx_mapping = {
|
||||
'http://docs.python.org/': inv_file,
|
||||
'py3k': ('http://docs.python.org/py3k/', inv_file),
|
||||
'https://docs.python.org/': inv_file,
|
||||
'py3k': ('https://docs.python.org/py3k/', inv_file),
|
||||
'repoze.workflow': ('http://docs.repoze.org/workflow/', inv_file),
|
||||
'django-taggit': ('http://django-taggit.readthedocs.org/en/latest/',
|
||||
inv_file)
|
||||
|
Loading…
Reference in New Issue
Block a user