Skip to content

Commit 4a6f979

Browse files
author
Documenter.jl
committed
build based on ec2de56
1 parent a633ece commit 4a6f979

8 files changed

+29
-21
lines changed

latest/.documenter-siteinfo.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"documenter":{"julia_version":"1.10.2","generation_timestamp":"2024-04-23T10:49:09","documenter_version":"1.3.0"}}
1+
{"documenter":{"julia_version":"1.10.2","generation_timestamp":"2024-04-25T22:02:37","documenter_version":"1.3.0"}}

latest/api/index.html

+23-16
Large diffs are not rendered by default.

latest/examples/166322b9.png

9.53 KB
Loading

latest/examples/55219bd2.svg

+1
Loading

latest/examples/index.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -584,7 +584,7 @@
584584
'\r': ASCII/Unicode U+000D (category Cc: Other, control)
585585
'\n': ASCII/Unicode U+000A (category Cc: Other, control)
586586
'\x1a': ASCII/Unicode U+001A (category Cc: Other, control)
587-
&#39;\n&#39;: ASCII/Unicode U+000A (category Cc: Other, control)</code></pre><h3 id="Saving-to-a-file"><a class="docs-heading-anchor" href="#Saving-to-a-file">Saving to a file</a><a id="Saving-to-a-file-1"></a><a class="docs-heading-anchor-permalink" href="#Saving-to-a-file" title="Permalink"></a></h3><p>Once a diagram has been rendered, it&#39;s straightforward to write it to a file using <code>write</code>.</p><pre><code class="language-julia hljs">write(&quot;mermaid_diagram.png&quot;, mermaid_diagram_as_png)</code></pre><pre class="documenter-example-output"><code class="nohighlight hljs ansi">9761</code></pre><p><img src="../mermaid_diagram.png" alt="Mermaid diagram as PNG example"/></p><p>Note the difference in file size and fonts when rendering to SVG.</p><pre><code class="language-julia hljs">write(&quot;mermaid_diagram.svg&quot;, render(mermaid_diagram, &quot;svg&quot;))</code></pre><pre class="documenter-example-output"><code class="nohighlight hljs ansi">10254</code></pre><p><img src="../mermaid_diagram.svg" alt="Mermaid diagram as SVG example"/></p><h2 id="Controlling-text-rendering"><a class="docs-heading-anchor" href="#Controlling-text-rendering">Controlling text rendering</a><a id="Controlling-text-rendering-1"></a><a class="docs-heading-anchor-permalink" href="#Controlling-text-rendering" title="Permalink"></a></h2><p>Some diagrams support rendering to text, e.g. PlantUML and Structurizr. This can be based on ASCII or Unicode character sets. Which character set is used, is controlled using the <a href="../api/#Kroki.TEXT_PLAIN_SHOW_MIME_TYPE"><code>Kroki.TEXT_PLAIN_SHOW_MIME_TYPE</code></a> variable.</p><p>Setting a <code>text/plain</code> MIME type results in the use of the limited ASCII character set.</p><pre><code class="language-julia hljs">plantuml_diagram = plantuml&quot;&quot;&quot;
587+
&#39;\n&#39;: ASCII/Unicode U+000A (category Cc: Other, control)</code></pre><h3 id="Saving-to-a-file"><a class="docs-heading-anchor" href="#Saving-to-a-file">Saving to a file</a><a id="Saving-to-a-file-1"></a><a class="docs-heading-anchor-permalink" href="#Saving-to-a-file" title="Permalink"></a></h3><p>Once a diagram has been rendered, it&#39;s straightforward to write it to a file using <code>write</code>.</p><pre><code class="language-julia hljs">write(&quot;mermaid_diagram.png&quot;, mermaid_diagram_as_png)</code></pre><pre class="documenter-example-output"><code class="nohighlight hljs ansi">9761</code></pre><p>Note the difference in file size when rendering to SVG.</p><pre><code class="language-julia hljs">write(&quot;mermaid_diagram.svg&quot;, render(mermaid_diagram, &quot;svg&quot;))</code></pre><pre class="documenter-example-output"><code class="nohighlight hljs ansi">10254</code></pre><h3 id="Overriding-Base.show-behavior"><a class="docs-heading-anchor" href="#Overriding-Base.show-behavior">Overriding <code>Base.show</code> behavior</a><a id="Overriding-Base.show-behavior-1"></a><a class="docs-heading-anchor-permalink" href="#Overriding-Base.show-behavior" title="Permalink"></a></h3><p>In some cases the output format that is used may affect how the final diagram renders. Although it is always possible to explicitly fall back to calling <code>render</code> in these cases, this may be cumbersome when writing documentation, etc. and having to explicitly do that for every diagram of a specific type. As an alternative, it is possible to instruct <code>Kroki</code> to ignore certain output formats when rendering a specific diagram type using <code>Base.show</code>.</p><p>For instance, by default (in most cases) a Mermaid diagram will be rendered as an SVG. Due to the way these diagrams are rendered by Kroki this may result in text getting cut off, see <a href="https://github.com/yuzutech/kroki/issues/1345">yuzutech/kroki#1345</a> for details.</p><pre><code class="language-julia hljs">mermaid_diagram</code></pre><img src="55219bd2.svg" alt="Example block output"/><div class="admonition is-success"><header class="admonition-header">Inspecting the output format of an image</header><div class="admonition-body"><p>The most straightforward way of inspecting the output format is to open the image in a new tab in your browser and checking its extension, e.g. by right clicking on it and selecting <em>Open image in new tab</em> in Chrome or a similar browser. Alternatively the type of the rendered image can be seen by inspecting the source of this page.</p></div></div><p>Using <a href="../api/#Kroki.overrideShowable"><code>Kroki.overrideShowable</code></a>, <code>Kroki</code> can be instructed to not render to SVG and pick the next most suitable output format with a fallback of rendering the diagram to text if none are available.</p><pre><code class="language-julia hljs">Kroki.overrideShowable(MIME&quot;image/svg+xml&quot;(), :mermaid, false)</code></pre><pre class="documenter-example-output"><code class="nohighlight hljs ansi">false</code></pre><p>For Mermaid diagrams in the context of <code>Documenter</code> this means rendering the diagram as a PNG. When rendering to PNG the previously mentioned font issues do not arise.</p><pre><code class="language-julia hljs">mermaid_diagram</code></pre><img src="166322b9.png" alt="Example block output"/><h2 id="Controlling-text-rendering"><a class="docs-heading-anchor" href="#Controlling-text-rendering">Controlling text rendering</a><a id="Controlling-text-rendering-1"></a><a class="docs-heading-anchor-permalink" href="#Controlling-text-rendering" title="Permalink"></a></h2><p>Some diagrams support rendering to text, e.g. PlantUML and Structurizr. This can be based on ASCII or Unicode character sets. Which character set is used, is controlled using the <a href="../api/#Kroki.TEXT_PLAIN_SHOW_MIME_TYPE"><code>Kroki.TEXT_PLAIN_SHOW_MIME_TYPE</code></a> variable.</p><p>Setting a <code>text/plain</code> MIME type results in the use of the limited ASCII character set.</p><pre><code class="language-julia hljs">plantuml_diagram = plantuml&quot;&quot;&quot;
588588
Kroki -&gt; Documenter: I can render this as text in two ways!
589589
Kroki &lt;- Documenter: Nice!
590590
&quot;&quot;&quot;
@@ -617,4 +617,4 @@
617617
sprint(show, MIME&quot;text/plain&quot;(), plantuml_diagram)
618618
catch exception
619619
println(sprint(showerror, exception))
620-
end</code></pre><pre class="documenter-example-output"><code class="nohighlight hljs ansi">The selected `MIME` type must be one of `text/plain; charset=utf-8` or `text/plain`. Got `not-a-known/mime-type`.</code></pre></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../">« Home</a><a class="docs-footer-nextpage" href="../api/">API »</a><div class="flexbox-break"></div><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="auto">Automatic (OS)</option><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 1.3.0 on <span class="colophon-date" title="Tuesday 23 April 2024 10:49">Tuesday 23 April 2024</span>. Using Julia version 1.10.2.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
620+
end</code></pre><pre class="documenter-example-output"><code class="nohighlight hljs ansi">The selected `MIME` type must be one of `text/plain; charset=utf-8` or `text/plain`. Got `not-a-known/mime-type`.</code></pre></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../">« Home</a><a class="docs-footer-nextpage" href="../api/">API »</a><div class="flexbox-break"></div><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="auto">Automatic (OS)</option><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 1.3.0 on <span class="colophon-date" title="Thursday 25 April 2024 22:02">Thursday 25 April 2024</span>. Using Julia version 1.10.2.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>

latest/index.html

+1-1
Large diffs are not rendered by default.

latest/objects.inv

89 Bytes
Binary file not shown.

latest/search_index.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)