• Stars
    star
    138
  • Rank 264,508 (Top 6 %)
  • Language
    TeX
  • License
    BSD 3-Clause "New...
  • Created over 4 years ago
  • Updated 12 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Cookiecutter template for a simple jupyter book

Cookiecutter Jupyter Book

tests deploy release python os

A cookiecutter template for creating a simple Jupyter Book. See the rendered version of this cookiecutter template here.

Template

An example template created by this cookiecutter is shown below:

my_book
β”œβ”€β”€ .github
β”‚   └── workflows
β”‚       └── deploy.yml
β”œβ”€β”€ CONDUCT.md
β”œβ”€β”€ CONTRIBUTING.md
β”œβ”€β”€ LICENSE
β”œβ”€β”€ my_book
β”‚   β”œβ”€β”€ _config.yml
β”‚   β”œβ”€β”€ _toc.yml
β”‚   β”œβ”€β”€ content.md
β”‚   β”œβ”€β”€ intro.md
β”‚   β”œβ”€β”€ logo.png
β”‚   β”œβ”€β”€ markdown.md
β”‚   β”œβ”€β”€ markdown-notebooks.md
β”‚   β”œβ”€β”€ notebooks.ipynb
β”‚   └── references.bib
β”œβ”€β”€ README.md
└── requirements.txt

Usage

  1. Install Cookiecutter if you haven't installed it yet:
$ pip install -U cookiecutter jupyter-book
  1. Use cookiecutter-jupyter-book to generate a Jupyter Book template and fill out the requested information (default templating values are shown in square brackets [] and will be used if no other information is entered):
$ cookiecutter [email protected]:executablebooks/cookiecutter-jupyter-book.git

author_name [Captain Jupyter]: Tomas Beuzen
github_username [tomasbeuzen]:
book_name [My Book]:
book_slug [my_book]:
book_short_description [This cookiecutter creates a simple boilerplate for a Jupyter Book.]: My first Jupyter Book!
version ['0.1.0']:
Select open_source_license:
1 - MIT license
2 - BSD license
3 - Apache Software License 2.0
4 - CC BY 4.0
5 - CC BY-SA 4.0
6 - None
Choose from 1, 2, 3, 4, 5, 6 [1]:
Select include_ci:
1 - github
2 - gitlab
3 - no
Choose from 1, 2, 3 [1]:
  1. Install the Jupyter Book package requirements from the requirements.txt file (it is recommended to do this in a virtual environment, e.g., using conda):
# Optional steps to create and activate virtual environment
$ conda create --name mybook python=3.8 -y
$ conda activate mybook
$ cd my_book
$ pip install -r requirements.txt
  1. Build the HTML render of your Jupyter Book:
$ jupyter-book build my_book/
  1. View your rendered book in my_book/_build/html/index.html.

  2. Make edits to your book by adding more content, updating the table of contents in my_book/_toc.yml, and and/or by editing the configuration file my_book/_config.yml. See the Jupyter Book documentation for more information on customizing your book.

  3. cookiecutter-jupyter-book optionally comes with CI workflow files to help easily deploy your book online. A CI workflow file would have been included in your directory structure if you chose 1 - github or 2 - gitlab for Select include_ci_files: in Step 2 above. For example, if you chose 1 - github, when ready to deploy your book online:

    1. Make sure your book builds locally as expected (jupyter-book build my_book/) and that you have updated the requirements.txt file to include any additional packages required to build your book;

    2. Create a new public GitHub repository to host your book;

    3. Push your local book (including the .github hidden directory) to your GitHub repository. There are many ways to do this, for example:

      $ git init
      $ git add .
      $ git commit -m "first commit"
      $ git remote add origin [email protected]:<user>/<repository-name>.git
      $ git push -u origin main
    4. The GitHub Actions workflow provided with the cookiecutter (my_book/.github/workflows/deploy.yml) will automatically deploy your book to the gh-pages branch of your repository once pushed. It is typically available after a few minutes at https://<user>.github.io/<myonlinebook>/. You may need to go to the Settings tab of your repository and under the GitHub Pages heading, choose the gh-pages branch from the Source drop-down list. For alternative methods of deploying your book online, see the See the Jupyter Book documentation.

    Note: by default, the GitHub Actions workflow file included with this cookiecutter builds the book with Ubuntu and Python 3.8. You can modify the OS/Python version for the build in the .github/workflows/deploy.yml file on lines 15 and 16 respectively.

    Read more about GitHub Pages and Jupyter Book here, or using GitLab Pages here.

Contributing

We welcome and recognize all contributions. If you'd like to contribute to the project by providing feedback, identifying a bug or working on a new feature, check out the contributing guide to get started.

You can see a list of current contributors in the contributors tab.

Acknowledgements

This template was inspired and made possible by the Cookiecutter project and the Jupyter Book project.

More Repositories

1

jupyter-book

Create beautiful, publication-quality books and documents from computational content.
Python
3,698
star
2

MyST-Parser

An extended commonmark compliant parser, with bridges to docutils/sphinx
Python
690
star
3

markdown-it-py

Markdown parser, done right. 100% CommonMark support, extensions, syntax plugins & high speed. Now in Python!
Python
626
star
4

sphinx-autobuild

Watch a Sphinx directory and rebuild the documentation when a change is detected. Also includes a livereload enabled web server.
Python
480
star
5

sphinx-book-theme

A clean book theme for scientific explanations and documentation with Sphinx
Jupyter Notebook
438
star
6

mdformat

CommonMark compliant Markdown formatter
Python
401
star
7

thebe

Turn static HTML pages into live documents with Jupyter kernels.
Jupyter Notebook
378
star
8

sphinx-tabs

Tabbed views for Sphinx
HTML
265
star
9

sphinx-copybutton

Add a "copy" button to code blocks in Sphinx
JavaScript
231
star
10

MyST-NB

Parse and execute ipynb files in Sphinx
Jupyter Notebook
207
star
11

sphinx-design

A sphinx extension for designing beautiful, screen-size responsive web components.
Python
180
star
12

mystmd

Command line tools for working with MyST Markdown.
TypeScript
161
star
13

jupyterlab-myst

Use MyST Markdown directly in Jupyter Lab
TypeScript
129
star
14

meta

A community dedicated to supporting tools for technical and scientific communication and interactive computing
129
star
15

sphinx-panels

A sphinx extension for creating panels in a grid layout
Python
85
star
16

rst-to-myst

Convert ReStructuredText to MyST Markdown
Python
58
star
17

github-activity

Simple markdown changelogs for GitHub repositories
Python
48
star
18

jupyter-cache

A defined interface for working with a cache of executed jupyter notebooks
Jupyter Notebook
44
star
19

sphinx-togglebutton

Show and hide content with a button in Sphinx
JavaScript
42
star
20

myst-vs-code

A syntax highlighter for the MyST Markdown format
TypeScript
35
star
21

quantecon-mini-example

A short example showing how to write a lecture series using Jupyter Book 2.0.
Python
34
star
22

sphinx-external-toc

A sphinx extension that allows the site-map to be defined in a single YAML file
Python
31
star
23

sphinx-proof

A Sphinx extension for producing proof, theorem, lemma, definition, remark, conjecture, corollary and algorithm directives.
Python
30
star
24

sphinx-jupyterbook-latex

Supporting LaTeX infrastructure for Jupyter Book
Python
28
star
25

sphinx-thebe

A Sphinx extension to convert static code into interactive code cells with Jupyter, Thebe, and Binder.
Python
28
star
26

mdit-py-plugins

Collection of core plugins for markdown-it-py
Python
28
star
27

sphinx-comments

hypothes.is interaction layer with Sphinx
Python
21
star
28

sphinx-exercise

A Sphinx extension for producing exercise and solution directives.
HTML
18
star
29

sphinx-multitoc-numbering

A Sphinx extension to support continuous numbering of sections across multiple tocs in HTML output.
Python
14
star
30

sphinx-remove-toctrees

Speed up Sphinx builds by selectively removing toctrees from some pages
Python
14
star
31

github-action-demo

A demonstration repository to build and host a book with GitHub Actions
TeX
14
star
32

quantecon-example

A demonstration of Jupyter Book functionality using QuantEcon Python programming source material.
Python
14
star
33

myst-spec

MyST is designed to create publication-quality, computational documents written entirely in Markdown.
TypeScript
13
star
34

markdown-it-docutils

A markdown-it plugin for implementing docutils style roles/directives.
TypeScript
12
star
35

mdformat-tables

An mdformat plugin for rendering tables
Python
11
star
36

mdurl

URL utilities for markdown-it (a Python port)
Python
11
star
37

jupyterlab-mystjs

Jupyterlab extension using the MySTjs parser
TypeScript
8
star
38

myst-enhancement-proposals

MyST Enhancement Proposals (MEPs)
8
star
39

myst-theme

Packages for creating MyST websites themes using React and Remix
TypeScript
8
star
40

mdformat-myst

Mdformat plugin for MyST compatibility
Python
7
star
41

cli

πŸ›‘πŸ›‘DEPRECATED, see https://github.com/ExecutableBookProject/jupyter-bookπŸ›‘πŸ›‘
Python
7
star
42

web-compile

A CLI to compile/minify SCSS & JS, and associated pre-commit hook.
Python
7
star
43

unified-myst

A repository of packages for working with MyST in the https://unifiedjs.com/ ecosystem
JavaScript
6
star
44

markdown-it-plugin-template

A template for creating a markdown-it plugin.
JavaScript
6
star
45

sphinx-ext-mystmd

Integrate existing Sphinx projects with MyST-MD
Python
5
star
46

sphinx-examples

A Sphinx extension to create examples of source markdown and the result of rendering it.
Python
5
star
47

sphinx-ext-autodoc

Auto-documentation for sphinx extension components
Python
5
star
48

sphinx-tomyst

A sphinx translator for producing myst syntax files
Python
4
star
49

mistletoe-ebp

The EPB fork of mistletoe: A fast, extensible and spec-compliant Markdown parser in pure Python.
Python
4
star
50

jupyterlab-myst-quickstart

Quickstart examples for working with MyST in Jupyter
Jupyter Notebook
4
star
51

mdformat-plugin

A template for creating an mdformat parser extension plugin
Python
4
star
52

rst2myst

Tools for converting RST files to MyST-NB files
Python
4
star
53

myst-react

A web-based UI for rendering MyST Markdown
TypeScript
4
star
54

.github

Community health files: Contributing guidelines, Code of Conduct, ...
4
star
55

markdown-it-dollarmath

A markdown-it plugin for $-delimited math
TypeScript
4
star
56

myst

Myst - Markedly Structured Text
3
star
57

python-pkg-cookiecutter

A cookiecutter for python packages, with docs and GitHub Actions CI
Python
3
star
58

mdformat-footnote

Footnote format addition for mdformat
Python
3
star
59

markdown-it-amsmath

A markdown-it plugin for amsmath LaTeX environments.
TypeScript
3
star
60

markdown-it-myst-extras

Additional plugins required for the MyST specification
TypeScript
2
star
61

myst-standard

A meta-repository to discuss and plan for the MyST standard
2
star
62

mystmd-quickstart

Repository to be used in the mystjs quickstart guide
Jupyter Notebook
2
star
63

myst-book-theme

A lightweight MyST theme designed to mimic the look-and-feel of an interactive book.
TypeScript
2
star
64

sphinx-jupyter-book-theme

An experimental Sphinx theme for Jupyter Book
HTML
2
star
65

myst-article-theme

A light-weight theme for rendering scientific articles and associated notebooks
TypeScript
2
star
66

mystmd.org

The website theme and landing content for mystmd.org
TypeScript
2
star
67

write_ups

Write ups and publications that document the project
1
star
68

sphinx-conditional-asset

A small extension for developers of Sphinx to conditionally add assets to a page.
Python
1
star
69

sphinx-yaml-config

Python
1
star