Skip to content

Commit

Permalink
build based on e815f57
Browse files Browse the repository at this point in the history
  • Loading branch information
zeptodoctor committed Nov 16, 2019
1 parent 7bb249e commit 0effc2e
Show file tree
Hide file tree
Showing 11 changed files with 137 additions and 137 deletions.
2 changes: 1 addition & 1 deletion previews/PR80/customprocessing.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@
end
return str
end</code></pre><p>(of course replace <code>included</code> with your respective files)</p><p>Finally, you simply pass this function to e.g. <a href="outputformats.html#Literate.markdown"><code>Literate.markdown</code></a> as</p><pre><code class="language-julia">Literate.markdown(&quot;examples.jl&quot;, &quot;path/to/save/markdown&quot;;
name = &quot;markdown_file_name&quot;, preprocess = replace_includes)</code></pre><p>and you will see that in the final output file (here <code>markdown_file_name.md</code>) the <code>include</code> statements are replaced with the actual code to be included!</p><p>This approach is used for generating <a href="https://juliadynamics.github.io/TimeseriesPrediction.jl/latest/stexamples/">the examples</a> in the documentation of the <a href="https://github.com/JuliaDynamics/TimeseriesPrediction.jl">TimeseriesPrediction.jl</a> package. The <a href="https://github.com/JuliaDynamics/TimeseriesPrediction.jl/tree/dcb080376a7861716147c04e45c473f55bb9a078/examples">example files</a>, included together in the <a href="https://github.com/JuliaDynamics/TimeseriesPrediction.jl/blob/dcb080376a7861716147c04e45c473f55bb9a078/docs/src/stexamples.jl">stexamples.jl</a> file, are processed by literate via this <a href="https://github.com/JuliaDynamics/TimeseriesPrediction.jl/blob/dcb080376a7861716147c04e45c473f55bb9a078/docs/make.jl">make.jl</a> file to generate the markdown and code cells of the documentation.</p></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="outputformats.html">« <strong>4.</strong> Output Formats</a><a class="docs-footer-nextpage" href="documenter.html"><strong>6.</strong> Interaction with Documenter.jl »</a></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="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> on <span class="colophon-date" title="Saturday 16 November 2019 00:27">Saturday 16 November 2019</span>. Using Julia version 1.2.0.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
name = &quot;markdown_file_name&quot;, preprocess = replace_includes)</code></pre><p>and you will see that in the final output file (here <code>markdown_file_name.md</code>) the <code>include</code> statements are replaced with the actual code to be included!</p><p>This approach is used for generating <a href="https://juliadynamics.github.io/TimeseriesPrediction.jl/latest/stexamples/">the examples</a> in the documentation of the <a href="https://github.com/JuliaDynamics/TimeseriesPrediction.jl">TimeseriesPrediction.jl</a> package. The <a href="https://github.com/JuliaDynamics/TimeseriesPrediction.jl/tree/dcb080376a7861716147c04e45c473f55bb9a078/examples">example files</a>, included together in the <a href="https://github.com/JuliaDynamics/TimeseriesPrediction.jl/blob/dcb080376a7861716147c04e45c473f55bb9a078/docs/src/stexamples.jl">stexamples.jl</a> file, are processed by literate via this <a href="https://github.com/JuliaDynamics/TimeseriesPrediction.jl/blob/dcb080376a7861716147c04e45c473f55bb9a078/docs/make.jl">make.jl</a> file to generate the markdown and code cells of the documentation.</p></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="outputformats.html">« <strong>4.</strong> Output Formats</a><a class="docs-footer-nextpage" href="documenter.html"><strong>6.</strong> Interaction with Documenter.jl »</a></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="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> on <span class="colophon-date" title="Saturday 16 November 2019 01:19">Saturday 16 November 2019</span>. Using Julia version 1.2.0.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
2 changes: 1 addition & 1 deletion previews/PR80/documenter.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@
\int f dx
```</code></pre>is replaced with notebook compatible<pre><code class="language-none">$$
\int f dx
$$</code></pre></li></ul><h3 id="[Literate.script](@ref):-1"><a href="outputformats.html#Literate.script"><code>Literate.script</code></a>:<a class="docs-heading-anchor" href="#[Literate.script](@ref):-1" title="Permalink"></a></h3><ul><li>Documenter style <code>@ref</code>s and <code>@id</code> will be removed. This means that you can use <code>@ref</code> and <code>@id</code> in the source file without them leaking to the script.</li></ul></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="customprocessing.html">« <strong>5.</strong> Custom pre- and post-processing</a><a class="docs-footer-nextpage" href="generated/example.html"><strong>7.</strong> Example »</a></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="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> on <span class="colophon-date" title="Saturday 16 November 2019 00:27">Saturday 16 November 2019</span>. Using Julia version 1.2.0.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
$$</code></pre></li></ul><h3 id="[Literate.script](@ref):-1"><a href="outputformats.html#Literate.script"><code>Literate.script</code></a>:<a class="docs-heading-anchor" href="#[Literate.script](@ref):-1" title="Permalink"></a></h3><ul><li>Documenter style <code>@ref</code>s and <code>@id</code> will be removed. This means that you can use <code>@ref</code> and <code>@id</code> in the source file without them leaking to the script.</li></ul></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="customprocessing.html">« <strong>5.</strong> Custom pre- and post-processing</a><a class="docs-footer-nextpage" href="generated/example.html"><strong>7.</strong> Example »</a></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="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> on <span class="colophon-date" title="Saturday 16 November 2019 01:19">Saturday 16 November 2019</span>. Using Julia version 1.2.0.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
2 changes: 1 addition & 1 deletion previews/PR80/fileformat.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@
#md # Literate.notebook
#md # Literate.markdown
#md # ```</code></pre><p>The lines in the example above would be filtered out in the preprocessing step, unless we are generating a markdown file. When generating a markdown file we would simple remove the leading <code>#md</code> from the lines. Beware that the space after the tag is also removed.</p><p>The <code>#src</code> token can also be placed at the <em>end</em> of a line. This is to make it possible to have code lines exclusive to the source code, and not just comment lines. For example, if the source file is included in the test suite we might want to add a <code>@test</code> at the end without this showing up in the outputs:</p><pre><code class="language-julia">using Test #src
@test result == expected_result #src</code></pre><h2 id="Default-Replacements-1"><strong>2.3.</strong> Default Replacements<a class="docs-heading-anchor" href="#Default-Replacements-1" title="Permalink"></a></h2><p>The following convenience &quot;macros&quot; are always expanded:</p><ul><li><p><code>@__NAME__</code></p><p>expands to the <code>name</code> keyword argument to <a href="outputformats.html#Literate.markdown"><code>Literate.markdown</code></a>, <a href="outputformats.html#Literate.notebook"><code>Literate.notebook</code></a> and <a href="outputformats.html#Literate.script"><code>Literate.script</code></a> (defaults to the filename of the input file).</p></li><li><p><code>@__REPO_ROOT_URL__</code></p><p>expands to <code>https://github.com/$(ENV[&quot;TRAVIS_REPO_SLUG&quot;])/blob/master</code> and is a convenient way to use when you want to link to files outside the doc-build directory. For example <code>@__REPO_ROOT_URL__/src/Literate.jl</code> would link to the source of the Literate module.</p></li><li><p><code>@__NBVIEWER_ROOT_URL__</code></p><p>expands to <code>https://nbviewer.jupyter.org/github/$(ENV[&quot;TRAVIS_REPO_SLUG&quot;])/blob/gh-pages/$(folder)</code> where <code>folder</code> is the folder that <code>Documenter.deploydocs</code> deploys too. This can be used if you want a link that opens the generated notebook in <a href="http://nbviewer.jupyter.org/">http://nbviewer.jupyter.org/</a>.</p></li><li><p><code>@__BINDER_ROOT_URL__</code></p><p>expands to <code>https://mybinder.org/v2/gh/$(ENV[&quot;TRAVIS_REPO_SLUG&quot;])/$(branch)?filepath=$(folder)</code> where <code>branch</code>/<code>folder</code> is the branch and folder where <code>Documenter.deploydocs</code> deploys too. This can be used if you want a link that opens the generated notebook in <a href="https://mybinder.org/">https://mybinder.org/</a>. To add a binder-badge in e.g. the HTML output you can use:</p><pre><code class="language-none">[![Binder](https://mybinder.org/badge_logo.svg)](@__BINDER_ROOT_URL__/path/to/notebook.inpynb)</code></pre></li></ul><div class="admonition is-info"><header class="admonition-header">Note</header><div class="admonition-body"><p><code>@__REPO_ROOT_URL__</code> and <code>@__NBVIEWER_ROOT_URL__</code> works for documentation built with <a href="https://github.com/JuliaDocs/DocumentationGenerator.jl">DocumentationGenerator.jl</a> but <code>@__BINDER_ROOT_URL__</code> does not, since <code>mybinder.org</code> requires the files to be located inside a git repository.</p></div></div></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="index.html">« <strong>1.</strong> Introduction</a><a class="docs-footer-nextpage" href="pipeline.html"><strong>3.</strong> Processing pipeline »</a></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="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> on <span class="colophon-date" title="Saturday 16 November 2019 00:27">Saturday 16 November 2019</span>. Using Julia version 1.2.0.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
@test result == expected_result #src</code></pre><h2 id="Default-Replacements-1"><strong>2.3.</strong> Default Replacements<a class="docs-heading-anchor" href="#Default-Replacements-1" title="Permalink"></a></h2><p>The following convenience &quot;macros&quot; are always expanded:</p><ul><li><p><code>@__NAME__</code></p><p>expands to the <code>name</code> keyword argument to <a href="outputformats.html#Literate.markdown"><code>Literate.markdown</code></a>, <a href="outputformats.html#Literate.notebook"><code>Literate.notebook</code></a> and <a href="outputformats.html#Literate.script"><code>Literate.script</code></a> (defaults to the filename of the input file).</p></li><li><p><code>@__REPO_ROOT_URL__</code></p><p>expands to <code>https://github.com/$(ENV[&quot;TRAVIS_REPO_SLUG&quot;])/blob/master</code> and is a convenient way to use when you want to link to files outside the doc-build directory. For example <code>@__REPO_ROOT_URL__/src/Literate.jl</code> would link to the source of the Literate module.</p></li><li><p><code>@__NBVIEWER_ROOT_URL__</code></p><p>expands to <code>https://nbviewer.jupyter.org/github/$(ENV[&quot;TRAVIS_REPO_SLUG&quot;])/blob/gh-pages/$(folder)</code> where <code>folder</code> is the folder that <code>Documenter.deploydocs</code> deploys too. This can be used if you want a link that opens the generated notebook in <a href="http://nbviewer.jupyter.org/">http://nbviewer.jupyter.org/</a>.</p></li><li><p><code>@__BINDER_ROOT_URL__</code></p><p>expands to <code>https://mybinder.org/v2/gh/$(ENV[&quot;TRAVIS_REPO_SLUG&quot;])/$(branch)?filepath=$(folder)</code> where <code>branch</code>/<code>folder</code> is the branch and folder where <code>Documenter.deploydocs</code> deploys too. This can be used if you want a link that opens the generated notebook in <a href="https://mybinder.org/">https://mybinder.org/</a>. To add a binder-badge in e.g. the HTML output you can use:</p><pre><code class="language-none">[![Binder](https://mybinder.org/badge_logo.svg)](@__BINDER_ROOT_URL__/path/to/notebook.inpynb)</code></pre></li></ul><div class="admonition is-info"><header class="admonition-header">Note</header><div class="admonition-body"><p><code>@__REPO_ROOT_URL__</code> and <code>@__NBVIEWER_ROOT_URL__</code> works for documentation built with <a href="https://github.com/JuliaDocs/DocumentationGenerator.jl">DocumentationGenerator.jl</a> but <code>@__BINDER_ROOT_URL__</code> does not, since <code>mybinder.org</code> requires the files to be located inside a git repository.</p></div></div></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="index.html">« <strong>1.</strong> Introduction</a><a class="docs-footer-nextpage" href="pipeline.html"><strong>3.</strong> Processing pipeline »</a></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="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> on <span class="colophon-date" title="Saturday 16 November 2019 01:19">Saturday 16 November 2019</span>. Using Julia version 1.2.0.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
Loading

0 comments on commit 0effc2e

Please sign in to comment.