-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
# Description Quine-docs is long dead, having been replaced by quine-mkdocs-material. Its continued presence in the repo has exacerbated the difficulty of keeping documentation up-to-date by making it potentially confusing _where_ docs should go, both for us (or at least Ethan) as well as for potential contributors who see the "docs" project in OSS Novelty-docs was never really used, and novelty documentation now lives in quine-enterprise-docs anyway. GitOrigin-RevId: cd20363e9201bdaa27926a7839cb3a1dd3a0e7db
- Loading branch information
1 parent
65551ad
commit b5d1394
Showing
119 changed files
with
33 additions
and
10,887 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -325,99 +325,49 @@ lazy val `quine`: Project = project | |
buildInfoPackage := "com.thatdot.quine.app", | ||
) | ||
|
||
// Files under quine-docs/src/main/paradox/lib have been manually added. When we moved from | ||
// the sbt-paradox-material-theme (see plugins.sbt) to a fork, the | ||
// forked library omitted this directory, so those files have been | ||
// copied from the original plugin library, however, they should _not_ be | ||
// included in the paradox theme. | ||
lazy val `quine-docs`: Project = { | ||
val docJson = Def.task((Compile / paradox / sourceManaged).value / "reference" / "openapi.json") | ||
val cypherTable1 = Def.task((Compile / paradox / sourceManaged).value / "reference" / "cypher-builtin-functions.md") | ||
val docJson = Def.setting((Compile / sourceManaged).value / "reference" / "openapi.json") | ||
val cypherTable1 = Def.setting((Compile / sourceManaged).value / "reference" / "cypher-builtin-functions.md") | ||
val cypherTable2 = | ||
Def.task((Compile / paradox / sourceManaged).value / "reference" / "cypher-user-defined-functions.md") | ||
Def.setting((Compile / sourceManaged).value / "reference" / "cypher-user-defined-functions.md") | ||
val cypherTable3 = | ||
Def.task((Compile / paradox / sourceManaged).value / "reference" / "cypher-user-defined-procedures.md") | ||
val recipesFolder = | ||
Def.task((Compile / paradox / sourceManaged).value / "recipes") | ||
Def.setting((Compile / sourceManaged).value / "reference" / "cypher-user-defined-procedures.md") | ||
|
||
val generateDocs = TaskKey[Unit]("generateDocs", "Generate documentation tables for the Quine (Mkdocs) project") | ||
|
||
Project("quine-docs", file("quine-docs")) | ||
.dependsOn(`quine`) | ||
.settings(commonSettings) | ||
.enablePlugins(ParadoxThatdot, GhpagesPlugin) | ||
.settings( | ||
projectName := "Quine", | ||
git.remoteRepo := "[email protected]:thatdot/quine.io.git", | ||
ghpagesBranch := "main", | ||
ghpagesCleanSite / excludeFilter := { (f: File) => | ||
(ghpagesRepository.value / "CNAME").getCanonicalPath == f.getCanonicalPath | ||
}, | ||
// Same as `paradox` itself | ||
generateDocs := Def | ||
.sequential( | ||
Def.task { | ||
(Compile / runMain) | ||
.toTask( | ||
List( | ||
" com.thatdot.quine.docs.GenerateCypherTables", | ||
cypherTable1.value.getAbsolutePath, | ||
cypherTable2.value.getAbsolutePath, | ||
cypherTable3.value.getAbsolutePath, | ||
).mkString(" "), | ||
) | ||
}, | ||
Def.taskDyn { | ||
(Compile / runMain) | ||
.toTask(s" com.thatdot.quine.docs.GenerateOpenApi ${docJson.value.getAbsolutePath}") | ||
}, | ||
) | ||
.value, | ||
) | ||
.settings( | ||
libraryDependencies ++= Seq( | ||
"org.pegdown" % "pegdown" % pegdownV, | ||
"org.parboiled" % "parboiled-java" % parboiledV, | ||
"org.scalatest" %% "scalatest" % scalaTestV % Test, | ||
), | ||
Compile / paradoxProperties ++= Map( | ||
"snip.github_link" -> "false", | ||
"snip.quine.base_dir" -> (`quine` / baseDirectory).value.getAbsolutePath, | ||
"material.repo" -> "https://github.com/thatdot/quine", | ||
"material.repo.type" -> "github", | ||
"material.social" -> "https://that.re/quine-slack", | ||
"material.social.type" -> "slack", | ||
"include.generated.base_dir" -> (Compile / paradox / sourceManaged).value.toString, | ||
"project.name" -> projectName.value, | ||
"logo.link.title" -> "Quine", | ||
"quine.jar" -> s"quine-${version.value}.jar", | ||
), | ||
description := "Quine is a streaming graph interpreter meant to trigger actions in real-time based on complex patterns pulled from high-volume streaming data", | ||
Compile / paradoxMarkdownToHtml / sourceGenerators += Def.taskDyn { | ||
(Compile / runMain) | ||
.toTask(s" com.thatdot.quine.docs.GenerateOpenApi ${docJson.value.getAbsolutePath}") | ||
.map(_ => Seq()) // return no files because files returned are supposed to be markdown | ||
}, | ||
// Register the `openapi.json` file here | ||
Compile / paradox / mappings ++= List( | ||
docJson.value -> "reference/openapi.json", | ||
), | ||
// --- | ||
// Uncomment to build the recipe template pages | ||
// then add * @ref:[Recipes](recipes/index.md) into docs.md | ||
// --- | ||
//Compile / paradoxMarkdownToHtml / sourceGenerators += Def.taskDyn { | ||
// val inDir: File = (quine / baseDirectory).value / "recipes" | ||
// val outDir: File = (Compile / paradox / sourceManaged).value / "recipes" | ||
// (Compile / runMain) | ||
// .toTask(s" com.thatdot.quine.docs.GenerateRecipeDirectory ${inDir.getAbsolutePath} ${outDir.getAbsolutePath}") | ||
// .map(_ => (outDir * "*.md").get) | ||
//}, | ||
Compile / paradoxNavigationDepth := 3, | ||
Compile / paradoxNavigationExpandDepth := Some(3), | ||
paradoxRoots := List("index.html", "docs.html", "about.html", "download.html"), | ||
Compile / paradoxMarkdownToHtml / sourceGenerators += Def.taskDyn { | ||
(Compile / runMain) | ||
.toTask( | ||
List( | ||
" com.thatdot.quine.docs.GenerateCypherTables", | ||
cypherTable1.value.getAbsolutePath, | ||
cypherTable2.value.getAbsolutePath, | ||
cypherTable3.value.getAbsolutePath, | ||
).mkString(" "), | ||
) | ||
.map(_ => Nil) // files returned are included, not top-level | ||
}, | ||
Compile / paradoxMaterialTheme ~= { | ||
_.withCustomStylesheet("assets/quine.css") | ||
.withLogo("assets/images/quine_logo.svg") | ||
.withColor("white", "quine-blue") | ||
.withFavicon("assets/images/favicon.svg") | ||
}, | ||
Compile / overlayDirectory := (`paradox-overlay` / baseDirectory).value, | ||
) | ||
} | ||
|
||
lazy val `paradox-overlay`: Project = project | ||
|
||
// Spurious warnings | ||
Global / excludeLintKeys += `quine-docs` / Paradox / paradoxNavigationExpandDepth | ||
Global / excludeLintKeys += `quine-docs` / Paradox / paradoxNavigationDepth | ||
Global / excludeLintKeys += `quine-browser` / webpackNodeArgs | ||
Global / excludeLintKeys += `quine-browser` / webpackExtraArgs |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.