-
Notifications
You must be signed in to change notification settings - Fork 0
/
about_nimibook.html
344 lines (324 loc) Β· 10.3 KB
/
about_nimibook.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
<!DOCTYPE html>
<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="content-type">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/reveal.js/5.0.4/reveal.min.css" crossorigin="anonymous" referrerpolicy="no-referrer" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/reveal.js/5.0.4/theme/black.min.css" crossorigin="anonymous" referrerpolicy="no-referrer" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/reveal.js/5.0.4/plugin/highlight/monokai.min.css" crossorigin="anonymous" referrerpolicy="no-referrer" />
<style>
:root {
--r-background-color: #181922;
--r-heading-color: #FFE953;
--r-link-color: #FFE953;
--r-selection-color: #FFE953;
--r-link-color-dark: darken(#FFE953 , 15%)
}
.reveal ul, .reveal ol {
display: block;
text-align: left;
}
li::marker {
color: #FFE953;
content: "Β»";
}
li {
padding-left: 12px;
}
</style>
</head>
<body>
<div class="reveal">
<div class="slides">
<style>
.reveal strong {
color: #02A4BD;
font-style: normal;
}
</style>
<section data-nimib-slide-number="1" >
<h2>Intro to Nimibook</h2>
</section>
<section data-nimib-slide-number="2" >
<section data-nimib-slide-number="3" data-auto-animate >
<h3>What is Nimibook ππ</h3>
</section>
<section data-nimib-slide-number="4" data-auto-animate >
<h3>What is Nimibook ππ</h3>
<p>nimib works for single documents</p>
</section>
<section data-nimib-slide-number="5" data-auto-animate >
<h3>What is Nimibook ππ</h3>
<p>nimib works for single documents</p>
<p>how do we show a collection of documents?</p>
</section>
<section data-nimib-slide-number="6" data-auto-animate >
<h3>What is Nimibook ππ</h3>
<p>nimib works for single documents</p>
<p>how do we show a collection of documents?</p>
<p>enter Nimibook!</p>
</section>
<section data-nimib-slide-number="7" data-auto-animate >
<h3>What is Nimibook ππ</h3>
<p>Nimibook is</p>
</section>
<section data-nimib-slide-number="8" data-auto-animate >
<h3>What is Nimibook ππ</h3>
<p>Nimibook is</p>
<ol>
<li>a minimal <strong>static site generator</strong> for nimib</li>
</ol>
</section>
<section data-nimib-slide-number="9" data-auto-animate >
<h3>What is Nimibook ππ</h3>
<p>Nimibook is</p>
<ol>
<li>a minimal <strong>static site generator</strong> for nimib</li>
</ol>
<ol start="2">
<li>implemented using <strong>theme</strong> feature of nimib</li>
</ol>
</section>
<section data-nimib-slide-number="10" data-auto-animate >
<h3>What is Nimibook ππ</h3>
<p>Nimibook is</p>
<ol>
<li>a minimal <strong>static site generator</strong> for nimib</li>
</ol>
<ol start="2">
<li>implemented using <strong>theme</strong> feature of nimib</li>
</ol>
<ol start="3">
<li>a port of <a href="">mdbook</a></li>
</ol>
</section>
<section data-nimib-slide-number="11" data-auto-animate >
<h3>What is Nimibook ππ</h3>
<ol>
<li>a minimal <strong>static site generator</strong> for nimib</li>
</ol>
<ol start="2">
<li>implemented using <strong>theme</strong> feature of nimib</li>
</ol>
<ol start="3">
<li>a port of <a href="">mdbook</a></li>
</ol>
</section>
<section data-nimib-slide-number="12" data-auto-animate >
<p>Nimibook is</p>
<ol start="3">
<li>a port of <a href="">mdbook</a></li>
</ol>
<p>so...</p>
</section>
<section data-nimib-slide-number="13" data-auto-animate >
<p>Nimibook is</p>
<ol start="3">
<li>a port of <a href="">mdbook</a></li>
</ol>
<p>so...</p>
<h3>What is mdbook</h3>
</section>
<section data-nimib-slide-number="14" data-auto-animate >
<h3>What is mdbook</h3>
<ol>
<li>a popular <strong>static site generator</strong> (π¦)</li>
</ol>
</section>
<section data-nimib-slide-number="15" data-auto-animate >
<h3>What is mdbook</h3>
<ol>
<li>a popular <strong>static site generator</strong> (π¦)</li>
</ol>
<ol start="2">
<li>with a single book 'theme'</li>
</ol>
</section>
<section data-nimib-slide-number="16" data-auto-animate >
<h3>What is mdbook</h3>
<ol>
<li>a popular <strong>static site generator</strong> (π¦)</li>
</ol>
<ol start="2">
<li>with a single book 'theme'</li>
</ol>
<ol start="3">
<li>and with minimal customization</li>
</ol>
</section>
<section data-nimib-slide-number="17" >
<h3>a mdbook example</h3>
</section>
<section data-nimib-slide-number="18" >
<figure>
<img src="nimdays.png" alt="">
<figcaption></figcaption>
</figure>
<p><a href="https://xmonader.github.io/nimdays/day16_asciitables.html">xmonader.github.io/nimdays</a></p>
</section>
<section data-nimib-slide-number="19" >
<h3>SUMMARY.MD</h3>
<pre><code class="language-md"># Nim Days
Documenting my days with The Nim Programming language.
- [Intro](book_intro.md)
- [Day 1 DMIDecode](day01_dmidecode.md)
- [Day 2: Parsing Bencode](day02_bencode.md)
- [Day 3: FFI and Libmagic](day03_libmagic.md)
- ...
</code></pre>
</section>
<section data-nimib-slide-number="20" >
<h3>content.MD</h3>
<pre><code class="language-md">or let nim decide for you
```nim
t.tableWidth = 0
printTable(t)
```
```
+---+-------+---------+
|ID |Name |Date |
+---+-------+---------+
|1 |Aaaa |2018-10-2|
+---+-------+---------+
```
</code></pre>
</section>
</section>
<section data-nimib-slide-number="21" >
<section data-nimib-slide-number="22" >
<h3>A nimibook example</h3>
</section>
<section data-nimib-slide-number="23" >
<figure>
<img src="scinim.png" alt="">
<figcaption></figcaption>
</figure>
<p><a href="https://scinim.github.io/getting-started/basics/basic_plotting.html">scinim.github.io/getting-started</a></p>
</section>
<section data-nimib-slide-number="24" >
<h3><code>toc.nim</code></h3>
<pre><code class="language-nim">import nimibook
var book = initBookWithToc:
entry("Introduction", "index.md")
entry("Ecosystem overview", "overview/index.md")
section("Basic topics", "basics/index.md"):
entry("Common datatypes", "common_datatypes")
entry("Data wrangling with dataframes", "data_wrangling")
entry("Plotting", "basic_plotting")
...
nimibookCli(book)
</code></pre>
</section>
<section data-nimib-slide-number="25" >
<h3><code>content.nim</code></h3>
<pre><code class="language-nim">import nimib, nimibook
nbInit(theme = useNimibook)
nbCode:
import ggplotnim
let x1 = @[0.0, 1.0, 2.0, 3.0]
let y1 = @[0.0, 1.0, 4.0, 9.0]
let df1 = toDf(x1, y1)
ggplot(df1, aes("x1", "y1")) +
geom_line() +
ggsave("images/line_plot.png")
nbImage("images/line_plot.png")
</code></pre>
</section>
</section>
<section data-nimib-slide-number="26" >
<section data-nimib-slide-number="27" >
<h3>How I start</h3>
</section>
<section data-nimib-slide-number="28" data-auto-animate >
<h4><code>nim r toc init</code></h4>
<p>In a new folder create a <code>toc.nim</code> file:</p>
<pre><code class="language-nim">import nimibook
var book = initBookWithToc:
entry("Introduction", "index.md")
entry("Example", "example")
nimibookCli(book)
</code></pre>
<small><p>you can pick any name instead of <code>toc</code> (e.g <code>nbook</code>, ...)</p></small>
</section>
<section data-nimib-slide-number="29" data-auto-animate >
<h4><code>nim r toc init</code></h4>
<p>result:</p>
<pre><code>.
βββ book
β βββ example.nim
β βββ index.md
βββ docs
β βββ assets
β βββ ...
βββ nimib.toml
βββ toc.nim
</code></pre>
</section>
<section data-nimib-slide-number="30" data-auto-animate >
<h4><code>nim r toc init</code></h4>
<p><code>example.nim</code>:</p>
<pre><code class="language-nim">import nimib, nimibook
nbInit(theme = useNimibook)
nbText: "## Example"
nbSave
</code></pre>
</section>
<section data-nimib-slide-number="31" data-auto-animate >
<h4><code>nim r toc init</code></h4>
<p><code>nimib.toml</code>:</p>
<pre><code class="language-toml">[nimib]
srcDir = "book"
homeDir = "docs"
[nimibook]
language = "en-us"
title = "My book"
description = "a book built with nimibook"
</code></pre>
</section>
<section data-nimib-slide-number="32" >
<h4><code>nim r toc build</code></h4>
<p>result:</p>
<pre><code>.
βββ book
β βββ example.nim
β βββ index.md
βββ docs
β βββ assets
β β βββ ...
β βββ book.json
β βββ example.html
β βββ index.html
βββ nimib.toml
βββ toc.nim
</code></pre>
</section>
<section data-nimib-slide-number="33" >
<p><a href="https://pietroppeter.github.io/nimibook/cli.html">pietroppeter.github.io/nimibook</a></p>
<figure>
<img src="nimibook.png" alt="">
<figcaption></figcaption>
</figure>
</section>
</section>
</div>
</div>
<script src="https://cdnjs.cloudflare.com/ajax/libs/reveal.js/5.0.4/reveal.js" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/reveal.js/5.0.4/plugin/highlight/highlight.min.js" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/reveal.js/5.0.4/plugin/notes/notes.min.js" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
<script>
Reveal.initialize({
plugins: [
RevealHighlight,
RevealNotes,
],
});
</script>
<div id="nimibLandLogo" style="background: url(https://raw.githubusercontent.com/nimib-land/assets/refs/heads/main/nimib_logo_white_cup.svg);
background-repeat: no-repeat;
background-size: contain;
position: absolute;
bottom: 10px;
left: 10px;
width: 128px;
height: 128px;"></div>
</body>
</html>