diff --git a/netlify.toml b/netlify.toml index 08483c6df..8cc8e2c6e 100644 --- a/netlify.toml +++ b/netlify.toml @@ -26,12 +26,12 @@ [[redirects]] from = "/docs/user-guide/list-rules" - to = "/list-rules" + to = "/rules/" status = 301 force = true [[redirects]] from = "/docs/user-guide/usage/cli" - to = "/usage/cli" + to = "/usage/cli/" status = 301 force = true diff --git a/package.json b/package.json index 3951e1a7a..732025361 100644 --- a/package.json +++ b/package.json @@ -80,6 +80,6 @@ "node": ">=20" }, "volta": { - "node": "20.19.1" + "node": "20.19.2" } } diff --git a/website/.htmlhintrc b/website/.htmlhintrc index ccda061c0..e7ff30d01 100644 --- a/website/.htmlhintrc +++ b/website/.htmlhintrc @@ -12,6 +12,7 @@ "button-type-require": false, "doctype-first": false, "doctype-html5": true, + "frame-title-require": true, "h1-require": true, "head-script-disabled": false, "href-abs-or-rel": false, @@ -23,7 +24,8 @@ "inline-style-disabled": false, "input-requires-label": false, "main-require": true, - "meta-description-require": true, + "meta-charset-require": true, + "meta-description-require": false, "meta-viewport-require": true, "script-disabled": false, "space-tab-mixed-disabled": false, diff --git a/website/package-lock.json b/website/package-lock.json index a14c7e8af..36e4cd460 100644 --- a/website/package-lock.json +++ b/website/package-lock.json @@ -10,7 +10,7 @@ "license": "MIT", "dependencies": { "@astrojs/starlight": "^0.34.3", - "astro": "^5.8.2", + "astro": "^5.9.0", "sharp": "^0.34.2" }, "engines": { @@ -1879,12 +1879,12 @@ } }, "node_modules/astro": { - "version": "5.8.2", - "resolved": "https://registry.npmjs.org/astro/-/astro-5.8.2.tgz", - "integrity": "sha512-t0TBpBdVluA2QVmbFBwpIqmTvBwNhIz1XTIT1BWPkDkoIgsiEMf6BOZqcoGG7f4GVKkUB9bTgMOhPgU3tbJ6vQ==", + "version": "5.9.0", + "resolved": "https://registry.npmjs.org/astro/-/astro-5.9.0.tgz", + "integrity": "sha512-AHF7oZDBQRwggHUG0bwBhRQjrDD+vJpCtPd0/GVxDB1hGRV0SQuFWS0UHX5bYczIqFcao1z9o9o0r2rQtHrTMg==", "license": "MIT", "dependencies": { - "@astrojs/compiler": "^2.11.0", + "@astrojs/compiler": "^2.12.0", "@astrojs/internal-helpers": "0.6.1", "@astrojs/markdown-remark": "6.3.2", "@astrojs/telemetry": "3.3.0", diff --git a/website/package.json b/website/package.json index b44223d45..d2fbd395f 100644 --- a/website/package.json +++ b/website/package.json @@ -4,6 +4,9 @@ "private": true, "description": "The HTMLHint website - built with Astro Starlight", "homepage": "https://htmlhint.com", + "bugs": { + "url": "https://github.com/htmlhint/HTMLHint/issues" + }, "funding": { "type": "opencollective", "url": "https://opencollective.com/htmlhint" @@ -21,13 +24,13 @@ }, "dependencies": { "@astrojs/starlight": "^0.34.3", - "astro": "^5.8.2", + "astro": "^5.9.0", "sharp": "^0.34.2" }, "engines": { "node": ">=20" }, "volta": { - "node": "20.19.1" + "node": "20.19.2" } } diff --git a/website/src/content/docs/configuration.md b/website/src/content/docs/configuration.md index 01cab9b3e..7453cff75 100644 --- a/website/src/content/docs/configuration.md +++ b/website/src/content/docs/configuration.md @@ -54,6 +54,7 @@ An example configuration file (with all rules disabled): "doctype-first": false, "doctype-html5": false, "empty-tag-not-self-closed": false, + "frame-title-require": false, "h1-require": false, "head-script-disabled": false, "href-abs-or-rel": false, @@ -65,6 +66,7 @@ An example configuration file (with all rules disabled): "inline-style-disabled": false, "input-requires-label": false, "main-require": false, + "meta-charset-require": false, "meta-description-require": false, "meta-viewport-require": false, "script-disabled": false, diff --git a/website/src/content/docs/getting-started.mdx b/website/src/content/docs/getting-started.mdx index e7cc1acd6..449cd5658 100644 --- a/website/src/content/docs/getting-started.mdx +++ b/website/src/content/docs/getting-started.mdx @@ -16,11 +16,30 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; -2\. Create a `.htmlhintrc` configuration file in the root of your project: +2\. Create a `.htmlhintrc` configuration file in the root of your project with `htmlhint --init`. This will create a file with default rules. You can customize it as needed. For example, you can use the following configuration to enforce some common best practices: ```json { - "attr-value-not-empty": false + "alt-require": true, + "attr-lowercase": true, + "attr-no-duplication": true, + "attr-value-double-quotes": true, + "button-type-require": true, + "doctype-first": true, + "doctype-html5": true, + "frame-title-require": true, + "h1-require": true, + "html-lang-require": true, + "id-unique": true, + "main-require": true, + "meta-charset-require": true, + "meta-description-require": true, + "meta-viewport-require": true, + "spec-char-escape": true, + "src-not-empty": true, + "tag-pair": true, + "tagname-lowercase": true, + "title-require": true } ``` diff --git a/website/src/content/docs/usage/cli.md b/website/src/content/docs/usage/cli.md index 59cc4dfe7..32d7fc41b 100644 --- a/website/src/content/docs/usage/cli.md +++ b/website/src/content/docs/usage/cli.md @@ -1,6 +1,7 @@ --- id: cli title: Command-Line Interface (CLI) +description: Use HTMLHint from the command line to lint your HTML files. There are several options available to customize the behavior of the linter. --- You can use HTMLHint on the command-line. For example: diff --git a/website/src/content/docs/usage/options.md b/website/src/content/docs/usage/options.md index e2f642288..d652fdd9b 100644 --- a/website/src/content/docs/usage/options.md +++ b/website/src/content/docs/usage/options.md @@ -1,6 +1,7 @@ --- id: options title: Options +description: Options for configuring HTMLHint config files, formatters, and more. --- ## `configFile`