Skip to content

Commit 0418c04

Browse files
authored
Merge pull request #50 from choldgraf/sphinx-book-theme
sphinx book theme
2 parents ec1c28a + 2db2031 commit 0418c04

File tree

8 files changed

+66
-14
lines changed

8 files changed

+66
-14
lines changed

.circleci/config.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
version: 2
2+
jobs:
3+
build_docs:
4+
docker:
5+
- image: circleci/python:3.6-stretch
6+
steps:
7+
# Get our data and merge with upstream
8+
- run: sudo apt-get update
9+
- checkout
10+
11+
- restore_cache:
12+
keys:
13+
- cache-pip
14+
15+
- run: |
16+
pip install --user .[sphinx]
17+
18+
- save_cache:
19+
key: cache-pip
20+
paths:
21+
- ~/.cache/pip
22+
23+
# Build the docs
24+
- run:
25+
name: Build docs to store
26+
command: |
27+
sphinx-build -b html docs/ docs/_build/html
28+
29+
- store_artifacts:
30+
path: docs/_build/html/
31+
destination: html
32+
33+
34+
workflows:
35+
version: 2
36+
default:
37+
jobs:
38+
- build_docs

.readthedocs.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,5 @@ python:
1818
install:
1919
- method: pip
2020
path: .
21+
extra_requirements:
22+
- sphinx

.travis.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@ matrix:
1212
env: TOXENV=flake8
1313
- python: 3.8
1414
env: TOXENV=dist
15-
- python: 3.8
16-
env: TOXENV=docs
1715
- python: 3.8
1816
env: TOXENV=manifest
1917
install:

MANIFEST.in

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,4 +36,7 @@ global-exclude .ipynb_checkpoints
3636
# Binder files to be excluded
3737
exclude binder
3838
recursive-exclude binder *.ipynb
39-
recursive-exclude binder *.txt
39+
recursive-exclude binder *.txt
40+
41+
# Exclude CI/CD files
42+
prune .circleci

docs/conf.py

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@
3636
'sphinx.ext.intersphinx',
3737
'sphinx.ext.mathjax',
3838
'sphinx.ext.napoleon',
39-
'recommonmark'
4039
]
4140

4241
# Add any paths that contain templates here, relative to this directory.
@@ -91,20 +90,18 @@
9190
# The theme to use for HTML and HTML Help pages. See the documentation for
9291
# a list of builtin themes.
9392
#
94-
html_theme = 'alabaster'
93+
html_theme = 'sphinx_book_theme'
9594

9695
# Theme options are theme-specific and customize the look and feel of a theme
9796
# further. For a list of options available for each theme, see the
9897
# documentation.
9998
#
10099

101100
html_theme_options = {
102-
'description': 'Execute notebooks',
103-
'github_button': True,
104-
'github_user': 'jupyter',
105-
'github_repo': 'nbclient',
106-
'travis_button': True,
107-
'codecov_button': True,
101+
"path_to_docs": "docs",
102+
"repository_url": "https://github.com/jupyter/nbclient",
103+
"repository_branch": "master",
104+
"use_edit_page_button": True,
108105
}
109106

110107
# Add any paths that contain custom static files (such as style sheets) here,
@@ -119,6 +116,7 @@
119116
# refs: http://alabaster.readthedocs.io/en/latest/installation.html#sidebars
120117
html_sidebars = {'**': ['about.html', 'navigation.html', 'relations.html', 'searchbox.html']}
121118

119+
html_title = "nbclient"
122120

123121
# -- Options for HTMLHelp output ------------------------------------------
124122

docs/index.rst

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,17 @@
11
Welcome to nbclient
22
===================
33

4+
.. image:: https://img.shields.io/github/stars/jupyter/nbclient?label=stars&style=social
5+
:alt: GitHub stars
6+
:target: https://githu.com/jupyter/nbclient
7+
.. image:: https://img.shields.io/travis/jupyter/nbclient
8+
:alt: Travis (.org)
9+
:target: https://travis-ci.org/jupyter/nbclient
10+
.. image:: https://codecov.io/github/jupyter/nbclient/coverage.svg?branch=master
11+
:alt: CodeCov
12+
:target: https://codecov.io/github/jupyter/nbclient
13+
---
14+
415
**NBClient** is a tool for executing Jupyter Notebooks.
516

617
NBClient lets you:
@@ -36,6 +47,7 @@ These pages guide you through the installation and usage of nbclient.
3647

3748
.. toctree::
3849
:maxdepth: 1
50+
:caption: Documentation
3951

4052
installation
4153
client
@@ -50,6 +62,7 @@ this documentation section will help you.
5062

5163
.. toctree::
5264
:maxdepth: 3
65+
:caption: Reference
5366

5467
reference/index.rst
5568
reference/nbclient.tests.rst

docs/requirements-doc.txt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
Sphinx>=1.7
2-
sphinx_rtd_theme
3-
recommonmark
2+
sphinx-book-theme
43
mock
54
moto

setup.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@ def read_reqs(fname):
3838
long_description = read(os.path.join(os.path.dirname(__file__), "README.md"))
3939
requirements = read(os.path.join(os.path.dirname(__file__), "requirements.txt"))
4040
dev_reqs = read_reqs(os.path.join(os.path.dirname(__file__), 'requirements-dev.txt'))
41-
extras_require = {"test": dev_reqs, "dev": dev_reqs}
41+
doc_reqs = read_reqs(os.path.join(os.path.dirname(__file__), 'docs/requirements-doc.txt'))
42+
extras_require = {"test": dev_reqs, "dev": dev_reqs, "sphinx": doc_reqs}
4243

4344
setup(
4445
name=name,

0 commit comments

Comments
 (0)