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: fern/products/docs/pages/seo/metadata.mdx
+40-1Lines changed: 40 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,12 +3,51 @@ title: Configure SEO metadata
3
3
description: Configure SEO metadata at the page or site level.
4
4
---
5
5
6
-
Configure SEO metadata at the page or sitelevel to improve search visibility and social media previews for your documentation. Keep titles between 50-60 characters and descriptions between 150-160 characters for optimal display.
6
+
Fern automatically generates SEO metadata for every page in your documentation site. You can configure default metadata at the site level and override it on individual pages to improve search visibility and social media previews. Keep titles between 50-60 characters and descriptions between 150-160 characters for optimal display.
7
7
8
8
<Note>
9
9
The metadata configurations on this page are for SEO and social tags that aren't visible to users. For visible footer links, see [footer links configuration](/learn/docs/configuration/what-is-docs-yml#footer-links-configuration).
10
10
</Note>
11
11
12
+
## What Fern auto-generates
13
+
14
+
Fern automatically generates the following SEO metadata for every page in your documentation:
15
+
16
+
**HTML meta tags:**
17
+
-`<title>` tag with site-wide suffix (e.g., "Page Title | Your Site Name")
18
+
- Meta description tag (from `description`, `subtitle`, or `excerpt` fields)
19
+
- Meta keywords tag (when keywords are provided)
20
+
- Canonical URL (automatically constructed from page slug or custom override)
21
+
- Robots meta tags (noindex/nofollow when configured)
22
+
- Favicon link tag
23
+
24
+
**Open Graph tags for social media:**
25
+
-`og:title` - Title shown in social media previews
26
+
-`og:description` - Description shown in social media previews
27
+
-`og:image` - Image shown in social media previews
28
+
-`og:url` - Canonical URL of the page
29
+
-`og:site_name` - Name of your website
30
+
-`og:locale` - Content locale (e.g., "en_US")
31
+
-`og:image:width` and `og:image:height` - Image dimensions
32
+
33
+
**Twitter Card tags:**
34
+
-`twitter:title` - Title shown in Twitter previews
35
+
-`twitter:description` - Description shown in Twitter previews
36
+
-`twitter:image` - Image shown in Twitter previews
37
+
-`twitter:site` - Twitter handle for your website
38
+
-`twitter:creator` - Twitter handle of the content creator
39
+
-`twitter:card` - Card type (e.g., "summary_large_image")
40
+
41
+
**Intelligent fallback system:**
42
+
43
+
Fern uses a three-tier fallback system to ensure every page has appropriate metadata:
44
+
45
+
1.**Page-level configuration** (highest priority) - Values from page frontmatter
46
+
2.**Site-level configuration** - Default values from `docs.yml`
47
+
3.**Sensible defaults** - Automatically generated from page content
48
+
49
+
For example, if a page doesn't specify an `og:image`, Fern will use the site-wide `og:image` from `docs.yml`. If no image is configured at either level, the tag is omitted rather than using a broken or placeholder image.
50
+
12
51
## Page metadata
13
52
14
53
Set SEO properties in each page's [frontmatter](/docs/configuration/page-level-settings) to control how individual pages appear in search results and social media shares. Page-level metadata takes precedence over site-wide settings.
0 commit comments