Skip to content

Commit 1445477

Browse files
authored
Merge pull request #71 from martinRenou/doc
Update documentation
2 parents d58dc0a + 8504a92 commit 1445477

File tree

3 files changed

+23
-41
lines changed

3 files changed

+23
-41
lines changed

README.md

Lines changed: 3 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/martinRenou/ipycanvas/stable?filepath=examples)
77
[![Build Status](https://travis-ci.org/martinRenou/ipycanvas.svg?branch=master)](https://travis-ci.org/martinRenou/ipycanvas)
88

9-
ipycanvas is a lightweight, fast and stable library exposing the [browser's Canvas API](https://developer.mozilla.org/en-US/docs/Web/API/Canvas_API) to Python.
9+
ipycanvas is a lightweight, fast and stable library exposing the [browser's Canvas API](https://developer.mozilla.org/en-US/docs/Web/API/Canvas_API) to IPython.
1010
It allows you to draw simple primitives directly from Python like text, lines, polygons, arcs, images etc. This simple toolset allows you to draw literally anything!
1111

1212
## Try it online!
@@ -17,7 +17,7 @@ You can try it online by clicking on this badge:
1717

1818
## Documentation
1919

20-
You can read the documentation following this link: https://ipycanvas.readthedocs.io/en/latest/
20+
You can read the documentation following this link: https://ipycanvas.readthedocs.io
2121

2222
## Examples
2323

@@ -53,35 +53,6 @@ conda install -c conda-forge ipycanvas
5353
And if you use jupyterlab:
5454

5555
```bash
56+
conda install -c conda-forge nodejs
5657
jupyter labextension install @jupyter-widgets/jupyterlab-manager ipycanvas
5758
```
58-
59-
If you are using Jupyter Notebook 5.2 or earlier, you may also need to enable
60-
the nbextension:
61-
```bash
62-
jupyter nbextension enable --py [--sys-prefix|--user|--system] ipycanvas
63-
```
64-
65-
## Installation from sources
66-
67-
You can install using `pip`:
68-
69-
```bash
70-
git clone https://github.com/martinRenou/ipycanvas
71-
cd ipycanvas
72-
pip install .
73-
```
74-
75-
And if you use jupyterlab:
76-
77-
```bash
78-
jupyter labextension install @jupyter-widgets/jupyterlab-manager
79-
jupyter labextension install .
80-
```
81-
82-
And you use the classical Jupyter:
83-
84-
```bash
85-
jupyter nbextension install --py --symlink --sys-prefix ipycanvas
86-
jupyter nbextension enable --py --sys-prefix ipycanvas
87-
```

docs/source/conf.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,13 @@
22
import sphinx_rtd_theme
33

44
extensions = [
5+
'sphinx_rtd_theme',
56
'sphinx.ext.autodoc',
6-
'sphinx.ext.napoleon',
7-
# 'sphinx.ext.intersphinx',
8-
# 'sphinx.ext.autosummary',
9-
# 'sphinx.ext.viewcode',
10-
# 'jupyter_sphinx.embed_widgets',
7+
'sphinx.ext.napoleon'
118
]
129

1310
templates_path = ['_templates']
1411

15-
1612
master_doc = 'index'
1713
source_suffix = '.rst'
1814

@@ -25,8 +21,13 @@
2521
pygments_style = 'sphinx'
2622

2723
# Output file base name for HTML help builder.
24+
html_logo = "./images/ipycanvas_logo.svg"
2825
html_theme = "sphinx_rtd_theme"
2926
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
3027
htmlhelp_basename = 'ipycanvasdoc'
3128

29+
html_theme_options = dict(
30+
style_nav_header_background='#0d6a0a'
31+
)
32+
3233
autodoc_member_order = 'bysource'

docs/source/installation.rst

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ Using pip
66
.. code:: bash
77
88
pip install ipycanvas
9-
jupyter nbextension enable --py --sys-prefix ipycanvas # can be skipped for notebook 5.3 and above
109
1110
Using conda
1211
===========
@@ -18,7 +17,14 @@ Using conda
1817
JupyterLab extension
1918
====================
2019

21-
If you have JupyterLab, you will also need to install the JupyterLab extension:
20+
If you have JupyterLab, you will also need to install the JupyterLab extension. In order to install the JupyterLab extension,
21+
you will need ``npm`` to be installed. You can easily install ``npm`` with conda:
22+
23+
.. code:: bash
24+
25+
conda install -c conda-forge nodejs
26+
27+
Then you can install the JupyterLab extension:
2228

2329
.. code:: bash
2430
@@ -34,6 +40,10 @@ For a development installation (requires npm):
3440
git clone https://github.com/martinRenou/ipycanvas.git
3541
cd ipycanvas
3642
pip install -e .
43+
44+
# If you are developing on the classic Jupyter Notebook
3745
jupyter nbextension install --py --symlink --sys-prefix ipycanvas
3846
jupyter nbextension enable --py --sys-prefix ipycanvas
39-
jupyter labextension install @jupyter-widgets/jupyterlab-manager . # If you are developing on JupyterLab
47+
48+
# If you are developing on JupyterLab
49+
jupyter labextension install @jupyter-widgets/jupyterlab-manager .

0 commit comments

Comments
 (0)