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: CONTRIBUTING.md
+155Lines changed: 155 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -326,6 +326,161 @@ description: Some brief, but effective description of the page's content.
326
326
327
327
These fields should be present on every documentation page.
328
328
329
+
#### Metadata
330
+
331
+
The `metadata` frontmatter field can be used to define additional information about a documentation page, such as SEO metadata, social sharing tags, or indexing information. It allows you to control how the page appears in browsers, search engines, and social media previews. It has the following subfields:
|`title`|`string`| - | Overrides the browser title and `<title>` meta tag. |
336
+
|`description`|`string`| - | Overrides the meta description shown in search results and link previews. |
337
+
|`authors`|`Array<{ name: string }>`|`[]`| Lists the authors of the page for structured data or article metadata. |
338
+
|`alternates`|`object`|`{}`| Defines canonical and alternate URLs for the page. See its properties below. |
339
+
|`openGraph`|`object`|`{}`| Configures [Open Graph](https://ogp.me/) data for social previews (Facebook, LinkedIn, etc). See its properties below. |
340
+
|`twitter`|`object`|`{}`| Configures [X Cards](https://developer.x.com/en/docs/x-for-websites/cards/overview/abouts-cards) data for previews on X (Twitter). See its properties below. |
341
+
|`robots`|`object`|`{}`| Controls how crawlers index and follow the page. See its properties below. |
342
+
343
+
##### Examples
344
+
345
+
<details>
346
+
<summary>Set a custom browser title</summary>
347
+
348
+
```diff
349
+
---
350
+
title: Example
351
+
+ metadata:
352
+
+ title: Example
353
+
---
354
+
```
355
+
356
+
</details>
357
+
358
+
<details>
359
+
<summary>Set SEO title and description</summary>
360
+
361
+
```diff
362
+
---
363
+
title: Example
364
+
+ metadata:
365
+
+ title: Example
366
+
+ description: Example
367
+
---
368
+
```
369
+
370
+
</details>
371
+
372
+
</details>
373
+
374
+
<details>
375
+
<summary>Add page authors</summary>
376
+
377
+
```diff
378
+
---
379
+
title: Example
380
+
+ metadata:
381
+
+ authors:
382
+
+ - name: Jane Doe
383
+
---
384
+
```
385
+
386
+
</details>
387
+
388
+
<details>
389
+
<summary>Define canonical or alternate URLs for your documentation page</summary>
390
+
<br />
391
+
<p><strong>This is set via the <code>alternates</code> field. It has the following subfields:</strong></p>
|`index`|`boolean`|`true`| Whether the page should appear in search results. |
470
+
|`follow`|`boolean`|`true`| Whether crawlers should follow links from this page. |
471
+
472
+
```diff
473
+
---
474
+
title: Example
475
+
+ metadata:
476
+
+ robots:
477
+
+ index: false
478
+
+ follow: true
479
+
---
480
+
```
481
+
482
+
</details>
483
+
329
484
#### Search
330
485
331
486
The `search` frontmatter field can be used to control how a page is indexed by [Algolia Crawler](https://www.algolia.com/doc/tools/crawler/getting-started/overview/). It has the following subfields:
0 commit comments