Web output

You can run the website version of your project by running:

npm run electric-book -- output

Using GitHub Pages

If you activate GitHub Pages in your repository settings on GitHub.com, GitHub will host your built site for free. GitHub will assign the site a URL by default that looks like username.github.io/reponame. You can then set up a custom domain name by pointing your own domain at GitHub’s servers, and putting a CNAME file containing that domain name in your project’s root directory.

See GitHub’s help docs for guidance on how to do this.

In your Electric Book project, you must update the baseurl in _config.yml for this to work.

This is because your site is being served at a subdirectory-like URL, and all links in your book must be relative to that full URL. For instance, it must know that your website’s CSS is at farmerjane.github.io/superpotatoes/book/styles/web.css, and not farmerjane.github.io/book/styles/web.css.