Skip to content

Commit 6091f01

Browse files
committed
Stabilize generated frontmatter
1 parent 31e756c commit 6091f01

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

.github/scripts/generate-docs.scala

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@ import org.http4s.jdkhttpclient.JdkHttpClient
99
import github4s.{GHResponse, Github}
1010
import github4s.domain.{Issue, PRFilterAll, PRFilterBase, Pagination}
1111
import cats.effect.unsafe.implicits.global
12-
import io.circe.Json
13-
import io.circe.yaml.syntax.AsYaml
12+
import io.circe.{ Json, yaml }
1413

1514
import scala.annotation.tailrec
1615
import scala.sys.process.Process
1716

1817
val gitToken = sys.env("IMPROVEMENT_BOT_TOKEN")
18+
val yamlPrinter = yaml.Printer(preserveOrder = true)
1919

2020
/**
2121
* Generate the sources of the page https://docs.scala-lang.org/sips/all.html from the
@@ -105,7 +105,7 @@ class Updater(sipsRepo: os.Path, docsRepo: os.Path, github: Github[IO]):
105105
.toLowerCase
106106
val fileContent =
107107
s"""---
108-
|${frontmatter.asYaml.spaces2}
108+
|${yamlPrinter.pretty(frontmatter)}
109109
|---
110110
|""".stripMargin
111111
os.write.over(outputPath / s"${fileName}.md", fileContent)

0 commit comments

Comments
 (0)