@@ -28,6 +28,21 @@ class RecipeMarkdownWriter(
2828 return recipeSource.toString().startsWith(" typescript-search://" )
2929 }
3030
31+ /* *
32+ * Determines the implementation language of a recipe based on its source URI.
33+ * - TypeScript recipes have URIs starting with "typescript-search://"
34+ * - YAML (declarative) recipes have URIs ending with ".yml"
35+ * - All other recipes are assumed to be Java
36+ */
37+ private fun getRecipeLanguage (recipeDescriptor : RecipeDescriptor ): String {
38+ val recipeSource = recipeToSource[recipeDescriptor.name]?.toString() ? : return " Java"
39+ return when {
40+ recipeSource.startsWith(" typescript-search://" ) -> " TypeScript"
41+ recipeSource.endsWith(" .yml" ) -> " YAML"
42+ else -> " Java"
43+ }
44+ }
45+
3146 fun writeRecipe (
3247 recipeDescriptor : RecipeDescriptor ,
3348 outputPath : Path ,
@@ -127,12 +142,15 @@ import TabItem from '@theme/TabItem';
127142 }
128143
129144 private fun BufferedWriter.writeSourceLinks (recipeDescriptor : RecipeDescriptor , origin : RecipeOrigin ) {
145+ val recipeLanguage = getRecipeLanguage(recipeDescriptor)
130146 if (origin.license == Licenses .Proprietary ) {
131147 // language=markdown
132148 writeln(
133149 """
134150 ## Recipe source
135151
152+ **Language**: $recipeLanguage
153+
136154 This recipe is only available to users of [Moderne](https://docs.moderne.io/).
137155
138156 """ .trimIndent()
@@ -145,6 +163,8 @@ import TabItem from '@theme/TabItem';
145163 """
146164 ## Recipe source
147165
166+ **Language**: $recipeLanguage
167+
148168 [GitHub](${origin.githubUrl(recipeDescriptor.name, recipeSource)} ),
149169 [Issue Tracker](${origin.issueTrackerUrl()} ),
150170 [Maven Central](https://central.sonatype.com/artifact/${origin.groupId} /${origin.artifactId} /)
0 commit comments