Skip to content

Commit 17896da

Browse files
committed
restructure info
1 parent 386d502 commit 17896da

File tree

1 file changed

+40
-37
lines changed

1 file changed

+40
-37
lines changed

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

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

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.
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

14+
## How it works
15+
16+
Fern looks for metadata values in this order:
17+
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+
1227
## What Fern automatically generates
1328

14-
Fern automatically generates the following SEO metadata for every page in your documentation:
29+
For every page, Fern creates these SEO tags in your HTML:
1530

16-
**HTML meta tags:**
31+
<AccordionGroup>
32+
<Accordion title="HTML meta tags">
1733
- `<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)
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)
2238
- 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
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
2842
- `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
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
3950
- `twitter:card` - Card type (e.g., "summary_large_image")
51+
</Accordion>
52+
</AccordionGroup>
4053

41-
**Intelligent fallback system:**
42-
43-
Fern uses a three-tier fallback system to ensure every page has appropriate metadata:
54+
## Website metadata
4455

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
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.
4857

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.
58+
<Markdown src="/snippets/seo-metadata-site.mdx" />
5059

51-
## Page metadata
60+
## Page-level configuration
5261

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.
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.
5463

5564
<Markdown src="/snippets/seo-metadata-page.mdx" />
56-
57-
## Website metadata
58-
59-
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.
60-
61-
<Markdown src="/snippets/seo-metadata-site.mdx" />

0 commit comments

Comments
 (0)