diff --git a/_tools/restylers-docs/src/Restylers/Docs/Render.hs b/_tools/restylers-docs/src/Restylers/Docs/Render.hs index 82f9dd41..1841a611 100644 --- a/_tools/restylers-docs/src/Restylers/Docs/Render.hs +++ b/_tools/restylers-docs/src/Restylers/Docs/Render.hs @@ -23,15 +23,16 @@ renderDocs = T.intercalate "\n\n" . map restylerMarkdown restylerMarkdown :: Restyler -> Text restylerMarkdown restyler = [st| -## #{restyler.name}-restyler +## #{restyler.name} - #{restyler.image.tag} -- **Languages**: #{langs} -- **Tag**: `#{restyler.image.tag}` [see all](https://gallery.ecr.aws/restyled-io/restyler-#{restyler.name}) -- **Links**: +Restyles #{langs}, #{runsAutomatically}. - - #{links} +
+Documentation -- **Enabled by default?**: #{enabled} +- #{links} + +
Configuration @@ -50,13 +51,19 @@ restylers: #{examplesMarkdown}
+ +[See all available images](https://gallery.ecr.aws/restyled-io/restyler-#{restyler.name}) |] where langs :: Text - langs = T.intercalate ", " $ restyler.metadata.languages + langs = + T.intercalate ", " $ map (\x -> "_" <> x <> "_") $ restyler.metadata.languages - enabled :: Text - enabled = if restyler.enabled then "Yes" else "No" + runsAutomatically :: Text + runsAutomatically = + if restyler.enabled + then "runs automatically" + else "must be explicitly enabled" infoYaml :: Text infoYaml = T.intercalate "\n " $ T.lines $ decodeUtf8 $ Yaml.encode info @@ -72,7 +79,7 @@ restylers: ] links :: Text - links = T.intercalate "\n - " $ restyler.documentation + links = T.intercalate "\n- " $ restyler.documentation examplesMarkdown :: Text examplesMarkdown =