Skip to content

Commit

Permalink
Docs: add toctree, make sidebar nav a bit better
Browse files Browse the repository at this point in the history
I wanted to have all geocoders listed in the sidebar toctree, because
viewing docs for a specific geocoder is quite a common use-case.
Apparently without introducing level 3 headers that's impossible [1].

sphinx-rtd-theme for some reason cannot render third level of headings
correctly in the sidebar without a `toctree` present in the doc:
they appear at the second level along with the other level two headers.
Hence the need to have `toctree` in the doc. It could've been hidden,
but I figured it might be helpful to have it visible in the doc.
Will see how it goes.

The toctree references the same document, which causes a warning
regarding a circular reference, yet it's the only option I could
find to have the third level of headings be correctly rendered in
the sidebar [2].

[1]: https://stackoverflow.com/a/18002745
[2]: sphinx-doc/sphinx#2103
  • Loading branch information
KostyaEsmukov committed Jul 7, 2018
1 parent 347de55 commit d93fb3c
Showing 1 changed file with 66 additions and 0 deletions.
66 changes: 66 additions & 0 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@ Welcome to GeoPy's documentation!
.. automodule:: geopy
:members: __doc__

.. toctree::
:maxdepth: 3
:caption: Contents

index


Installation
~~~~~~~~~~~~
Expand All @@ -30,107 +36,167 @@ Geocoders

.. autofunction:: geopy.geocoders.get_geocoder_for_service

ArcGIS
------

.. autoclass:: geopy.geocoders.ArcGIS
:members:

.. automethod:: __init__

AzureMaps
---------

.. autoclass:: geopy.geocoders.AzureMaps
:members:
:inherited-members:
:show-inheritance:

.. automethod:: __init__

Baidu
-----

.. autoclass:: geopy.geocoders.Baidu
:members:

.. automethod:: __init__

Bing
----

.. autoclass:: geopy.geocoders.Bing
:members:

.. automethod:: __init__

DataBC
------

.. autoclass:: geopy.geocoders.DataBC
:members:

.. automethod:: __init__

GeocodeEarth
------------

.. autoclass:: geopy.geocoders.GeocodeEarth
:members:
:inherited-members:
:show-inheritance:

.. automethod:: __init__

GeocodeFarm
-----------

.. autoclass:: geopy.geocoders.GeocodeFarm
:members:

.. automethod:: __init__

GeoNames
--------

.. autoclass:: geopy.geocoders.GeoNames
:members:

.. automethod:: __init__

GoogleV3
--------

.. autoclass:: geopy.geocoders.GoogleV3
:members:

.. automethod:: __init__

IGNFrance
---------

.. autoclass:: geopy.geocoders.IGNFrance
:members:

.. automethod:: __init__

OpenCage
--------

.. autoclass:: geopy.geocoders.OpenCage
:members:

.. automethod:: __init__

OpenMapQuest
------------

.. autoclass:: geopy.geocoders.OpenMapQuest
:members:

.. automethod:: __init__

Nominatim
---------

.. autoclass:: geopy.geocoders.Nominatim
:members:

.. automethod:: __init__

Pelias
------

.. autoclass:: geopy.geocoders.Pelias
:members:

.. automethod:: __init__

Photon
------

.. autoclass:: geopy.geocoders.Photon
:members:

.. automethod:: __init__

PickPoint
---------

.. autoclass:: geopy.geocoders.PickPoint
:members:
:inherited-members:
:show-inheritance:

.. automethod:: __init__

LiveAddress
-----------

.. autoclass:: geopy.geocoders.LiveAddress
:members:

.. automethod:: __init__

TomTom
------

.. autoclass:: geopy.geocoders.TomTom
:members:

.. automethod:: __init__

What3Words
----------

.. autoclass:: geopy.geocoders.What3Words
:members:

.. automethod:: __init__

Yandex
------

.. autoclass:: geopy.geocoders.Yandex
:members:

Expand Down

0 comments on commit d93fb3c

Please sign in to comment.