diff --git a/docs/installation.md b/docs/installation.md index e2d11ffcc..e2c476038 100644 --- a/docs/installation.md +++ b/docs/installation.md @@ -151,6 +151,13 @@ contained, by default the `docs/` directory is used. + --in mydocs ``` +You can also target an individual file by passing it to `--in`. + +```diff + coursier launch org.scalameta:mdoc_@SCALA_BINARY_VERSION@:@VERSION@ -- \ ++ --in mydocs/readme.md +``` + Use `--site.VARIABLE=value` to add site variables that can be referenced from markdown as `@@VARIABLE@`. diff --git a/mdoc-sbt/src/main/scala/mdoc/MdocPlugin.scala b/mdoc-sbt/src/main/scala/mdoc/MdocPlugin.scala index cbb44e6dd..7be4f96a3 100644 --- a/mdoc-sbt/src/main/scala/mdoc/MdocPlugin.scala +++ b/mdoc-sbt/src/main/scala/mdoc/MdocPlugin.scala @@ -18,8 +18,8 @@ object MdocPlugin extends AutoPlugin { ) val mdocIn = settingKey[File]( - "Input directory containing markdown sources to be processed by mdoc. " + - "Defaults to the toplevel docs/ directory." + "Input directory containing markdown sources to be processed by mdoc, or an " + + "individual file that you'd like to target. Defaults to the toplevel docs/ directory." ) val mdocOut = settingKey[File]( diff --git a/mdoc/src/main/scala/mdoc/internal/cli/Settings.scala b/mdoc/src/main/scala/mdoc/internal/cli/Settings.scala index c61092ddb..c66e0ea7f 100644 --- a/mdoc/src/main/scala/mdoc/internal/cli/Settings.scala +++ b/mdoc/src/main/scala/mdoc/internal/cli/Settings.scala @@ -35,9 +35,9 @@ class Section(val name: String) extends StaticAnnotation case class Settings( @Section("Common options") @Description( - "The input directory containing markdown and other documentation sources. " + - "Markdown files will be processed by mdoc while other files will be copied " + - "verbatim to the output directory." + "The input directory containing markdown and other documentation sources " + + "or an individual file that you'd like to target. Markdown files will be " + + "processed by mdoc while other files will be copied verbatim to the output directory." ) @ExtraName("i") in: AbsolutePath, diff --git a/website/package.json b/website/package.json index e61667241..449150096 100644 --- a/website/package.json +++ b/website/package.json @@ -9,6 +9,6 @@ "rename-version": "docusaurus-rename-version" }, "devDependencies": { - "docusaurus": "1.6.2" + "docusaurus": "1.14.4" } }