Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions netlify.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,6 @@
"node": ">=20"
},
"volta": {
"node": "20.19.1"
"node": "20.19.2"
}
}
4 changes: 3 additions & 1 deletion website/.htmlhintrc
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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,
Expand Down
10 changes: 5 additions & 5 deletions website/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 5 additions & 2 deletions website/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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"
}
}
2 changes: 2 additions & 0 deletions website/src/content/docs/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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,
Expand Down
23 changes: 21 additions & 2 deletions website/src/content/docs/getting-started.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,30 @@ import { Tabs, TabItem } from '@astrojs/starlight/components';
</TabItem>
</Tabs>

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
}
```

Expand Down
1 change: 1 addition & 0 deletions website/src/content/docs/usage/cli.md
Original file line number Diff line number Diff line change
@@ -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:
Expand Down
1 change: 1 addition & 0 deletions website/src/content/docs/usage/options.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
id: options
title: Options
description: Options for configuring HTMLHint config files, formatters, and more.
---

## `configFile`
Expand Down