Skip to content

Commit d3a8b58

Browse files
authored
DOC: switch to book theme, fix the RTD configuration (#235)
* RTD: fix the readthedocs setup * switch to book theme, fix the rtd setup * env update * better solution for the title and subtitle
1 parent cc8f619 commit d3a8b58

File tree

6 files changed

+23
-45
lines changed

6 files changed

+23
-45
lines changed

docs/_templates/docs-sidebar.html

-23
This file was deleted.

docs/_templates/layout.html

-5
This file was deleted.

docs/conf.py

+9-6
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,9 @@
1717
# documentation root, use os.path.abspath to make it absolute, like shown here.
1818
#
1919
# import os
20-
# import sys
21-
# sys.path.insert(0, os.path.abspath('.'))
20+
import sys
21+
sys.path.insert(0, os.path.abspath(".."))
22+
import contextily # noqa
2223

2324

2425
# -- Project information -----------------------------------------------------
@@ -28,7 +29,7 @@
2829
author = "Dani Arribas-Bel & Contexily Contributors"
2930

3031
# The full version, including alpha/beta/rc tags
31-
release = "1.1.0"
32+
release = contextily.__version__
3233

3334

3435
# -- General configuration ---------------------------------------------------
@@ -60,7 +61,7 @@
6061
# The theme to use for HTML and HTML Help pages. See the documentation for
6162
# a list of builtin themes.
6263
#
63-
html_theme = "pydata_sphinx_theme"
64+
html_theme = "sphinx_book_theme"
6465

6566
# Add any paths that contain custom static files (such as style sheets) here,
6667
# relative to this directory. They are copied after the builtin static files,
@@ -71,8 +72,10 @@
7172
"css/custom.css",
7273
]
7374

74-
html_sidebars = {
75-
"**": ["docs-sidebar.html"],
75+
html_theme_options = {
76+
"logo": {
77+
"text": "CONTEXTILY <br> Context geo tiles in Python",
78+
}
7679
}
7780

7881
intersphinx_mapping = {

docs/environment.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: contextily_docs
22
channels:
33
- conda-forge
44
dependencies:
5-
- python=3.7
5+
- python=3.11
66
# dependencies
77
- numpy
88
- geopy
@@ -20,4 +20,4 @@ dependencies:
2020
- nbsphinx
2121
- pandoc
2222
- ipython
23-
- pydata-sphinx-theme
23+
- sphinx-book-theme

docs/index.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Contents
1010
--------
1111

1212
.. toctree::
13-
:maxdepth: 2
13+
:maxdepth: 1
1414
:caption: User Guide
1515

1616
intro_guide
@@ -22,7 +22,7 @@ Contents
2222
friends_cenpy_osmnx
2323

2424
.. toctree::
25-
:maxdepth: 2
25+
:maxdepth: 1
2626
:caption: Reference Guide
2727

2828
reference

readthedocs.yml

+10-7
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
11
version: 2
2-
formats: []
3-
conda:
4-
environment: docs/environment.yml
2+
build:
3+
os: ubuntu-22.04
4+
tools:
5+
python: mambaforge-latest
56
python:
6-
version: 3
7-
install:
8-
- method: pip
9-
path: .
7+
install:
8+
- method: pip
9+
path: .
10+
conda:
11+
environment: docs/environment.yml
12+
formats: []

0 commit comments

Comments
 (0)