Skip to content

Commit

Permalink
Deploy website
Browse files Browse the repository at this point in the history
Deploy website version based on 9734ce2
  • Loading branch information
Docusaurus bot committed Sep 16, 2024
1 parent ab4b677 commit 9d92b59
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 19 deletions.
26 changes: 13 additions & 13 deletions docs/installation.html
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ <h2><a class="anchor" aria-hidden="true" id="sbt"></a><a href="#sbt" aria-hidden
enables <code>mdoc.MdocPlugin</code>.</p>
<p><a href="https://maven-badges.herokuapp.com/maven-central/org.scalameta/mdoc_2.12"><img src="https://maven-badges.herokuapp.com/maven-central/org.scalameta/mdoc_2.12/badge.svg" alt="Maven Central"></a></p>
<pre><code class="hljs css language-scala"><span class="hljs-comment">// project/plugins.sbt</span>
addSbtPlugin(<span class="hljs-string">"org.scalameta"</span> % <span class="hljs-string">"sbt-mdoc"</span> % <span class="hljs-string">"2.5.4"</span> )
addSbtPlugin(<span class="hljs-string">"org.scalameta"</span> % <span class="hljs-string">"sbt-mdoc"</span> % <span class="hljs-string">"2.6.0"</span> )
<span class="hljs-comment">// build.sbt</span>
<span class="hljs-keyword">lazy</span> <span class="hljs-keyword">val</span> myproject = project <span class="hljs-comment">// your existing library</span>
.settings(...)
Expand Down Expand Up @@ -186,51 +186,51 @@ <h2><a class="anchor" aria-hidden="true" id="command-line"></a><a href="#command
<p><a href="https://maven-badges.herokuapp.com/maven-central/org.scalameta/mdoc_2.12"><img src="https://maven-badges.herokuapp.com/maven-central/org.scalameta/mdoc_2.12/badge.svg" alt="Maven Central"></a></p>
<pre><code class="hljs css language-sh">curl -L -o coursier https://git.io/coursier
chmod +x coursier
coursier launch org.scalameta:mdoc_2.12:2.5.4 -- --site.VERSION 1.0.0
coursier launch org.scalameta:mdoc_2.12:2.6.0 -- --site.VERSION 1.0.0
info: Compiling 1 file to website/target/docs
info: Compiled <span class="hljs-keyword">in</span> 1.2s (0 errors)
</code></pre>
<h3><a class="anchor" aria-hidden="true" id="add-library-dependencies-to-classpath"></a><a href="#add-library-dependencies-to-classpath" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Add library dependencies to classpath</h3>
<p>Use the <code>--classpath</code> argument to change the classpath used for compilation:</p>
<pre><code class="hljs css language-diff"> coursier launch \
org.scalameta:mdoc_2.12:2.5.4 -- \
org.scalameta:mdoc_2.12:2.6.0 -- \
<span class="hljs-addition">+ --classpath $(coursier fetch -p org.typelevel:cats-core_2.12:1.5.0)</span>
</code></pre>
<h3><a class="anchor" aria-hidden="true" id="customize-input-directory"></a><a href="#customize-input-directory" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Customize input directory</h3>
<p>By default the <code>docs/</code> directory is processed as input. Use <code>--in</code> to customize
the input directory where markdown sources are contained,</p>
<pre><code class="hljs css language-diff"> coursier launch org.scalameta:mdoc_2.12:2.5.4 -- \
<pre><code class="hljs css language-diff"> coursier launch org.scalameta:mdoc_2.12:2.6.0 -- \
<span class="hljs-addition">+ --in mydocs</span>
</code></pre>
<h3><a class="anchor" aria-hidden="true" id="process-single-markdown-file"></a><a href="#process-single-markdown-file" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Process single markdown file</h3>
<p>The <code>--in</code> flag doesn't have to be a directory, it also supports individual
files.</p>
<pre><code class="hljs css language-diff"> coursier launch org.scalameta:mdoc_2.12:2.5.4 -- \
<pre><code class="hljs css language-diff"> coursier launch org.scalameta:mdoc_2.12:2.6.0 -- \
<span class="hljs-addition">+ --in mydocs/readme.md</span>
</code></pre>
<h3><a class="anchor" aria-hidden="true" id="configure-site-variables-like-version"></a><a href="#configure-site-variables-like-version" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Configure site variables like <code>@VERSION@</code></h3>
<p>Use <code>--site.VARIABLE=value</code> to add site variables that can be referenced from
markdown as <code>@VARIABLE@</code>.</p>
<pre><code class="hljs css language-diff"> coursier launch org.scalameta:mdoc_2.12:2.5.4 -- \
<pre><code class="hljs css language-diff"> coursier launch org.scalameta:mdoc_2.12:2.6.0 -- \
<span class="hljs-addition">+ --site.SCALA_VERSION 2.12.19</span>
</code></pre>
<h3><a class="anchor" aria-hidden="true" id="customize-output-directory"></a><a href="#customize-output-directory" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Customize output directory</h3>
<p>Use <code>--out</code> to customize where your markdown sources are generated, by default
the <code>out/</code> directory is used.</p>
<pre><code class="hljs css language-diff"> coursier launch org.scalameta:mdoc_2.12:2.5.4 -- \
<pre><code class="hljs css language-diff"> coursier launch org.scalameta:mdoc_2.12:2.6.0 -- \
<span class="hljs-addition">+ --out target/docs</span>
</code></pre>
<h3><a class="anchor" aria-hidden="true" id="generate-single-output-file-instead-of-directory"></a><a href="#generate-single-output-file-instead-of-directory" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Generate single output file instead of directory</h3>
<p>The <code>--out</code> flag doesn't have to be a directory when the <code>--in</code> argument is a
regular file, it can also be an individual file.</p>
<pre><code class="hljs css language-diff"> coursier launch org.scalameta:mdoc_2.12:2.5.4 -- \
<pre><code class="hljs css language-diff"> coursier launch org.scalameta:mdoc_2.12:2.6.0 -- \
<span class="hljs-addition">+ --in readme.template.md \</span>
<span class="hljs-addition">+ --out readme.md</span>
</code></pre>
<h3><a class="anchor" aria-hidden="true" id="process-multiple-input-directories-and-files"></a><a href="#process-multiple-input-directories-and-files" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Process multiple input directories and files</h3>
<p>Repeat the <code>--in</code> and <code>--out</code> arguments to process multiple directories and
regular files.</p>
<pre><code class="hljs css language-diff"> coursier launch org.scalameta:mdoc_2.12:2.5.4 -- \
<pre><code class="hljs css language-diff"> coursier launch org.scalameta:mdoc_2.12:2.6.0 -- \
<span class="hljs-addition">+ --in readme.template.md \</span>
<span class="hljs-addition">+ --out readme.md \</span>
<span class="hljs-addition">+ --in changelog.template.md \</span>
Expand All @@ -242,12 +242,12 @@ <h3><a class="anchor" aria-hidden="true" id="live-reload-html-preview-on-file-sa
<p>Use <code>--watch</code> to start the file watcher with livereload. It's recommended to use
<code>--watch</code> while writing documentation to enjoy 3-4x faster compilation
performance.</p>
<pre><code class="hljs css language-diff"> coursier launch org.scalameta:mdoc_2.12:2.5.4 -- \
<pre><code class="hljs css language-diff"> coursier launch org.scalameta:mdoc_2.12:2.6.0 -- \
<span class="hljs-addition">+ --watch</span>
</code></pre>
<h3><a class="anchor" aria-hidden="true" id="help"></a><a href="#help" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Help</h3>
<p>Use <code>--help</code> to learn more how to use the command-line interface.</p>
<pre><code class="hljs css language-txt">mdoc v2.<span class="hljs-number">5.4</span>
<pre><code class="hljs css language-txt">mdoc v2.<span class="hljs-number">6.0</span>
Usage: mdoc [&lt;option&gt; ...]
Example: mdoc <span class="hljs-comment">--in mydocs --out _site (custom input/output directories)</span>
mdoc <span class="hljs-comment">--watch (watch for file changes)</span>
Expand Down Expand Up @@ -372,7 +372,7 @@ <h2><a class="anchor" aria-hidden="true" id="library"></a><a href="#library" ari
<p><a href="https://maven-badges.herokuapp.com/maven-central/org.scalameta/mdoc_2.12"><img src="https://maven-badges.herokuapp.com/maven-central/org.scalameta/mdoc_2.12/badge.svg" alt="Maven Central"></a></p>
<pre><code class="hljs css language-scala"><span class="hljs-comment">// build.sbt</span>
scalaVersion := <span class="hljs-string">"2.12.19"</span> <span class="hljs-comment">// Any version in 2.12.x works.</span>
libraryDependencies += <span class="hljs-string">"org.scalameta"</span> %% <span class="hljs-string">"mdoc"</span> % <span class="hljs-string">"2.5.4"</span>
libraryDependencies += <span class="hljs-string">"org.scalameta"</span> %% <span class="hljs-string">"mdoc"</span> % <span class="hljs-string">"2.6.0"</span>
</code></pre>
<p>Then write a main function that invokes mdoc as a library</p>
<p>It's recommended to use <code>--watch</code> while writing documentation to enjoy 3-4x
Expand Down Expand Up @@ -403,7 +403,7 @@ <h2><a class="anchor" aria-hidden="true" id="library"></a><a href="#library" ari
</code></pre>
<p>Consult the mdoc source to learn more how to use the library API. Scaladocs are
available
<a href="https://www.javadoc.io/doc/org.scalameta/mdoc_2.12/2.5.4">here</a>
<a href="https://www.javadoc.io/doc/org.scalameta/mdoc_2.12/2.6.0">here</a>
but beware there are limited docstrings for classes and methods. Keep in mind
that code in the package <code>mdoc.internal</code> is subject to binary and source
breaking changes between any release, including PATCH versions.</p>
Expand Down
4 changes: 2 additions & 2 deletions docs/js.html
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ <h3><a class="anchor" aria-hidden="true" id="command-line"></a><a href="#command
<pre><code class="hljs css language-sh">cat &lt;&lt;EOT &gt; mdoc.properties
js-classpath=$(coursier fetch org.scala-js:scalajs-library_2.12:1.16.0 org.scala-js:scalajs-dom_sjs1_2.12:2.0.0 -p)
js-scalac-options=-Xplugin:$(coursier fetch --intransitive org.scala-js:scalajs-compiler_2.12.19:1.16.0)
js-linker-classpath=$(coursier fetch org.scalameta:mdoc-js-worker_2.12:2.5.4 org.scala-js:scalajs-linker_2.12:1.16.0 -p)
js-linker-classpath=$(coursier fetch org.scalameta:mdoc-js-worker_2.12:2.6.0 org.scala-js:scalajs-linker_2.12:1.16.0 -p)
EOT
</code></pre>
<p>Note: For scala 3, you may need <code>js-scalac-options=--scala-js</code> - this is currently untested.</p>
Expand All @@ -108,7 +108,7 @@ <h3><a class="anchor" aria-hidden="true" id="command-line"></a><a href="#command
</code></pre>
<p>Next, launch mdoc with the <code>org.scalameta:mdoc-js</code> module instead of
<code>org.scalameta:mdoc</code>:</p>
<pre><code class="hljs css language-sh">coursier launch org.scalameta:mdoc-js_2.12:2.5.4 --extra-jars $(<span class="hljs-built_in">pwd</span>) -- --watch
<pre><code class="hljs css language-sh">coursier launch org.scalameta:mdoc-js_2.12:2.6.0 --extra-jars $(<span class="hljs-built_in">pwd</span>) -- --watch
</code></pre>
<p>Open the URL <a href="http://localhost:4001/index.md">http://localhost:4001/index.md</a> to see a live preview of the
generated Markdown.</p>
Expand Down
4 changes: 2 additions & 2 deletions docs/modifiers.html
Original file line number Diff line number Diff line change
Expand Up @@ -564,9 +564,9 @@ <h2><a class="anchor" aria-hidden="true" id="scastie"></a><a href="#scastie" ari
</code></pre>
<p>After:</p>
<pre><code class="hljs"><span class="hljs-tag">&lt;<span class="hljs-name">script</span> <span class="hljs-attr">src</span>=<span class="hljs-string">"https://scastie.scala-lang.org/embedded.js"</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">script</span>&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-name">pre</span> <span class="hljs-attr">class</span>=<span class="hljs-string">'scastie-snippet-9ce19763-b912-4e6a-ab05-13d54649c55d'</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">pre</span>&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-name">pre</span> <span class="hljs-attr">class</span>=<span class="hljs-string">'scastie-snippet-19cb9071-2d60-4d64-ad68-f3779db05edc'</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">pre</span>&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-name">script</span>&gt;</span><span class="javascript"><span class="hljs-built_in">window</span>.addEventListener(<span class="hljs-string">'load'</span>, <span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params"></span>) </span>{
scastie.Embedded(<span class="hljs-string">'.scastie-snippet-9ce19763-b912-4e6a-ab05-13d54649c55d'</span>, {
scastie.Embedded(<span class="hljs-string">'.scastie-snippet-19cb9071-2d60-4d64-ad68-f3779db05edc'</span>, {
<span class="hljs-attr">code</span>: <span class="hljs-string">`val x = 1 + 2
println(x)`</span>,
<span class="hljs-attr">theme</span>: <span class="hljs-string">'light'</span>,
Expand Down
2 changes: 1 addition & 1 deletion docs/tut.html
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ <h2><a class="anchor" aria-hidden="true" id="sbt-tut"></a><a href="#sbt-tut" ari
<code>sbt docs/tut</code>.</p>
<pre><code class="hljs css language-diff">// project/plugins.sbt
<span class="hljs-deletion">- addSbtPlugin("org.tpolecat" % "tut-plugin" % "0.6.10")</span>
<span class="hljs-addition">+ addSbtPlugin("org.scalameta" % "sbt-mdoc" % "2.5.4")</span>
<span class="hljs-addition">+ addSbtPlugin("org.scalameta" % "sbt-mdoc" % "2.6.0")</span>
// build.sbt
<span class="hljs-deletion">- enablePlugins(TutPlugin)</span>
<span class="hljs-addition">+ enablePlugins(MdocPlugin)</span>
Expand Down
2 changes: 1 addition & 1 deletion docs/why.html
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ <h2><a class="anchor" aria-hidden="true" id="program-semantics"></a><a href="#pr
res0: scala.concurrent.<span class="hljs-type">Future</span>[<span class="hljs-type">Int</span>] = <span class="hljs-type">Future</span>(<span class="hljs-type">Success</span>(<span class="hljs-number">1</span>))
</code></pre>
<h2><a class="anchor" aria-hidden="true" id="variable-injection"></a><a href="#variable-injection" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Variable injection</h2>
<p>mdoc renders variables like <code>@VERSION@</code> into <code>2.5.4</code>. This makes it easy to
<p>mdoc renders variables like <code>@VERSION@</code> into <code>2.6.0</code>. This makes it easy to
keep documentation up-to-date as new releases are published. Variables can be
passed from the command-line interface with the syntax <code>--site.VARIABLE=value</code>.</p>
<pre><code class="hljs"><span class="hljs-selector-tag">mdoc</span> <span class="hljs-selector-tag">--site</span><span class="hljs-selector-class">.VERSION</span> 1<span class="hljs-selector-class">.0</span><span class="hljs-selector-class">.0</span> <span class="hljs-selector-tag">--site</span><span class="hljs-selector-class">.SCALA_VERSION</span> 2<span class="hljs-selector-class">.12</span><span class="hljs-selector-class">.19</span>
Expand Down

0 comments on commit 9d92b59

Please sign in to comment.