From ac2dd66c0b8fa5e2ed822c368cda07699ab94e42 Mon Sep 17 00:00:00 2001 From: Docusaurus bot Date: Wed, 18 Sep 2024 12:08:59 +0000 Subject: [PATCH] Deploy website Deploy website version based on de1f63f4ba52aa52564280f2dba148123c5f4438 --- docs/installation.html | 26 +++++++++++++------------- docs/js.html | 4 ++-- docs/modifiers.html | 22 +++++++++++----------- docs/tut.html | 2 +- docs/why.html | 2 +- 5 files changed, 28 insertions(+), 28 deletions(-) diff --git a/docs/installation.html b/docs/installation.html index d71797d7..eb8a31d8 100644 --- a/docs/installation.html +++ b/docs/installation.html @@ -102,7 +102,7 @@

mdoc.MdocPlugin.

Maven Central

// project/plugins.sbt
-addSbtPlugin("org.scalameta" % "sbt-mdoc" % "2.6.0" )
+addSbtPlugin("org.scalameta" % "sbt-mdoc" % "2.6.1" )
 // build.sbt
 lazy val myproject = project  // your existing library
   .settings(...)
@@ -186,51 +186,51 @@ 

Maven Central

curl -L -o coursier https://git.io/coursier
 chmod +x coursier
-coursier launch org.scalameta:mdoc_2.12:2.6.0 -- --site.VERSION 1.0.0
+coursier launch org.scalameta:mdoc_2.12:2.6.1 -- --site.VERSION 1.0.0
 info: Compiling 1 file to website/target/docs
 info: Compiled in 1.2s (0 errors)
 

Add library dependencies to classpath

Use the --classpath argument to change the classpath used for compilation:

 coursier launch \
-   org.scalameta:mdoc_2.12:2.6.0 -- \
+   org.scalameta:mdoc_2.12:2.6.1 -- \
 +  --classpath $(coursier fetch -p org.typelevel:cats-core_2.12:1.5.0)
 

Customize input directory

By default the docs/ directory is processed as input. Use --in to customize the input directory where markdown sources are contained,

-
 coursier launch org.scalameta:mdoc_2.12:2.6.0 -- \
+
 coursier launch org.scalameta:mdoc_2.12:2.6.1 -- \
 +  --in mydocs
 

Process single markdown file

The --in flag doesn't have to be a directory, it also supports individual files.

-
 coursier launch org.scalameta:mdoc_2.12:2.6.0 -- \
+
 coursier launch org.scalameta:mdoc_2.12:2.6.1 -- \
 +  --in mydocs/readme.md
 

Configure site variables like @VERSION@

Use --site.VARIABLE=value to add site variables that can be referenced from markdown as @VARIABLE@.

-
 coursier launch org.scalameta:mdoc_2.12:2.6.0 -- \
+
 coursier launch org.scalameta:mdoc_2.12:2.6.1 -- \
 +  --site.SCALA_VERSION 2.12.19
 

Customize output directory

Use --out to customize where your markdown sources are generated, by default the out/ directory is used.

-
 coursier launch org.scalameta:mdoc_2.12:2.6.0 -- \
+
 coursier launch org.scalameta:mdoc_2.12:2.6.1 -- \
 +  --out target/docs
 

Generate single output file instead of directory

The --out flag doesn't have to be a directory when the --in argument is a regular file, it can also be an individual file.

-
 coursier launch org.scalameta:mdoc_2.12:2.6.0 -- \
+
 coursier launch org.scalameta:mdoc_2.12:2.6.1 -- \
 +  --in readme.template.md \
 +  --out readme.md
 

Process multiple input directories and files

Repeat the --in and --out arguments to process multiple directories and regular files.

-
 coursier launch org.scalameta:mdoc_2.12:2.6.0 -- \
+
 coursier launch org.scalameta:mdoc_2.12:2.6.1 -- \
 +  --in readme.template.md \
 +  --out readme.md \
 +  --in changelog.template.md \
@@ -242,12 +242,12 @@ 

Help

Use --help to learn more how to use the command-line interface.

-
mdoc v2.6.0
+
mdoc v2.6.1
 Usage:   mdoc [<option> ...]
 Example: mdoc --in mydocs --out _site  (custom input/output directories)
          mdoc --watch                  (watch for file changes)
@@ -381,7 +381,7 @@ 

Maven Central

// build.sbt
 scalaVersion := "2.12.19" // Any version in 2.12.x works.
-libraryDependencies += "org.scalameta" %% "mdoc" % "2.6.0"
+libraryDependencies += "org.scalameta" %% "mdoc" % "2.6.1"
 

Then write a main function that invokes mdoc as a library

It's recommended to use --watch while writing documentation to enjoy 3-4x @@ -412,7 +412,7 @@

Consult the mdoc source to learn more how to use the library API. Scaladocs are available -here +here but beware there are limited docstrings for classes and methods. Keep in mind that code in the package mdoc.internal is subject to binary and source breaking changes between any release, including PATCH versions.

diff --git a/docs/js.html b/docs/js.html index 11f23be9..8dea197b 100644 --- a/docs/js.html +++ b/docs/js.html @@ -105,7 +105,7 @@

cat <<EOT > 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.6.0 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.1 org.scala-js:scalajs-linker_2.12:1.16.0 -p) EOT

Note: For scala 3, you may need js-scalac-options=-scalajs - instead of the -XPlugin flag - Doc.

@@ -121,7 +121,7 @@

coursier launch org.scalameta:mdoc-js_2.12:2.6.0 --extra-jars $(pwd) -- --watch +
coursier launch org.scalameta:mdoc-js_2.12:2.6.1 --extra-jars $(pwd) -- --watch
 

Open the URL http://localhost:4001/index.md to see a live preview of the generated Markdown.

diff --git a/docs/modifiers.html b/docs/modifiers.html index b34b99e3..8ff1b50f 100644 --- a/docs/modifiers.html +++ b/docs/modifiers.html @@ -563,18 +563,18 @@

After:

-
<script src="https://scastie.scala-lang.org/embedded.js"></script>
-<pre class='scastie-snippet-2e74071f-03dc-4c78-bee7-1cefda827d41'></pre>
-<script>window.addEventListener('load', function() {
- scastie.Embedded('.scastie-snippet-2e74071f-03dc-4c78-bee7-1cefda827d41', {
-   code: `val x = 1 + 2
-println(x)`,
-   theme: 'light',
-    isWorksheetMode: true,
-    targetType: 'jvm',
-    scalaVersion: '2.12.6'
+
<script src="https://scastie.scala-lang.org/embedded.js"></script>
+<pre class='scastie-snippet-eaf1de45-f452-42b7-88ce-5be99bf3b0cc'></pre>
+<script>window.addEventListener('load', function() {
+ scastie.Embedded('.scastie-snippet-eaf1de45-f452-42b7-88ce-5be99bf3b0cc', {
+   code: `val x = 1 + 2
+println(x)`,
+   theme: 'light',
+    isWorksheetMode: true,
+    targetType: 'jvm',
+    scalaVersion: '2.12.6'
   })
-})</script>
+})</script>
 

⚠️ Inline snippets are slower to run than embedded ones, since they won't be diff --git a/docs/tut.html b/docs/tut.html index 337c3288..36bba6e8 100644 --- a/docs/tut.html +++ b/docs/tut.html @@ -93,7 +93,7 @@

sbt docs/tut.

// project/plugins.sbt
 - addSbtPlugin("org.tpolecat" % "tut-plugin" % "0.6.10")
-+ addSbtPlugin("org.scalameta" % "sbt-mdoc" % "2.6.0")
++ addSbtPlugin("org.scalameta" % "sbt-mdoc" % "2.6.1")
 // build.sbt
 - enablePlugins(TutPlugin)
 + enablePlugins(MdocPlugin)
diff --git a/docs/why.html b/docs/why.html
index c78ec26c..025a2dbe 100644
--- a/docs/why.html
+++ b/docs/why.html
@@ -223,7 +223,7 @@ 

Future[Int] = Future(Success(1))

Variable injection

-

mdoc renders variables like @VERSION@ into 2.6.0. This makes it easy to +

mdoc renders variables like @VERSION@ into 2.6.1. 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 --site.VARIABLE=value.

mdoc --site.VERSION 1.0.0 --site.SCALA_VERSION 2.12.19