Skip to content

Commit

Permalink
adding page doc
Browse files Browse the repository at this point in the history
  • Loading branch information
choldgraf committed Oct 8, 2019
1 parent fb128cc commit fd0d4f4
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 2 deletions.
3 changes: 3 additions & 0 deletions jupyter_book/book_template/_data/toc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,9 @@
- title: Controlling page layout
url: /features/layout
not_numbered: true
- title: Build an individual page instead of a book
url: /features/page
not_numbered: true
- title: Feature Limits
url: /features/limits
not_numbered: true
Expand Down
23 changes: 23 additions & 0 deletions jupyter_book/book_template/content/features/page.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Building a single page instead of a book

Sometimes you'd like to build a single page of content rather than an
entire book. For example, if you'd like to generate a web-friendly HTML
page from a Jupyter Notebook for a report or publication.

You can generate a standalone HTML file for a single page of Jupyter Book
content by running the following command:

```
jupyter-book page path/to/mybook.ipynb
```

This will do the following:

1. Convert your page to HTML
2. Add the Jupyter Book CSS and Javascript to the header of
that HTML.
3. Write the result to disk

The page's HTML will be missing a few Jupyter Book features, such as
a Table of Contents, however the layout and style will largely be the
same. [Here is an example of what this looks like](/notebooks.html).
4 changes: 2 additions & 2 deletions netlify.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[build]
command = "gem install bundler -v '2.0.2' && pip install -U git+https://github.com/jupyter/jupyter-book && jupyter-book build ./ --overwrite && bundle exec jekyll build"
command = "gem install bundler -v '2.0.2' && pip install -U git+https://github.com/jupyter/jupyter-book && jupyter-book build ./ --overwrite && jupyter-book page ./content/features/notebooks.ipynb -o _build && bundle exec jekyll build"

[context.deploy-preview]
command = "gem install bundler -v '2.0.2' && pip install -e ../../ && jupyter-book build ./ --overwrite && bundle exec jekyll build"
command = "gem install bundler -v '2.0.2' && pip install -e ../../ && jupyter-book build ./ --overwrite && jupyter-book page ./content/features/notebooks.ipynb -o _build && bundle exec jekyll build"

0 comments on commit fd0d4f4

Please sign in to comment.