-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathadding_demos.html
81 lines (59 loc) · 2.75 KB
/
adding_demos.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
<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8' />
<meta http-equiv="X-UA-Compatible" content="chrome=1" />
<!-- <meta name="description" content=Adding a demo notebook /> -->
<link rel="stylesheet" type="text/css" media="screen" href="css/stylesheet.css">
<title>IOCamlJS Demos</title>
</head>
<body>
<!-- HEADER -->
<div id="header_wrap" class="outer">
<header class="inner">
<a id="forkme_banner" href="https://github.com/andrewray/iocamljs">View on GitHub</a>
<h1 id="project_title">IOCamlJS Demos</h1>
<h2 id="project_tagline">Adding a demo notebook</h2>
<!--
<section id="downloads">
<a class="zip_download_link" href="#">Download this project as a .zip file</a>
<a class="tar_download_link" href="#">Download this project as a tar.gz file</a>
</section>
-->
</header>
</div>
<!-- MAIN CONTENT -->
<div id="main_content_wrap" class="outer">
<section id="main_content" class="inner">
<p>Fork <a href="https://github.com/andrewray/iocamljs">IOCamlJS</a> and switch to the gh-pages branch.</p>
<p>Create the new notebook in the notebooks subdirectory.</p>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>$ iocaml -js min notebooks/my_demo.ipynb -no-split-lines
</code></pre></div></div>
<p>Note we require the -no-split-lines option to save the notebook in a format understood
by iocamljs when used without the server. Just ensure the notebook is saved this way
before publishing.</p>
<p>Add a new html file to the project <code class="highlighter-rouge">my_demo.html</code> with the following contents</p>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>---
layout: iocamljs
notebook_guid: "my_demo.ipynb"
kernel: min
---
</code></pre></div></div>
<p>The notebook_guid parameter should point to the newly created notebook. The kernel
parameter selects which iocamljs kernel will run. Here <code class="highlighter-rouge">min</code> refers to the kernel
<code class="highlighter-rouge">static/services/kernels/js/kernel.min.js</code>. You can also add <a href="compiling_kernels.html">new kernels</a>
with custom package sets if required.</p>
<p>Finally add the link to the landing page in index.md</p>
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>* [My demo](my_demo.html)
</code></pre></div></div>
<p>Send a pull request.</p>
</section>
</div>
<!-- FOOTER -->
<div id="footer_wrap" class="outer">
<footer class="inner">
<!-- <p class="copyright">IOCamlJS from <a href="https://github.com/ujamjar">MicroJamJar Ltd</a></p> -->
</footer>
</div>
</body>
</html>