You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/content/4.plugins/1.built-in/headings.md
+10-4Lines changed: 10 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -60,26 +60,32 @@ The description check always looks at the node **immediately after** the title
60
60
61
61
| Option | Type | Default | Description |
62
62
|---|---|---|---|
63
-
|[`titleTag`](#options-code-titletag)|`string`|`'h1'`| Element tag to extract as the page title |
64
-
|[`descriptionTag`](#options-code-descriptiontag)|`string`|`'p'`| Element tag to extract as the page description |
63
+
|[`titleTag`](#options-code-titletag)|`string \| false`|`'h1'`| Element tag to extract as the page title, or `false` to disable|
64
+
|[`descriptionTag`](#options-code-descriptiontag)|`string \| false`|`'p'`| Element tag to extract as the page description, or `false` to disable|
65
65
|[`remove`](#options-code-remove)|`boolean`|`false`| Remove extracted nodes from the tree after extraction |
66
66
67
67
### `titleTag`
68
68
69
-
The element tag to read the title from.
69
+
The element tag to read the title from. Set to `false` to disable title extraction entirely.
70
70
71
71
```typescript
72
72
headings({ titleTag: 'h2' })
73
+
74
+
// Disable title extraction
75
+
headings({ titleTag: false })
73
76
```
74
77
75
78
**Default:**`'h1'`
76
79
77
80
### `descriptionTag`
78
81
79
-
The element tag to read the description from. Use `'blockquote'` if you prefer a block quote as the lead-in description.
82
+
The element tag to read the description from. Use `'blockquote'` if you prefer a block quote as the lead-in description. Set to `false` to disable description extraction entirely.
0 commit comments