# HTML

You can easily share HTML files on Kyso, where they are indexed for search and discovery. There are two kinds of HTML-based reports to consider.

## Single-page HTML

Publishing HTML files is pretty straightforward. Simply configure your report's metadata, setting the HTML file as the "main" variable in the YAML header, and then publish! You can do this with the CLI tool OR simply upload the files in the browser:

{% content-ref url="../posting-to-kyso/creating-reports-on-kyso" %}
[creating-reports-on-kyso](https://docs.kyso.io/posting-to-kyso/creating-reports-on-kyso)
{% endcontent-ref %}

**Note that you can "Open in Full Screen" on these report files to get that full HTML experience in the browser!**

<figure><img src="https://4003540104-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LjzfPqQ1fXmC4OMXwiD%2Fuploads%2FrCLycKM7wCs4u399ZZqT%2FScreenshot%202023-05-29%20at%2016.36.11.png?alt=media&#x26;token=02a3cffd-7512-4e40-bfe5-f3188ff25b35" alt=""><figcaption><p>Open HTML in full screen!</p></figcaption></figure>

{% hint style="danger" %}
If possible, don't edit the HTML file name, since this can impact the styling of the rendered report (example border overflow). HTML reports on Kyso are simply embedded iframes.
{% endhint %}

## Full Websites

There is a little more to publishing full websites over simple, single-page HTML files. For this doc, we'll use Jupyter Books as an example. But do note that Kyso will render any website.

{% hint style="info" %}
Since websites entail publishing not just one file, but many, potentially with lots of other accompanying files & sub-folders, users should publish these to Kyso using the CLI tool.
{% endhint %}

## 1. Jupyter Books <a href="#compiling-a-jupyter-book" id="compiling-a-jupyter-book"></a>

A Jupyter Book is compiled to HTML from multiple Jupyter Notebooks, with optional JS and/or CSS styling. See Jupyter's gallery for examples:&#x20;

<https://executablebooks.org/en/latest/gallery.html>​

We cover the basics of Jupyter Book creation in this document. Please refer to the official Jupyter documentation for more robust information on creating your Book reports:&#x20;

<https://jupyterbook.org/en/stable/intro.html>

### Installation <a href="#installation" id="installation"></a>

First you need to install the jupyter-book package. You can install Jupyter Book via `pip`:

```
// pip install -U jupyter-book
```

or via [`conda-forge`](https://conda-forge.org/):&#x20;

```
// conda install -c conda-forge jupyter-book
```

This will install everything you need to build a Jupyter Book locally.

### Build your book's HTML <a href="#build-your-books-html" id="build-your-books-html"></a>

Once you’ve added content (notebooks) and configured your book, it’s time to build outputs for your book.&#x20;

You can 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:

```
// jupyter-book build mybookname/
```

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:

```
mybookname
 └──_build
    └── html
       ├── _images
       ├── _static
       ├── index.html
       ├── intro.html
       ...
```

You can now publish to Kyso. Make sure you specify the main file in the reports YAML, for example:

```
main: _build/html/index.html
```
