mirror of https://github.com/pypa/pip
Navigation (+other) improvements to Documentation (#4855)
This commit is contained in:
parent
3651dd8687
commit
8f6b4c9b2d
|
@ -3,9 +3,12 @@ include LICENSE.txt
|
|||
include NEWS.rst
|
||||
include README.rst
|
||||
include pyproject.toml
|
||||
|
||||
include src/pip/_vendor/README.rst
|
||||
include src/pip/_vendor/vendor.txt
|
||||
|
||||
include docs/docutils.conf
|
||||
|
||||
exclude .coveragerc
|
||||
exclude .mailmap
|
||||
exclude .travis.yml
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
sphinx == 1.6.1
|
||||
sphinx == 1.6.*
|
||||
git+https://github.com/python/python-docs-theme.git#egg=python-docs-theme
|
||||
git+https://github.com/pypa/pypa-docs-theme.git#egg=pypa-docs-theme
|
||||
|
||||
|
|
|
@ -127,7 +127,7 @@ html_theme = "pypa_theme"
|
|||
html_theme_options = {
|
||||
'collapsiblesidebar': True,
|
||||
'externalrefs': True,
|
||||
'navigation_depth': 2,
|
||||
'navigation_depth': 3,
|
||||
'issues_url': 'https://github.com/pypa/pip/issues'
|
||||
}
|
||||
|
||||
|
|
|
@ -0,0 +1,2 @@
|
|||
[restructuredtext parser]
|
||||
smart_quotes = no
|
|
@ -2,13 +2,14 @@
|
|||
|
||||
import optparse
|
||||
import sys
|
||||
from textwrap import dedent
|
||||
|
||||
from docutils import nodes
|
||||
from docutils.parsers import rst
|
||||
from docutils.statemachine import ViewList
|
||||
from textwrap import dedent
|
||||
|
||||
from pip._internal import cmdoptions
|
||||
from pip._internal.commands import commands_dict as commands
|
||||
from pip._internal.utils.misc import get_prog
|
||||
|
||||
|
||||
class PipCommandUsage(rst.Directive):
|
||||
|
@ -16,8 +17,7 @@ class PipCommandUsage(rst.Directive):
|
|||
|
||||
def run(self):
|
||||
cmd = commands[self.arguments[0]]
|
||||
prog = '%s %s' % (get_prog(), cmd.name)
|
||||
usage = dedent(cmd.usage.replace('%prog', prog)).strip()
|
||||
usage = dedent(cmd.usage.replace('%prog', 'pip')).strip()
|
||||
node = nodes.literal_block(usage, usage)
|
||||
return [node]
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@ Reference Guide
|
|||
===============
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 1
|
||||
:maxdepth: 2
|
||||
|
||||
pip
|
||||
pip_install
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
pip
|
||||
---
|
||||
|
||||
.. contents::
|
||||
|
||||
Usage
|
||||
*****
|
||||
|
||||
|
|
|
@ -3,6 +3,8 @@
|
|||
pip check
|
||||
---------
|
||||
|
||||
.. contents::
|
||||
|
||||
Usage
|
||||
*****
|
||||
|
||||
|
|
|
@ -4,6 +4,8 @@
|
|||
pip config
|
||||
------------
|
||||
|
||||
.. contents::
|
||||
|
||||
Usage
|
||||
*****
|
||||
|
||||
|
|
|
@ -4,6 +4,8 @@
|
|||
pip download
|
||||
------------
|
||||
|
||||
.. contents::
|
||||
|
||||
Usage
|
||||
*****
|
||||
|
||||
|
|
|
@ -4,6 +4,8 @@
|
|||
pip freeze
|
||||
-----------
|
||||
|
||||
.. contents::
|
||||
|
||||
Usage
|
||||
*****
|
||||
|
||||
|
|
|
@ -3,6 +3,8 @@
|
|||
pip hash
|
||||
------------
|
||||
|
||||
.. contents::
|
||||
|
||||
Usage
|
||||
*****
|
||||
|
||||
|
|
|
@ -3,6 +3,8 @@
|
|||
pip install
|
||||
-----------
|
||||
|
||||
.. contents::
|
||||
|
||||
Usage
|
||||
*****
|
||||
|
||||
|
|
|
@ -3,6 +3,8 @@
|
|||
pip list
|
||||
---------
|
||||
|
||||
.. contents::
|
||||
|
||||
Usage
|
||||
*****
|
||||
|
||||
|
|
|
@ -3,6 +3,8 @@
|
|||
pip search
|
||||
----------
|
||||
|
||||
.. contents::
|
||||
|
||||
Usage
|
||||
*****
|
||||
|
||||
|
|
|
@ -3,6 +3,9 @@
|
|||
pip show
|
||||
--------
|
||||
|
||||
.. contents::
|
||||
|
||||
|
||||
Usage
|
||||
*****
|
||||
|
||||
|
|
|
@ -3,6 +3,8 @@
|
|||
pip uninstall
|
||||
-------------
|
||||
|
||||
.. contents::
|
||||
|
||||
Usage
|
||||
*****
|
||||
|
||||
|
|
|
@ -4,6 +4,8 @@
|
|||
pip wheel
|
||||
---------
|
||||
|
||||
.. contents::
|
||||
|
||||
Usage
|
||||
*****
|
||||
|
||||
|
|
|
@ -2,6 +2,8 @@
|
|||
User Guide
|
||||
==========
|
||||
|
||||
.. contents::
|
||||
|
||||
Running pip
|
||||
***********
|
||||
|
||||
|
|
Loading…
Reference in New Issue