Repository: dprint/dprint (language: rust)

Issue:
Feature: Formatting HTML files
Formatting HTML files to help fix indentations, spacing, and optional closed element tags (like meta tags and img shouldn't close). Would be nice to see!


Discussion / hints:
You can use [markup_fmt](https://github.com/g-plane/markup_fmt) which provides dprint support.

Fix patch:
diff --git a/website/src/_includes/layouts/documentation.njk b/website/src/_includes/layouts/documentation.njk
index 0acd9e76e..ec2950dcf 100644
--- a/website/src/_includes/layouts/documentation.njk
+++ b/website/src/_includes/layouts/documentation.njk
@@ -20,9 +20,12 @@ layout: layouts/base.njk
         <li><a href="/plugins/json">JSON</a></li>
         <li><a href="/plugins/markdown">Markdown</a></li>
         <li><a href="/plugins/toml">TOML</a></li>
+        <li><a href="/plugins/yaml">YAML</a></li>
         <li><a href="/plugins/dockerfile">Dockerfile</a></li>
         <li><a href="/plugins/rustfmt">Rustfmt</a></li>
         <li><a href="/plugins/roslyn">Roslyn (C#/VB)</a></li>
+        <li><a href="/plugins/malva">Malva (CSS/SCSS/Sass/Less)</a></li>
+        <li><a href="/plugins/markup_fmt">Markup_fmt (HTML/Vue/Svelte/Astro)</a></li>
         <li><a href="/plugins/prettier">Prettier</a></li>
         <li><a href="/plugins/biome">Biome (JS/TS/JSON)</a></li>
         <li><a href="/plugins/ruff">Ruff (Python)</a></li>
diff --git a/website/src/index.njk b/website/src/index.njk
index 4223ea384..44dbaf3c0 100644
--- a/website/src/index.njk
+++ b/website/src/index.njk
@@ -50,6 +50,7 @@ layout: layouts/base.njk
               <li><a href="/plugins/json">JSON</a></li>
               <li><a href="/plugins/markdown">Markdown</a></li>
               <li><a href="/plugins/toml">TOML</a></li>
+              <li><a href="/plugins/malva">Malva (CSS/SCSS/Sass/Less)</a></li>
               <li><a href="/plugins/dockerfile">Dockerfile</a></li>
               <li><a href="/plugins/roslyn">Roslyn (C#/VB)</a></li>
             </ul>
@@ -60,6 +61,8 @@ layout: layouts/base.njk
             <ul>
               <li><a href="/plugins/prettier">Prettier</a></li>
               <li><a href="/plugins/biome">Biome (JS/TS/JSON)</a></li>
+              <li><a href="/plugins/markup_fmt">markup_fmt (HTML/Vue/Svelte/Astro/...)</a></li>
+              <li><a href="/plugins/yaml">YAML</a></li>
               <li><a href="/plugins/ruff">Ruff (Python)</a></li>
               <li><a href="/plugins/jupyter">Jupyter</a></li>
               <li><a href="/plugins/exec">Exec (rustfmt, yapf, java, etc.)</a></li>
diff --git a/website/src/plugins/malva.md b/website/src/plugins/malva.md
new file mode 100644
index 000000000..239d0f4b6
--- /dev/null
+++ b/website/src/plugins/malva.md
@@ -0,0 +1,41 @@
+---
+title: Malva Plugin
+description: Documentation on the Malva code formatting plugin for dprint.
+layout: layouts/documentation.njk
+---
+
+<nav class="breadcrumb" aria-label="breadcrumbs">
+  <ul>
+    <li><a href="/plugins">Plugins</a></li>
+    <li><a href="/plugins/malva">Malva</a></li>
+  </ul>
+</nav>
+
+# Malva Plugin
+
+Adapter plugin that formats CSS, SCSS, Sass (indented syntax), and Less files via [Malva](https://github.com/g-plane/malva).
+
+## Install and Setup
+
+In your project's directory with a dprint.json file, run:
+
+```shellsession
+dprint config add g-plane/malva
+```
+
+This will update your config file to have an entry for the plugin. Then optionally specify a `"malva"` property to add configuration:
+
+```jsonc
+{
+  "malva": {
+    // malva config goes here
+  },
+  "plugins": [
+    "https://plugins.dprint.dev/g-plane/malva-vx.x.x.wasm"
+  ]
+}
+```
+
+## Configuration
+
+See [Configuration](/plugins/malva/config)
diff --git a/website/src/plugins/malva/config.md b/website/src/plugins/malva/config.md
new file mode 100644
index 000000000..f294927ae
--- /dev/null
+++ b/website/src/plugins/malva/config.md
@@ -0,0 +1,19 @@
+---
+title: Configuration - Malva
+description: Documentation on the configuration file for the Malva formatting plugin for dprint.
+layout: layouts/documentation.njk
+---
+
+<nav class="breadcrumb" aria-label="breadcrumbs">
+  <ul>
+    <li><a href="/plugins">Plugins</a></li>
+    <li><a href="/plugins/malva">Malva</a></li>
+    <li><a href="/plugins/malva/config">Configuration</a></li>
+  </ul>
+</nav>
+
+# Malva - Configuration
+
+<div class="plugin-config-table" data-url="https://plugins.dprint.dev/g-plane/malva/latest/schema.json">
+  Loading...
+</div>
diff --git a/website/src/plugins/markup_fmt.md b/website/src/plugins/markup_fmt.md
new file mode 100644
index 000000000..415af7c88
--- /dev/null
+++ b/website/src/plugins/markup_fmt.md
@@ -0,0 +1,41 @@
+---
+title: markup_fmt Plugin
+description: Documentation on the markup_fmt code formatting plugin for dprint.
+layout: layouts/documentation.njk
+---
+
+<nav class="breadcrumb" aria-label="breadcrumbs">
+  <ul>
+    <li><a href="/plugins">Plugins</a></li>
+    <li><a href="/plugins/markup_fmt">markup_fmt</a></li>
+  </ul>
+</nav>
+
+# Markup_fmt Plugin
+
+Adapter plugin that formats HTML, Vue, Svelte, Astro, Jinja, Twig, Nunjucks, and Vento files via [markup_fmt](https://github.com/g-plane/markup_fmt).
+
+## Install and Setup
+
+In your project's directory with a dprint.json file, run:
+
+```shellsession
+dprint config add g-plane/markup_fmt
+```
+
+This will update your config file to have an entry for the plugin. Then optionally specify a `"markup"` property (not `"markup_fmt"`) to add configuration:
+
+```jsonc
+{
+  "markup": { // not "markup_fmt"
+    // markup_fmt config goes here
+  },
+  "plugins": [
+    "https://plugins.dprint.dev/g-plane/markup_fmt-vx.x.x.wasm"
+  ]
+}
+```
+
+## Configuration
+
+See [Configuration](/plugins/markup_fmt/config)
diff --git a/website/src/plugins/markup_fmt/config.md b/website/src/plugins/markup_fmt/config.md
new file mode 100644
index 000000000..44a129dae
--- /dev/null
+++ b/website/src/plugins/markup_fmt/config.md
@@ -0,0 +1,19 @@
+---
+title: Configuration - markup_fmt
+description: Documentation on the configuration file for the markup_fmt formatting plugin for dprint.
+layout: layouts/documentation.njk
+---
+
+<nav class="breadcrumb" aria-label="breadcrumbs">
+  <ul>
+    <li><a href="/plugins">Plugins</a></li>
+    <li><a href="/plugins/markup_fmt">markup_fmt</a></li>
+    <li><a href="/plugins/markup_fmt/config">Configuration</a></li>
+  </ul>
+</nav>
+
+# Markup_fmt - Configuration
+
+<div class="plugin-config-table" data-url="https://plugins.dprint.dev/g-plane/markup_fmt/latest/schema.json">
+  Loading...
+</div>
diff --git a/website/src/plugins/yaml.md b/website/src/plugins/yaml.md
new file mode 100644
index 000000000..10bd5e346
--- /dev/null
+++ b/website/src/plugins/yaml.md
@@ -0,0 +1,41 @@
+---
+title: YAML Plugin
+description: Documentation on the YAML code formatting plugin for dprint.
+layout: layouts/documentation.njk
+---
+
+<nav class="breadcrumb" aria-label="breadcrumbs">
+  <ul>
+    <li><a href="/plugins">Plugins</a></li>
+    <li><a href="/plugins/yaml">YAML</a></li>
+  </ul>
+</nav>
+
+# YAML Plugin
+
+Adapter plugin that formats YAML files via [Pretty YAML](https://github.com/g-plane/pretty_yaml).
+
+## Install and Setup
+
+In your project's directory with a dprint.json file, run:
+
+```shellsession
+dprint config add g-plane/pretty_yaml
+```
+
+This will update your config file to have an entry for the plugin. Then optionally specify a `"yaml"` property to add configuration:
+
+```jsonc
+{
+  "yaml": { // not "pretty_yaml"
+    // Pretty YAML config goes here
+  },
+  "plugins": [
+    "https://plugins.dprint.dev/g-plane/pretty_yaml-vx.x.x.wasm"
+  ]
+}
+```
+
+## Configuration
+
+See [Configuration](/plugins/yaml/config)
diff --git a/website/src/plugins/yaml/config.md b/website/src/plugins/yaml/config.md
new file mode 100644
index 000000000..70dc24875
--- /dev/null
+++ b/website/src/plugins/yaml/config.md
@@ -0,0 +1,19 @@
+---
+title: Configuration - YAML
+description: Documentation on the configuration file for the YAML formatting plugin for dprint.
+layout: layouts/documentation.njk
+---
+
+<nav class="breadcrumb" aria-label="breadcrumbs">
+  <ul>
+    <li><a href="/plugins">Plugins</a></li>
+    <li><a href="/plugins/yaml">YAML</a></li>
+    <li><a href="/plugins/yaml/config">Configuration</a></li>
+  </ul>
+</nav>
+
+# YAML - Configuration
+
+<div class="plugin-config-table" data-url="https://plugins.dprint.dev/g-plane/pretty_yaml/latest/schema.json">
+  Loading...
+</div>
diff --git a/website/src/scripts/plugin-url-replacer.js b/website/src/scripts/plugin-url-replacer.js
index 786e537e1..6c43e8f51 100644
--- a/website/src/scripts/plugin-url-replacer.js
+++ b/website/src/scripts/plugin-url-replacer.js
@@ -7,6 +7,9 @@ const dockerfileUrl = "https://plugins.dprint.dev/dockerfile-x.x.x.wasm";
 const biomeUrl = "https://plugins.dprint.dev/biome-x.x.x.wasm";
 const ruffUrl = "https://plugins.dprint.dev/ruff-x.x.x.wasm";
 const jupyterUrl = "https://plugins.dprint.dev/jupyter-x.x.x.wasm";
+const malvaUrl = "https://plugins.dprint.dev/g-plane/malva-vx.x.x.wasm";
+const markupFmtUrl = "https://plugins.dprint.dev/g-plane/markup_fmt-vx.x.x.wasm";
+const yamlUrl = "https://plugins.dprint.dev/g-plane/pretty_yaml-vx.x.x.wasm";
 const pluginInfoUrl = "https://plugins.dprint.dev/info.json";
 const schemaVersion = 4;
 
@@ -41,6 +44,15 @@ export function replacePluginUrls() {
           case getWithQuotes(jupyterUrl):
             element.textContent = getWithQuotes(urls["jupyter"]);
             break;
+          case getWithQuotes(malvaUrl):
+            element.textContent = getWithQuotes(urls["malva"]);
+            break;
+          case getWithQuotes(markupFmtUrl):
+            element.textContent = getWithQuotes(urls["markup_fmt"]);
+            break;
+          case getWithQuotes(yamlUrl):
+            element.textContent = getWithQuotes(urls["yaml"]);
+            break;
         }
       }
     });
@@ -61,6 +73,9 @@ function getPluginUrlElements() {
       case getWithQuotes(biomeUrl):
       case getWithQuotes(ruffUrl):
       case getWithQuotes(jupyterUrl):
+      case getWithQuotes(malvaUrl):
+      case getWithQuotes(markupFmtUrl):
+      case getWithQuotes(yamlUrl):
         result.push(stringElement);
         break;
     }
@@ -91,6 +106,9 @@ function getPluginInfo() {
         biome: getUrlForPlugin(data, "dprint-plugin-biome"),
         ruff: getUrlForPlugin(data, "dprint-plugin-ruff"),
         jupyter: getUrlForPlugin(data, "dprint-plugin-jupyter"),
+        malva: getUrlForPlugin(data, "g-plane/malva"),
+        markup_fmt: getUrlForPlugin(data, "g-plane/markup_fmt"),
+        yaml: getUrlForPlugin(data, "g-plane/pretty_yaml"),
       };
     });
 


Test patch: