Skip to content

Commit

Permalink
Add frontmatter to various auto-gen docs
Browse files Browse the repository at this point in the history
  • Loading branch information
mike-solomon committed Jan 29, 2025
1 parent 016e173 commit 36d81de
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions src/main/kotlin/org/openrewrite/RecipeMarkdownGenerator.kt
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,12 @@ class RecipeMarkdownGenerator : Runnable {
// Write recipes-with-data-tables.md
val recipesWithDataTablesPath = outputPath.resolve("recipes-with-data-tables.md")
Files.newBufferedWriter(recipesWithDataTablesPath, StandardOpenOption.CREATE).useAndApply {
writeln("# Recipes with Data Tables\n")
writeln("""
---
description: An autogenerated list of all recipes that contain a unique data table.
---
""".trimIndent())
writeln("\n# Recipes with Data Tables\n")

//language=markdown
writeln("_This doc contains all of the recipes with **unique** data tables that have been explicitly " +
Expand Down Expand Up @@ -388,6 +393,10 @@ class RecipeMarkdownGenerator : Runnable {
//language=markdown
writeln(
"""
---
description: An autogenerated table with the latest version of each OpenRewrite module. Updates on an OpenRewrite release.
---
# Latest versions of every OpenRewrite module
OpenRewrite's modules are published to [Maven Central](https://search.maven.org/search?q=org.openrewrite).
Expand Down Expand Up @@ -462,7 +471,12 @@ class RecipeMarkdownGenerator : Runnable {
val moderneRecipesPath = outputPath.resolve("moderne-recipes.md")

Files.newBufferedWriter(moderneRecipesPath, StandardOpenOption.CREATE).useAndApply {
writeln("# Moderne Recipes\n")
writeln("""
---
description: An autogenerated list of recipes that are exclusive to Moderne.
---
""".trimIndent())
writeln("\n# Moderne Recipes\n")

writeln("This doc includes every recipe that is exclusive to users of Moderne. " +
"For a full list of all recipes, check out our [recipe catalog](https://docs.openrewrite.org/recipes). " +
Expand Down

0 comments on commit 36d81de

Please sign in to comment.