Skip to content

Commit 2741838

Browse files
committed
docs: initial version of starter notebook
1 parent 53ac4ce commit 2741838

File tree

2 files changed

+57
-3
lines changed

2 files changed

+57
-3
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Follow these three simple steps:
1111

1212
## 📚 Create repository for your notebook
1313

14-
[Click here](https://github.com/ottomatica/docable-starter-template/generate) to use this repository as a template for your first notebook, or alternatively [fork it](https://github.com/ottomatica/docable-starter-template/fork).
14+
[Click here](https://github.com/ottomatica/docable-starter-template/generate) to use this repository as a _template_ for your first notebook, or alternatively [fork it](https://github.com/ottomatica/docable-starter-template/fork).
1515

1616
Each Docable notebook is managed and stored in its own GitHub repository. Think of a GitHub repository as the whole notebook 📒 and its markdown files as the pages of the notebook 📄. You can create a new repo or use one of your existing ones. However, for this quick onboarding guide we recommend [using this repository as a template](https://github.com/ottomatica/docable-starter-template/generate) because it already contains a few example notebooks which will be useful to use as a starting point.
1717

@@ -26,13 +26,13 @@ cd docable-starter-template
2626
code starter-notebook.md # we're using VS Code here, but feel free to use anything else
2727
```
2828

29-
We included a [`starter-notebook.md`](./starter-notebook.md) in this repository. It includes explaination of the structure of a notebook file, and the supported content.
29+
👉 We included a [`starter-notebook.md`](./starter-notebook.md) in this repository. It includes explaination of the structure of a notebook file, and the supported content.
3030

3131
## 🚀 Publish
3232

3333
[Login to `https://docable.cloud`](https://docable.cloud/login) using your GitHub account.
3434

35-
> If it's your first time using `docable.cloud`, you will see a list of permissions we need to be able to create your account. Please read them and accept to continue.
35+
> _If it's your first time using `docable.cloud`, you will see a list of permissions we need to be able to create your account. Please read them and accept to continue._
3636
3737
<p align="center">
3838
<img src="img/docable-github-publishing.png" width="75%">

starter-notebook.md

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
<!--
2+
targets:
3+
- type: docker
4+
name: starter-notebook
5+
image: node:12-buster
6+
-->
7+
8+
# Starter Notebook bab
9+
10+
In this starter notebook, we explain the basic structure of a notebook file as well as some examples of supported interactive content.
11+
12+
Docable notebooks are markdown files which are rendered as an interactive document supporting infrastructure needed for exeuting it. The notebook files consist of two parts:
13+
14+
-[Setup (optional)]()
15+
- 📄 [Notebook content](#-notebook-content)
16+
17+
## ⚙ Setup (optional)
18+
19+
> _The setup is optional and is only recommended if you need to use our more advanced computing environment management features. Otherwise our defaults will usually be sufficient._
20+
21+
Setup is written as a _commented_ YAML snippet in the beginning your notebook file. In setup you can specify settings related to target environments in this notebook. For example, you can configure setup to create multiple target environments which will be accessible in the notebook, or use a specific Docker image.
22+
23+
Here is an example for a notebook with one target environment, using `node:12-buster` Docker image. Note, if you don't include a setup snippet at all, this is the default Docable uses:
24+
25+
```
26+
<!--
27+
targets:
28+
- type: docker
29+
name: starter-notebook
30+
image: node:12-buster
31+
-->
32+
```
33+
34+
## 📄 Notebook content
35+
36+
The content is written in markdown (Docable also supports custom HTML snippets too, for example you can embedding your external window etc.). And to create the interactive parts of notebook, the Docable cells, we use custom markdown annotations as explained below.
37+
38+
> _Our custom annotations are ignored by GitHub rendering, so you can even make your `README.md` file be an interactive notebook when viewed on `docable.cloud` while still looking the same as before when viewed on GitHub._
39+
40+
Here is an example of this custom markdown annotation:
41+
42+
```bash | {type: 'command'}
43+
echo "hello world"
44+
```
45+
46+
This ☝ is similar to a normal markdown code block with language set to `bash`. And Docable's annotation is the JSON after code block's language: `| {type: 'command'}`. This tells Docable to make code block an interactive cell behaving as a `command`. Here is how it looks when viwed as a notebook ([click here to view this on docable.cloud](https://docable.cloud/ottomatica/docable-starter-template/starter-notebook.md)):
47+
48+
```bash | {type: 'command'}
49+
echo "hello world"
50+
```
51+
52+
You just created your first interactive notebook cell! 🎉
53+
54+
...

0 commit comments

Comments
 (0)