Skip to content

Commit a45288c

Browse files
committed
fix #90; document data loader types
1 parent 46fd9de commit a45288c

File tree

1 file changed

+34
-1
lines changed

1 file changed

+34
-1
lines changed

docs/kit.html

Lines changed: 34 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,8 @@
106106
- `pinned` - if present, show the cell's source code
107107
- `hidden` - if present, suppress the cell's implicit display
108108
- `output` - for non-JavaScript cells, how to expose the value
109-
- `database` - for SQL cells, which database to query
109+
- `database` - for [SQL cells](./databases), which database to query
110+
- `format` - for [data loader cells](./data-loaders), the output format
110111
- `id` - the cell identifier, for stable editing (optional)
111112
</script>
112113
<script id="49" type="text/markdown">
@@ -120,6 +121,9 @@
120121
- `application/x-tex` - ${tex`\TeX`}
121122
- `text/vnd.graphviz` - DOT (Graphviz)
122123
- `application/vnd.observable.javascript` - Observable JavaScript
124+
- `application/vnd.node.javascript` - Node.js
125+
- `text/x-python` - Python
126+
- `text/x-r` - R
123127

124128
Here's an example of each supported cell type.
125129
</script>
@@ -198,6 +202,35 @@ <h1>Hello, <i>world</i>!</h1>
198202
<\/script>
199203
```
200204
</script>
205+
<script id="87" type="text/markdown">
206+
A Node.js (`application/vnd.node.javascript`) data loader cell:
207+
208+
```html
209+
<script type="application/vnd.node.javascript">
210+
process.stdout.write("hello world");
211+
<\/script>
212+
```
213+
</script>
214+
<script id="89" type="text/markdown">
215+
A Python (`text/x-python`) data loader cell:
216+
217+
```html
218+
<script type="text/x-python">
219+
import sys
220+
221+
sys.stdout.write("hello world")
222+
<\/script>
223+
```
224+
</script>
225+
<script id="91" type="text/markdown">
226+
An R (`text/x-r`) data loader cell:
227+
228+
```html
229+
<script type="text/r">
230+
cat("hello world")
231+
<\/script>
232+
```
233+
</script>
201234
<script id="51" type="text/markdown">
202235
The `pinned` attribute determines whether to show the cell's source code. The `hidden` attribute suppresses the cell's implicit display; for example, you can use it hide a SQL cell's results table. Cells can also have an `id` attribute to indicate a unique (positive integer) identifier; an `id` isn't required, but gives cells a stable identity for editing.
203236
</script>

0 commit comments

Comments
 (0)