Skip to content

Commit

Permalink
add in documenation for targeting an individual file
Browse files Browse the repository at this point in the history
Also bump the docusaurus version
  • Loading branch information
ckipp01 committed Apr 20, 2020
1 parent c957fe2 commit 585c350
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 6 deletions.
7 changes: 7 additions & 0 deletions docs/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -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@`.

Expand Down
4 changes: 2 additions & 2 deletions mdoc-sbt/src/main/scala/mdoc/MdocPlugin.scala
Original file line number Diff line number Diff line change
Expand Up @@ -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](
Expand Down
6 changes: 3 additions & 3 deletions mdoc/src/main/scala/mdoc/internal/cli/Settings.scala
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion website/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@
"rename-version": "docusaurus-rename-version"
},
"devDependencies": {
"docusaurus": "1.6.2"
"docusaurus": "1.14.4"
}
}

0 comments on commit 585c350

Please sign in to comment.