Publishing HTML & Websites
This page describes how you can publish HTML reports, as well as full websites for more complex data science projects - like Jupyter Books - to Kyso.

Publishing HTML

Publishing HTML works just like publishing a Jupyter notebook report. You simply just need to ensure that you specify the type of report you are publishing in your yaml/json file.
The kyso.yaml file below is a good example:
1
main: "index.html"
2
title: "The HTML example"
3
description: "Example of an awesome HTML report."
4
organization: "acme"
5
tags: [
6
predictions,
7
rCharts
8
]
9
team: "general"
10
type: "website"
Copied!
As you can see, the only change we've made is type: website
For a recap on all the available metadata properties, follow the link below:

Compiling a Jupyter Book

A Jupyter Book is compiled to HTML from multiple Jupyter Notebooks, with JS and/or CSS styling as an option.
See Jupyter's gallery for examples: https://executablebooks.org/en/latest/gallery.html

Installation

First you need to install the jupyter-book package. You can install Jupyter Book via pip:
1
pip install -U jupyter-book
Copied!
or via conda-forge:
1
conda install -c conda-forge jupyter-book
Copied!
This will install everything you need to build a Jupyter Book locally.
Please refer to the official Jupyter documentation for more robust information on creating your Book reports: https://jupyterbook.org/en/stable/intro.html

Build your book's HTML

Once you’ve added content and configured your book, it’s time to build outputs for your book. We’ll use the jupyter-book build command line tool for this.
You should already have a collection of notebook/Markdown files in your mybookname/ folder, a _toc.yml file that defines the structure of your book, and any configuration you’d like in the _config.yml file.
Now that your book’s content is in your book folder and you’ve defined your book’s structure in _toc.yml, you can build the HTML for your book.
Do so by running the following command:
1
jupyter-book build mybookname/
Copied!
This will generate a fully-functioning HTML site using a static site generator. The site will be placed in the _build/html folder, something like this:
1
mybookname
2
└──_build
3
└── html
4
├── _images
5
├── _static
6
├── index.html
7
├── intro.html
8
...
Copied!
These are the static files for a standalone website! They contain the HTML and all assets needed to view your book in a browser.

Publishing Jupyter Books

The metadata specifications for a Jupyter Book works the exact same way as for individual HTML reports:
1
main: "index.html"
2
title: "The HTML example"
3
description: "Example of an awesome HTML report."
4
organization: "acme"
5
tags: [
6
predictions,
7
rCharts
8
]
9
team: "general"
10
type: "website"
Copied!
where "index.html" specifies the main/default page of the website to render when opening the report. From there you will be able to navigate to the rest of the website, all in Kyso.
And then you can publish the book, just as you would any other Kyso report (preferably just the HTML build directory). For example, with the CLI tool:
1
kyso-cli push -p bookExampl/_build/html
Copied!