Skip to content

Commit f3e79ac

Browse files
devin-ai-integration[bot]cdonel707devalog
authored
docs: document what Fern auto-generates for SEO metadata (#1751)
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Co-authored-by: Chris McDonnell <[email protected]> Co-authored-by: Devin Logan <[email protected]>
1 parent 9dff74c commit f3e79ac

File tree

1 file changed

+47
-5
lines changed

1 file changed

+47
-5
lines changed

fern/products/docs/pages/seo/metadata.mdx

Lines changed: 47 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,62 @@ title: Configure SEO metadata
33
description: Configure SEO metadata at the page or site level.
44
---
55

6-
Configure SEO metadata at the page or site level 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 all SEO metadata for every page in your documentation site. Search engines and social media previews work out of the box with no configuration required.
7+
8+
When you do want to customize SEO settings, you can set defaults [at the site level](#website-metadata) or override them on [individual pages](#page-level-configuration). Keep titles between 50-60 characters and descriptions between 150-160 characters for optimal display.
79

810
<Note>
911
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).
1012
</Note>
1113

12-
## Page metadata
14+
## How it works
1315

14-
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.
16+
Fern looks for metadata values in this order:
1517

16-
<Markdown src="/snippets/seo-metadata-page.mdx" />
18+
1. **Page frontmatter** - Custom SEO values for a specific page
19+
2. **Site-level `docs.yml`** - Default SEO values for all pages
20+
3. **Automatic defaults** - Generated from your page's existing title, description, etc.
21+
22+
<Info title="Example">
23+
`og:image` is the image that appears in social media previews. If you don't set `og:image` in a page's frontmatter, Fern uses the site-wide `og:image` from `docs.yml`. If neither is configured, the tag is omitted entirely.
24+
</Info>
25+
26+
27+
## What Fern automatically generates
28+
29+
For every page, Fern creates these SEO tags in your HTML:
30+
31+
<AccordionGroup>
32+
<Accordion title="HTML meta tags">
33+
- `<title>` tag with site-wide suffix (e.g., "Page Title | Your Site Name")
34+
- Meta description (pulled from your `description`, `subtitle`, or `excerpt` fields)
35+
- Meta keywords (when you provide them)
36+
- Canonical URL (from your page slug or `canonical-url` override)
37+
- Robots meta tags (`noindex`/`nofollow` when configured)
38+
- Favicon link tag
39+
</Accordion>
40+
<Accordion title="Open Graph tags (for LinkedIn, Slack, Discord, etc.)">
41+
- `og:title`, `og:description`, `og:image` - What appears in social previews
42+
- `og:url` - Canonical URL of the page
43+
- `og:site_name` - Your website name
44+
- `og:locale` - Content language (e.g., "en_US")
45+
- `og:image:width`, `og:image:height` - Image dimensions
46+
</Accordion>
47+
<Accordion title="Twitter Card tags">
48+
- `twitter:title`, `twitter:description`, `twitter:image` - What appears in Twitter/X previews
49+
- `twitter:site`, `twitter:creator` - Your Twitter handles
50+
- `twitter:card` - Card type (e.g., "summary_large_image")
51+
</Accordion>
52+
</AccordionGroup>
1753

1854
## Website metadata
1955

20-
Define default SEO properties for your entire documentation site in your [`docs.yml` file](/docs/configuration/what-is-docs-yml). These settings apply to all pages unless overridden by page-specific metadata.
56+
Set default SEO metadata for your entire documentation site in [`docs.yml`](/docs/configuration/what-is-docs-yml). These settings apply to all pages unless overridden by page-specific metadata.
2157

2258
<Markdown src="/snippets/seo-metadata-site.mdx" />
59+
60+
## Page-level configuration
61+
62+
Configure SEO metadata in your page's [frontmatter](/docs/configuration/page-level-settings) to control how individual pages appear in search results and social media shares. These settings override site-wide settings.
63+
64+
<Markdown src="/snippets/seo-metadata-page.mdx" />

0 commit comments

Comments
 (0)