- Move your IPython notebook to somewhere relevant in the repo. e.g. in some folder inside
_posts
. pip install publisher --upgrade
- Add another cell to your notebook with
publisher.publish(notebook_name, url_path, page_title, page_description)
. What're these arguments? callhelp(publisher.publish)
. This will convert your notebook into an HTML page that gh-pages understands. Example:, https://github.com/plotly/documentation/blob/gh-pages/_posts/user_guide_python/Plotly%20Offline.ipynb
- Clone the repo.
$ git clone git@github.com:plotly/documentation.git
- Check out the gh-pages branch:
$ git fetch origin
$ git checkout gh-pages
- Install jekyll (usually as simple as
$ sudo gem install jekyll
) - In the documentation repo:
$ jekyll serve --config _config_dev.yml
- Visit the pages at: http://localhost:4000/python/
- When you make changes, jekyll should automatically regenerate for you. Read the messages in your terminal to check it out
There are a TON of posts in here, so rendering can take up to
six minutes! You can limit the number of posts that render by
excluding folders in the _config_dev.yml
file.
For example, change _config_dev.yml
to this:
staticurl: http://localhost:4000/all_static
exclude: [_posts/ggplot2, _posts/julia, _posts/matlab, _posts/matplotlib, _posts/nodejs, _posts/r] # [_posts/python,]
and you'll only load the files in _posts/python
.
Change it to this
staticurl: http://localhost:4000/all_static
exclude: []
and it'll load everything.