You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

8 lines
4.5 KiB

<!DOCTYPE html>
<html lang="en"><head><meta charset="UTF-8"/><meta name="viewport" content="width=device-width, initial-scale=1.0"/><title>6. Interaction with Documenter.jl · Examples.jl</title><link href="https://cdnjs.cloudflare.com/ajax/libs/normalize/4.2.0/normalize.min.css" rel="stylesheet" type="text/css"/><link href="https://fonts.googleapis.com/css?family=Lato|Roboto+Mono" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/default.min.css" rel="stylesheet" type="text/css"/><script>documenterBaseURL="."</script><script src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.2.0/require.min.js" data-main="assets/documenter.js"></script><script src="siteinfo.js"></script><script src="../versions.js"></script><link href="assets/documenter.css" rel="stylesheet" type="text/css"/></head><body><nav class="toc"><h1>Examples.jl</h1><select id="version-selector" onChange="window.location.href=this.value" style="visibility: hidden"></select><form class="search" id="search-form" action="search.html"><input id="search-query" name="q" type="text" placeholder="Search docs"/></form><ul><li><a class="toctext" href="index.html"><strong>1.</strong> Introduction</a></li><li><a class="toctext" href="fileformat.html"><strong>2.</strong> File Format</a></li><li><a class="toctext" href="pipeline.html"><strong>3.</strong> Processing pipeline</a></li><li><a class="toctext" href="outputformats.html"><strong>4.</strong> Output formats</a></li><li><a class="toctext" href="customprocessing.html"><strong>5.</strong> Custom pre- and post-processing</a></li><li class="current"><a class="toctext" href="documenter.html"><strong>6.</strong> Interaction with Documenter.jl</a><ul class="internal"></ul></li><li><a class="toctext" href="generated/example.html"><strong>7.</strong> Example</a></li></ul></nav><article id="docs"><header><nav><ul><li><a href="documenter.html"><strong>6.</strong> Interaction with Documenter.jl</a></li></ul><a class="edit-page" href="https://github.com/fredrikekre/Examples.jl/blob/master/docs/src/documenter.md"><span class="fa"></span> Edit on GitHub</a></nav><hr/><div id="topbar"><span>6. Interaction with Documenter.jl</span><a class="fa fa-bars" href="#"></a></div></header><h1><a class="nav-anchor" id="Interaction-with-Documenter-1" href="#Interaction-with-Documenter-1"><strong>6.</strong> Interaction with Documenter.jl</a></h1><p><code>Examples.jl</code> can be used for any purpose, it spits out regular markdown files, and notebooks. Typically, though, these files will be used to render documentation for your package. The generators (<a href="outputformats.html#Examples.markdown"><code>Examples.markdown</code></a>, <a href="outputformats.html#Examples.notebook"><code>Examples.notebook</code></a> and <a href="outputformats.html#Examples.script"><code>Examples.script</code></a>) supports a keyword argument <code>documenter</code> that lets the generator perform some extra things, keeping in mind that the generated files will, eventually, be used with Documenter.jl. So lets take a look at what will happen if we set <code>documenter = true</code>:</p><p><a href="outputformats.html#Examples.markdown"><code>Examples.markdown</code></a>:</p><ul><li>The default code fence will change from<pre><code class="language-none">```julia
# code
```</code></pre>to Documenters <code>@example</code> blocks:<pre><code class="language-none">```@examples $(name)
# code
```</code></pre></li><li>The following <code>@meta</code> block will be added to the top of the markdown page, which redirects the &quot;Edit on GitHub&quot; link on the top of the page to the <em>source file</em> rather than the generated <code>.md</code> file:<pre><code class="language-none">```@meta
EditURL = &quot;$(relpath(inputfile, outputdir))&quot;
```</code></pre></li></ul><p><a href="outputformats.html#Examples.notebook"><code>Examples.notebook</code></a>:</p><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 notebook.</li></ul><footer><hr/><a class="previous" href="customprocessing.html"><span class="direction">Previous</span><span class="title"><strong>5.</strong> Custom pre- and post-processing</span></a><a class="next" href="generated/example.html"><span class="direction">Next</span><span class="title"><strong>7.</strong> Example</span></a></footer></article></body></html>