Skip to content

Instantly share code, notes, and snippets.

@Luv2C0d3
Last active February 6, 2023 06:00
Show Gist options
  • Select an option

  • Save Luv2C0d3/a885313fe23da98dd2b826f04541e6f6 to your computer and use it in GitHub Desktop.

Select an option

Save Luv2C0d3/a885313fe23da98dd2b826f04541e6f6 to your computer and use it in GitHub Desktop.

Revisions

  1. Luv2C0d3 revised this gist Feb 6, 2023. 1 changed file with 6 additions and 0 deletions.
    6 changes: 6 additions & 0 deletions JupyterBooks cookbook
    Original file line number Diff line number Diff line change
    @@ -16,3 +16,9 @@ ghp-import -n -p -f _build/html
    #
    # Once done, it should take a few minutes until the book is available at
    # https://<user>.github.io/<myonlinebook>/.

    #
    # To check pages locally
    # If on windows simply open with explorer or directly from browser the pages in the filesystem.
    # If on WSL2 or want to go through a server, simply start the python http server
    python -m http.server 8000
  2. Luv2C0d3 created this gist Feb 6, 2023.
    18 changes: 18 additions & 0 deletions JupyterBooks cookbook
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,18 @@
    # Mostly from this https://jupyterbook.org/en/stable/start/your-first-book.html
    # Install globally or in venv
    pip install jupyter-book

    # Create a template jupyter-book
    jupyter-book create mynewbook

    # Build book
    cd mynewbook
    jupyter-book build .

    # To publish to git
    pip install ghp-import
    # Do a ghp-import from the html folder to the gh-pages branch
    ghp-import -n -p -f _build/html
    #
    # Once done, it should take a few minutes until the book is available at
    # https://<user>.github.io/<myonlinebook>/.