-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #40 from executablebooks/update-licenses
🔧 MAINTAIN: add CC licenses and update template files
- Loading branch information
Showing
10 changed files
with
906 additions
and
146 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ | |
![tests](https://github.com/executablebooks/cookiecutter-jupyter-book/workflows/tests/badge.svg) | ||
![deploy](https://github.com/executablebooks/cookiecutter-jupyter-book/workflows/deploy/badge.svg) | ||
[![release](https://img.shields.io/github/release/executablebooks/cookiecutter-jupyter-book.svg)](https://github.com/executablebooks/cookiecutter-jupyter-book/releases) | ||
[![python](https://img.shields.io/badge/python-3.7%2C%203.8-blue)]() | ||
[![python](https://img.shields.io/badge/python-3.8%2C%203.9%2C%203.10-blue)]() | ||
[![os](https://img.shields.io/badge/OS-Ubuntu%2C%20Mac%2C%20Windows-yellow)]() | ||
|
||
<p align="center"> | ||
|
@@ -31,6 +31,7 @@ my_book | |
│ ├── intro.md | ||
│ ├── logo.png | ||
│ ├── markdown.md | ||
│ ├── markdown-notebooks.md | ||
│ ├── notebooks.ipynb | ||
│ └── references.bib | ||
├── README.md | ||
|
@@ -51,20 +52,20 @@ $ pip install -U cookiecutter jupyter-book | |
$ cookiecutter [email protected]:executablebooks/cookiecutter-jupyter-book.git | ||
|
||
author_name [Captain Jupyter]: Tomas Beuzen | ||
github_or_gitlab_username [tomasbeuzen]: | ||
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 - ISC license | ||
4 - Apache Software License 2.0 | ||
5 - GNU General Public License v3 | ||
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_files: | ||
Select include_ci: | ||
1 - github | ||
2 - gitlab | ||
3 - no | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,3 +6,4 @@ | |
sections: | ||
- file: markdown | ||
- file: notebooks | ||
- file: markdown-notebooks |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,3 +6,4 @@ root: intro | |
chapters: | ||
- file: markdown | ||
- file: notebooks | ||
- file: markdown-notebooks |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
54 changes: 54 additions & 0 deletions
54
{{cookiecutter.book_slug}}/{{cookiecutter.book_slug}}/markdown-notebooks.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
--- | ||
jupytext: | ||
cell_metadata_filter: -all | ||
formats: md:myst | ||
text_representation: | ||
extension: .md | ||
format_name: myst | ||
format_version: 0.13 | ||
jupytext_version: 1.11.5 | ||
kernelspec: | ||
display_name: Python 3 | ||
language: python | ||
name: python3 | ||
--- | ||
|
||
# Notebooks with MyST Markdown | ||
|
||
Jupyter Book also lets you write text-based notebooks using MyST Markdown. | ||
See [the Notebooks with MyST Markdown documentation](https://jupyterbook.org/file-types/myst-notebooks.html) for more detailed instructions. | ||
This page shows off a notebook written in MyST Markdown. | ||
|
||
## An example cell | ||
|
||
With MyST Markdown, you can define code cells with a directive like so: | ||
|
||
```{code-cell} | ||
print(2 + 2) | ||
``` | ||
|
||
When your book is built, the contents of any `{code-cell}` blocks will be | ||
executed with your default Jupyter kernel, and their outputs will be displayed | ||
in-line with the rest of your content. | ||
|
||
```{seealso} | ||
Jupyter Book uses [Jupytext](https://jupytext.readthedocs.io/en/latest/) to convert text-based files to notebooks, and can support [many other text-based notebook files](https://jupyterbook.org/file-types/jupytext.html). | ||
``` | ||
|
||
## Create a notebook with MyST Markdown | ||
|
||
MyST Markdown notebooks are defined by two things: | ||
|
||
1. YAML metadata that is needed to understand if / how it should convert text files to notebooks (including information about the kernel needed). | ||
See the YAML at the top of this page for example. | ||
2. The presence of `{code-cell}` directives, which will be executed with your book. | ||
|
||
That's all that is needed to get started! | ||
|
||
## Quickly add YAML metadata for MyST Notebooks | ||
|
||
If you have a markdown file and you'd like to quickly add YAML metadata to it, so that Jupyter Book will treat it as a MyST Markdown Notebook, run the following command: | ||
|
||
``` | ||
jupyter-book myst init path/to/markdownfile.md | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters