Skip to content

Commit 1f04b15

Browse files
committed
My first book!
0 parents  commit 1f04b15

File tree

138 files changed

+34604
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

138 files changed

+34604
-0
lines changed

_build/.doctrees/environment.pickle

38.9 KB
Binary file not shown.

_build/.doctrees/glue_cache.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{}

_build/.doctrees/intro.doctree

4.85 KB
Binary file not shown.
10.9 KB
Binary file not shown.

_build/.doctrees/markdown.doctree

14.3 KB
Binary file not shown.

_build/.doctrees/notebooks.doctree

11 KB
Binary file not shown.

_build/html/.buildinfo

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Sphinx build info version 1
2+
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
3+
config: fe790891f9d60a808da2c85a4b904cbc
4+
tags: 645f666f9bcd5a90fca523b33c5a78b7

_build/html/_sources/intro.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Welcome to your Jupyter Book
2+
3+
This is a small sample book to give you a feel for how book content is
4+
structured.
5+
It shows off a few of the major file types, as well as some sample content.
6+
It does not go in-depth into any particular topic - check out [the Jupyter Book documentation](https://jupyterbook.org) for more information.
7+
8+
Check out the content pages bundled with this sample book to see more.
9+
10+
```{tableofcontents}
11+
```
Lines changed: 106 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,106 @@
1+
{
2+
"cells": [
3+
{
4+
"cell_type": "markdown",
5+
"id": "8352e697",
6+
"metadata": {},
7+
"source": [
8+
"# Notebooks with MyST Markdown\n",
9+
"\n",
10+
"Jupyter Book also lets you write text-based notebooks using MyST Markdown.\n",
11+
"See [the Notebooks with MyST Markdown documentation](https://jupyterbook.org/file-types/myst-notebooks.html) for more detailed instructions.\n",
12+
"This page shows off a notebook written in MyST Markdown.\n",
13+
"\n",
14+
"## An example cell\n",
15+
"\n",
16+
"With MyST Markdown, you can define code cells with a directive like so:"
17+
]
18+
},
19+
{
20+
"cell_type": "code",
21+
"execution_count": 1,
22+
"id": "d22cd780",
23+
"metadata": {},
24+
"outputs": [
25+
{
26+
"name": "stdout",
27+
"output_type": "stream",
28+
"text": [
29+
"4\n"
30+
]
31+
}
32+
],
33+
"source": [
34+
"print(2 + 2)"
35+
]
36+
},
37+
{
38+
"cell_type": "markdown",
39+
"id": "03bfb507",
40+
"metadata": {},
41+
"source": [
42+
"When your book is built, the contents of any `{code-cell}` blocks will be\n",
43+
"executed with your default Jupyter kernel, and their outputs will be displayed\n",
44+
"in-line with the rest of your content.\n",
45+
"\n",
46+
"```{seealso}\n",
47+
"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).\n",
48+
"```\n",
49+
"\n",
50+
"## Create a notebook with MyST Markdown\n",
51+
"\n",
52+
"MyST Markdown notebooks are defined by two things:\n",
53+
"\n",
54+
"1. YAML metadata that is needed to understand if / how it should convert text files to notebooks (including information about the kernel needed).\n",
55+
" See the YAML at the top of this page for example.\n",
56+
"2. The presence of `{code-cell}` directives, which will be executed with your book.\n",
57+
"\n",
58+
"That's all that is needed to get started!\n",
59+
"\n",
60+
"## Quickly add YAML metadata for MyST Notebooks\n",
61+
"\n",
62+
"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:\n",
63+
"\n",
64+
"```\n",
65+
"jupyter-book myst init path/to/markdownfile.md\n",
66+
"```"
67+
]
68+
}
69+
],
70+
"metadata": {
71+
"jupytext": {
72+
"cell_metadata_filter": "-all",
73+
"formats": "md:myst",
74+
"text_representation": {
75+
"extension": ".md",
76+
"format_name": "myst",
77+
"format_version": 0.13,
78+
"jupytext_version": "1.11.5"
79+
}
80+
},
81+
"kernelspec": {
82+
"display_name": "Python 3",
83+
"language": "python",
84+
"name": "python3"
85+
},
86+
"language_info": {
87+
"codemirror_mode": {
88+
"name": "ipython",
89+
"version": 3
90+
},
91+
"file_extension": ".py",
92+
"mimetype": "text/x-python",
93+
"name": "python",
94+
"nbconvert_exporter": "python",
95+
"pygments_lexer": "ipython3",
96+
"version": "3.9.12"
97+
},
98+
"source_map": [
99+
14,
100+
26,
101+
28
102+
]
103+
},
104+
"nbformat": 4,
105+
"nbformat_minor": 5
106+
}
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
---
2+
jupytext:
3+
cell_metadata_filter: -all
4+
formats: md:myst
5+
text_representation:
6+
extension: .md
7+
format_name: myst
8+
format_version: 0.13
9+
jupytext_version: 1.11.5
10+
kernelspec:
11+
display_name: Python 3
12+
language: python
13+
name: python3
14+
---
15+
16+
# Notebooks with MyST Markdown
17+
18+
Jupyter Book also lets you write text-based notebooks using MyST Markdown.
19+
See [the Notebooks with MyST Markdown documentation](https://jupyterbook.org/file-types/myst-notebooks.html) for more detailed instructions.
20+
This page shows off a notebook written in MyST Markdown.
21+
22+
## An example cell
23+
24+
With MyST Markdown, you can define code cells with a directive like so:
25+
26+
```{code-cell}
27+
print(2 + 2)
28+
```
29+
30+
When your book is built, the contents of any `{code-cell}` blocks will be
31+
executed with your default Jupyter kernel, and their outputs will be displayed
32+
in-line with the rest of your content.
33+
34+
```{seealso}
35+
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).
36+
```
37+
38+
## Create a notebook with MyST Markdown
39+
40+
MyST Markdown notebooks are defined by two things:
41+
42+
1. YAML metadata that is needed to understand if / how it should convert text files to notebooks (including information about the kernel needed).
43+
See the YAML at the top of this page for example.
44+
2. The presence of `{code-cell}` directives, which will be executed with your book.
45+
46+
That's all that is needed to get started!
47+
48+
## Quickly add YAML metadata for MyST Notebooks
49+
50+
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:
51+
52+
```
53+
jupyter-book myst init path/to/markdownfile.md
54+
```

0 commit comments

Comments
 (0)