Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Navigation (+other) improvements to Documentation #4855

Merged
merged 6 commits into from
Nov 12, 2017
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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