Skip to content

Commit

Permalink
Switching from Laika to scaladoc for doc generation
Browse files Browse the repository at this point in the history
  • Loading branch information
hohonuuli committed Nov 14, 2023
1 parent b279456 commit 5bef451
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 21 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@ jobs:
distribution: "temurin"
cache: "sbt"
- name: Build site
run: sbt laikaSite
run: sbt doc
env:
GITHUB_TOKEN: ${{ github.token }}
- name: Upload site
uses: actions/[email protected]
with:
path: ./target/docs/site
path: ./target/scala-3.3.1/api

deploy:
environment:
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

![Unit Tests](https://github.com/mbari-org/raziel/actions/workflows/test.yml/badge.svg)

![MBARI logo](src/docs/images/logo-mbari-3b.png)
![MBARI logo](src/docs/_asssets/images/logo-mbari-3b.png)

Raziel is a configuration server, the keeper of secrets. It can be used to lookup the configuration of a M3/VARS installation.

Expand Down
22 changes: 7 additions & 15 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@ import laika.helium.Helium
Docker / maintainer := "Brian Schlining <[email protected]>"
Docker / packageName := "mbari/raziel"
Global / onChangedBuildSource := ReloadOnSourceChanges
Compile / doc / scalacOptions ++= Seq(
"-groups",
"-project-footer", "Monterey Bay Aquarium Research Institute",
"-siteroot", "src/docs",
"-doc-root-content", "./src/docs/index.md"
)
// Laika / sourceDirectories := Seq(baseDirectory.value / "src" / "docs")
Test / fork := true
ThisBuild / licenses := Seq(("Apache-2.0", url("http://www.apache.org/licenses/LICENSE-2.0.html")))
Expand All @@ -26,8 +32,7 @@ lazy val root = project
DockerPlugin,
GitBranchPrompt,
GitVersioning,
JavaAppPackaging,
LaikaPlugin)
JavaAppPackaging)
.settings(
name := "raziel",
dockerBaseImage := "openjdk:17",
Expand All @@ -41,19 +46,6 @@ lazy val root = project
else None
},
git.useGitDescribe := true,
laikaTheme := Helium.defaults
.site
.topNavigationBar(
navLinks = Seq(
IconLink.external("https://github.com/mbari-org/raziel", HeliumIcon.github),
IconLink.internal(ast.Path.Root / "api" / "index.html", HeliumIcon.api)
)
).build,
laikaExtensions := Seq(
laika.markdown.github.GitHubFlavor,
laika.parse.code.SyntaxHighlighting
),
laikaIncludeAPI := true,
resolvers ++= Seq(
Resolver.githubPackages("mbari-org", "maven")
),
Expand Down
File renamed without changes
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ This is a normal sbt project. You can compile code with `sbt compile`, run it wi

1. `stage` - Build runnable project in `target/universal`
2. `universal:packageBin` - Build zip files of runnable project in `target/universal`
3. `laikaSite` - Build documentation, including API docs to `target/docs/site`
3. `doc` - Build documentation, including API docs to `target/docs/site`
4. `compile` then `scalafmtAll` - Will convert all syntax to new-style, indent based Scala 3.

## Libraries
Expand All @@ -20,4 +20,4 @@ This is a normal sbt project. You can compile code with `sbt compile`, run it wi

## Notes

Documentation can be added as markdown files in `src/docs` and will be included automatically when you run `laikaSite`.
Documentation can be added as markdown files in `src/docs` and will be included automatically when you run `sbt doc`.
2 changes: 1 addition & 1 deletion src/docs/README.md → src/docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ Raziel is a configuration server for the Video Annotation and Reference System (

## Documentation

Documentation is at <https://mbari-org.github.io/raziel/>
Documentation is at <https://mbari-org.github.io/raziel/>. Source code is at <https://github.com/mbari-org/raziel>.

0 comments on commit 5bef451

Please sign in to comment.