Skip to content

Commit

Permalink
add doc first example (notebook) using nbsphinx
Browse files Browse the repository at this point in the history
  • Loading branch information
benbovy committed Jun 14, 2017
1 parent 1c8696a commit 923e889
Show file tree
Hide file tree
Showing 6 changed files with 1,840 additions and 2 deletions.
7 changes: 7 additions & 0 deletions doc/_templates/layout.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{% extends "!layout.html" %}
{%- block extrahead %}
<script src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.1.22/require.min.js"></script>
{%- for scriptfile in script_files %}
<script type="text/javascript" src="{{ pathto(scriptfile, 1) }}"></script>
{%- endfor %}
{% endblock %}
3 changes: 2 additions & 1 deletion doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@
# 'numpydoc',
'IPython.sphinxext.ipython_directive',
'IPython.sphinxext.ipython_console_highlighting',
'nbsphinx',
]

extlinks = {
Expand Down Expand Up @@ -103,7 +104,7 @@
# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
# This patterns also effect to html_static_path and html_extra_path
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store', '**.ipynb_checkpoints']

# The name of the Pygments (syntax highlighting) style to use.
pygments_style = 'sphinx'
Expand Down
6 changes: 5 additions & 1 deletion doc/environment.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: xarray-simlab
name: xarray-simlab-doc
channels:
- conda-forge
- defaults
Expand All @@ -7,4 +7,8 @@ dependencies:
- numpy=1.12
- xarray=0.9.6
- ipython=6.1.0
- ipykernel=4.6.1
- nbconvert=5.2.1
- sphinx=1.6.2
- nbsphinx=0.2.13
- pandoc=1.19.2
9 changes: 9 additions & 0 deletions doc/examples.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
.. _examples:

Examples
========

.. toctree::
:maxdepth: 2

examples/landscape-evolution-model
1,815 changes: 1,815 additions & 0 deletions doc/examples/landscape-evolution-model.ipynb

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions doc/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ Documentation Index
* :doc:`about`
* :doc:`faq`
* :doc:`installing`
* :doc:`examples`

.. toctree::
:maxdepth: 1
Expand All @@ -25,6 +26,7 @@ Documentation Index
about
faq
installing
examples

**Help & reference**

Expand Down

0 comments on commit 923e889

Please sign in to comment.