Skip to content

Commit

Permalink
Navigation (+other) improvements to Documentation (#4855)
Browse files Browse the repository at this point in the history
  • Loading branch information
pradyunsg authored and pfmoore committed Nov 12, 2017
1 parent 3651dd8 commit 8f6b4c9
Show file tree
Hide file tree
Showing 19 changed files with 39 additions and 7 deletions.
3 changes: 3 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion docs-requirements.txt
Original file line number Diff line number Diff line change
@@ -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

Expand Down
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@
html_theme_options = {
'collapsiblesidebar': True,
'externalrefs': True,
'navigation_depth': 2,
'navigation_depth': 3,
'issues_url': 'https://github.com/pypa/pip/issues'
}

Expand Down
2 changes: 2 additions & 0 deletions docs/docutils.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[restructuredtext parser]
smart_quotes = no
8 changes: 4 additions & 4 deletions docs/pipext.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,22 @@

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):
required_arguments = 1

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]

Expand Down
2 changes: 1 addition & 1 deletion docs/reference/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Reference Guide
===============

.. toctree::
:maxdepth: 1
:maxdepth: 2

pip
pip_install
Expand Down
2 changes: 2 additions & 0 deletions docs/reference/pip.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
pip
---

.. contents::

Usage
*****

Expand Down
2 changes: 2 additions & 0 deletions docs/reference/pip_check.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
pip check
---------

.. contents::

Usage
*****

Expand Down
2 changes: 2 additions & 0 deletions docs/reference/pip_config.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
pip config
------------

.. contents::

Usage
*****

Expand Down
2 changes: 2 additions & 0 deletions docs/reference/pip_download.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
pip download
------------

.. contents::

Usage
*****

Expand Down
2 changes: 2 additions & 0 deletions docs/reference/pip_freeze.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
pip freeze
-----------

.. contents::

Usage
*****

Expand Down
2 changes: 2 additions & 0 deletions docs/reference/pip_hash.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
pip hash
------------

.. contents::

Usage
*****

Expand Down
2 changes: 2 additions & 0 deletions docs/reference/pip_install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
pip install
-----------

.. contents::

Usage
*****

Expand Down
2 changes: 2 additions & 0 deletions docs/reference/pip_list.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
pip list
---------

.. contents::

Usage
*****

Expand Down
2 changes: 2 additions & 0 deletions docs/reference/pip_search.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
pip search
----------

.. contents::

Usage
*****

Expand Down
3 changes: 3 additions & 0 deletions docs/reference/pip_show.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
pip show
--------

.. contents::


Usage
*****

Expand Down
2 changes: 2 additions & 0 deletions docs/reference/pip_uninstall.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
pip uninstall
-------------

.. contents::

Usage
*****

Expand Down
2 changes: 2 additions & 0 deletions docs/reference/pip_wheel.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
pip wheel
---------

.. contents::

Usage
*****

Expand Down
2 changes: 2 additions & 0 deletions docs/user_guide.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
User Guide
==========

.. contents::

Running pip
***********

Expand Down

0 comments on commit 8f6b4c9

Please sign in to comment.