Automatically building and hosting your book with Netlify
Although Netlify has both free and paid tiers, the build process is the same across both.Importantly, the free tier only allows for 100GB of bandwidth usage per month across all of your Netlify built projects.
If your Jupyter Book will be used by a large audience, or if you're creating many Jupyter Books, you might want to consider registering for a paid account.You can also instead automatically build your Jupyter Book with CircleCI, using the configuration shown in the section on .
In order to use Netlify, you'll need to create an account.Here, we'll walk through connecting your Jupyter Book to Netlify's continous deployment services using their UI.You can also check out their .
Prerequisites
We assume that you have already built your book's HTML and thatyour HTML content is in the folder. We also assume that you have a.
After you've created a Netlify account, you'll need to log in.The home page will be a dashboard of all sites you're currently building with Netlify.We can then import a new site by clicking the "New Site from Git" button in the upper right.
Here, you can select the git client where your Jupyter Book is hosted.For the purposes of this tutorial, we'll assume that your book is hosted on GitHub.
When you select the "GitHub" option, you'll be asked to grant permission for Netlify to access your GitHub account.Authorizing access will take you to the next step of the build process, where you can select your Jupyter Book repository.
Once you've selected the correct repository, you'll need to supply build instructions.For a standard Jupyter Book, the build instructions should build the book and then serve the resulting HTML with Jekyll.That is, the Build command should be make site && jekyll build
and the Publish directory should be .
You'll also need to select the appropriate branch to build your repository from.In this example, we'll use the master
branch.
Note: The default python environment is python 2.7,which means that some packages may fail to install.You can update the python environment by supplying a file,as detailed in the Netlify documentation.For a full list of available environments,please see the .
You can then select Deploy site and wait for the site to build.You'll be re-directed to the site dashboard during the build process.
Step 2: Updating your domain name
If your site has successfully built, it will be assigned a random domain name.In order to have a more memorable address, you can update your site's name.
From the site dashboard, select Domain settings.This will take you to a sub-menu, where you can choose to update your site name.
You can enter a memorable, unique name here to describe your Jupyter Book!Note that it will be prepended to .netlify.com
so, will become MY-BOOK.netlify.com
.
This page was created by