Skip to content

Commit

Permalink
Added a changelog to the Mill site (#2717)
Browse files Browse the repository at this point in the history
Pull request: #2717
  • Loading branch information
lefou authored Aug 28, 2023
1 parent be35ef7 commit e0857c4
Show file tree
Hide file tree
Showing 4 changed files with 228 additions and 362 deletions.
35 changes: 20 additions & 15 deletions build.sc
Original file line number Diff line number Diff line change
Expand Up @@ -1447,10 +1447,14 @@ object docs extends Module {
}

def source0 = T.source(millSourcePath)
def projectReadme = T.source(T.workspace / "readme.adoc")
def source = T {
os.copy(source0().path, T.dest, mergeFolders = true)

val pagesWd = T.dest / "modules" / "ROOT" / "pages"
val partialsWd = T.dest / "modules" / "ROOT" / "partials"

os.copy(projectReadme().path, partialsWd / "project-readme.adoc", createFolders = true)

val renderedExamples: Seq[(os.SubPath, PathRef)] =
T.traverse(example.exampleModules)(m =>
Expand Down Expand Up @@ -1568,13 +1572,26 @@ object docs extends Module {
createFolders = true
)
T.log.errorStream.println("Running Antora ...")
// check xrefs
// // check xrefs
// runAntora(
// npmDir = npmBase(),
// workDir = docSite,
// args = Seq(
// "--generator",
// "@antora/xref-validator",
// playbook.last,
// "--to-dir",
// siteDir.toString(),
// "--attribute",
// "page-pagination"
// ) ++
// Seq("--fetch").filter(_ => !authorMode)
// )
// generate site (we can skip the --fetch now)
runAntora(
npmDir = npmBase(),
workDir = docSite,
args = Seq(
"--generator",
"@antora/xref-validator",
playbook.last,
"--to-dir",
siteDir.toString(),
Expand All @@ -1583,18 +1600,6 @@ object docs extends Module {
) ++
Seq("--fetch").filter(_ => !authorMode)
)
// generate site (we can skip the --fetch now)
runAntora(
npmDir = npmBase(),
workDir = docSite,
args = Seq(
playbook.last,
"--to-dir",
siteDir.toString(),
"--attribute",
"page-pagination"
)
)
os.write(siteDir / ".nojekyll", "")

// sanitize devAntora source URLs
Expand Down
2 changes: 1 addition & 1 deletion docs/modules/ROOT/nav.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -58,4 +58,4 @@
* xref:Mill_Design_Principles.adoc[]
* xref:External_References.adoc[]
* {mill-doc-url}/api/latest/mill/index.html[Mill Scaladoc]
* xref:Changelog.adoc[]
4 changes: 4 additions & 0 deletions docs/modules/ROOT/pages/Changelog.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// = Changelog
include::partial$project-readme.adoc[tag=changelog,leveloffset=-1]

include::partial$project-readme.adoc[tag=changelogOld,leveloffset=-1]
Loading

0 comments on commit e0857c4

Please sign in to comment.