Skip to content

Commit

Permalink
docs
Browse files Browse the repository at this point in the history
  • Loading branch information
yawaramin committed Jan 13, 2025
1 parent 2275b04 commit a1d44e9
Show file tree
Hide file tree
Showing 31 changed files with 113 additions and 137 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
_build
todos/

2 changes: 1 addition & 1 deletion dream-html/Dream_html/Aria/index.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dream-html/Dream_html/Atom/index.html
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Atom (dream-html.Dream_html.Atom)</title><meta charset="utf-8"/><link rel="stylesheet" href="../../../odoc.support/odoc.css"/><meta name="generator" content="odoc 2.4.3"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../../odoc.support/highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body class="odoc"><nav class="odoc-nav"><a href="../index.html">Up</a><a href="../../index.html">dream-html</a> &#x00BB; <a href="../index.html">Dream_html</a> &#x00BB; Atom</nav><header class="odoc-preamble"><h1>Module <code><span>Dream_html.Atom</span></code></h1><ul class="at-tags"><li class="since"><span class="at-tag">since</span> 3.10.0</li></ul></header><div class="odoc-content"><div class="odoc-spec"><div class="spec value anchored" id="val-link"><a href="#val-link" class="anchor"></a><code><span><span class="keyword">val</span> link : <a href="../index.html#type-std_tag">std_tag</a></span></code></div></div></div></body></html>
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Atom (dream-html.Dream_html.Atom)</title><meta charset="utf-8"/><link rel="stylesheet" href="../../../odoc.support/odoc.css"/><meta name="generator" content="odoc 2.4.4"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../../odoc.support/highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body class="odoc"><nav class="odoc-nav"><a href="../index.html">Up</a><a href="../../index.html">dream-html</a> &#x00BB; <a href="../index.html">Dream_html</a> &#x00BB; Atom</nav><header class="odoc-preamble"><h1>Module <code><span>Dream_html.Atom</span></code></h1><ul class="at-tags"><li class="since"><span class="at-tag">since</span> 3.10.0</li></ul></header><div class="odoc-content"><div class="odoc-spec"><div class="spec value anchored" id="val-xmlns"><a href="#val-xmlns" class="anchor"></a><code><span><span class="keyword">val</span> xmlns : <a href="../index.html#type-attr">attr</a></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-link"><a href="#val-link" class="anchor"></a><code><span><span class="keyword">val</span> link : <a href="../index.html#type-std_tag">std_tag</a></span></code></div></div></div></body></html>
92 changes: 52 additions & 40 deletions dream-html/Dream_html/Form/index.html

Large diffs are not rendered by default.

31 changes: 16 additions & 15 deletions dream-html/Dream_html/HTML/index.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dream-html/Dream_html/Hx/index.html

Large diffs are not rendered by default.

7 changes: 2 additions & 5 deletions dream-html/Dream_html/Livereload/index.html
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Livereload (dream-html.Dream_html.Livereload)</title><meta charset="utf-8"/><link rel="stylesheet" href="../../../odoc.support/odoc.css"/><meta name="generator" content="odoc 2.4.3"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../../odoc.support/highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body class="odoc"><nav class="odoc-nav"><a href="../index.html">Up</a><a href="../../index.html">dream-html</a> &#x00BB; <a href="../index.html">Dream_html</a> &#x00BB; Livereload</nav><header class="odoc-preamble"><h1>Module <code><span>Dream_html.Livereload</span></code></h1><p>Live reload script injection and handling. Adapted from <code>Dream.livereload</code> middleware. This version is not a middleware so it's not as plug-and-play as that, but on the other hand it's much simpler to implement because it uses type-safe dream-html nodes rather than parsing and printing raw HTML. See below for the 3-step process to use it.</p><p>This module is adapted from Dream, released under the MIT license. For details, visit <a href="https://github.com/aantron/dream">https://github.com/aantron/dream</a>.</p><p>Copyright 2021-2023 Thibaut Mattio, Anton Bachin.</p><ul class="at-tags"><li class="since"><span class="at-tag">since</span> 3.4.0.</li></ul></header><div class="odoc-content"><div class="odoc-spec"><div class="spec value anchored" id="val-route"><a href="#val-route" class="anchor"></a><code><span><span class="keyword">val</span> route : <span class="xref-unresolved">Dream</span>.route</span></code></div><div class="spec-doc"><p>(1) Put this in your top-level router:</p><pre class="language-ocaml"><code>let () =
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Livereload (dream-html.Dream_html.Livereload)</title><meta charset="utf-8"/><link rel="stylesheet" href="../../../odoc.support/odoc.css"/><meta name="generator" content="odoc 2.4.4"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../../odoc.support/highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body class="odoc"><nav class="odoc-nav"><a href="../index.html">Up</a><a href="../../index.html">dream-html</a> &#x00BB; <a href="../index.html">Dream_html</a> &#x00BB; Livereload</nav><header class="odoc-preamble"><h1>Module <code><span>Dream_html.Livereload</span></code></h1><p>Live reload script injection and handling. Adapted from <code>Dream.livereload</code> middleware. This version is not a middleware so it's not as plug-and-play as that, but on the other hand it's much simpler to implement because it uses type-safe dream-html nodes rather than parsing and printing raw HTML. See below for the 3-step process to use it.</p><p>This module is adapted from Dream, released under the MIT license. For details, visit <a href="https://github.com/aantron/dream">https://github.com/aantron/dream</a>.</p><p>Copyright 2021-2023 Thibaut Mattio, Anton Bachin.</p><ul class="at-tags"><li class="since"><span class="at-tag">since</span> 3.4.0.</li></ul></header><div class="odoc-content"><div class="odoc-spec"><div class="spec value anchored" id="val-route"><a href="#val-route" class="anchor"></a><code><span><span class="keyword">val</span> route : <span class="xref-unresolved">Dream</span>.route</span></code></div><div class="spec-doc"><p>(1) Put this in your top-level router:</p><pre class="language-ocaml"><code>let () =
Dream.run
@@ Dream.logger
@@ Dream.router [
Dream_html.Livereload.route;
(* ...other routes... *)
]</code></pre></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-script"><a href="#val-script" class="anchor"></a><code><span><span class="keyword">val</span> script : <a href="../index.html#type-node">node</a></span></code></div><div class="spec-doc"><p>(2) Put this inside your <code>head</code>:</p><pre class="language-ocaml"><code>head [] [Livereload.script (* ... *)]</code></pre></div></div><p>(3) And run the server with environment variable <code>LIVERELOAD=1</code>.</p><p><b>⚠️ If this env var is not set, then livereload is turned off.</b> This means that the <code>route</code> will respond with <code>404</code> status and the script will be omitted from the rendered HTML.</p></div></body></html>
@@ Dream.router [Dream_html.Livereload.route (* ...other routes... *)]</code></pre></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-script"><a href="#val-script" class="anchor"></a><code><span><span class="keyword">val</span> script : <a href="../index.html#type-node">node</a></span></code></div><div class="spec-doc"><p>(2) Put this inside your <code>head</code>:</p><pre class="language-ocaml"><code>head [] [Livereload.script (* ... *)]</code></pre></div></div><p>(3) And run the server with environment variable <code>LIVERELOAD=1</code>.</p><p><b>⚠️ If this env var is not set, then livereload is turned off.</b> This means that the <code>route</code> will respond with <code>404</code> status and the script will be omitted from the rendered HTML.</p></div></body></html>
Loading

0 comments on commit a1d44e9

Please sign in to comment.