Docusaurus meta descriptions: why yours say "Blog" or "| npm | github |"
We checked 4,475 pages on 378 Docusaurus sites. 932 pages (21%), on 290 of the sites, had a meta description under 30 characters; 41% had one under 70, and 11% had none. Google often rewrites a description that short, and the same text goes into og:description, so it is also what Slack, LinkedIn and X show under the link.
On 107 of the sites the blog's index page had the description "Blog". The others mostly came from Docusaurus's fallback, which takes the first line of a page when its front matter has no description. We fetched 478 of the short ones (up to two per site) and read the source of Docusaurus 3.10.2, the current release, to see where each came from.
1. The blog index says "Blog"
The blog plugin's blogDescription option defaults to 'Blog', and the blog list page prints it as the meta description. Every page of the list (/blog, /blog/page/2 and so on) gets the same one. Set it in the preset's blog options, next to blogTitle, which also defaults to "Blog":
// docusaurus.config.js
presets: [
['classic', {
blog: {
blogTitle: 'Engineering blog',
blogDescription: 'Release notes, design decisions and how-tos from the team behind Example.',
},
}],
],
2. The first line becomes the description
A doc or blog post without description in its front matter gets frontMatter.description ?? excerpt, where the excerpt is the first line that is left after Docusaurus skips imports, code blocks and the # title and strips Markdown formatting. What we saw it produce, and confirmed by running 3.10.2's excerpt function on the same Markdown and by building a 3.10.2 site with each case:
- A heading.
## Prerequisitesbecomes "Prerequisites". This was the most common case: 201 sites had pages described by a heading or a few words, often the same words on many pages. - An image.
becomes "Tealium logo": the alt text is kept and the image is dropped. - A table. A page that opens with a table gets its header row as is:
| npm | github |, or| | |for a table of badges. - A JSX component written over several lines. HTML tags are removed only when they close on the same line, so
<DocCardSectionfollowed by its props on the next lines becomes "<DocCardSection". A fix is merged in Docusaurus's main branch but not in a release yet (3.10.2). - A date or note line. "Last updated: 08-21-2025" or "Release date: May 18, 2024", if that is what comes first.
An admonition is fine: the :::note line is removed and the note's first line is used. A short opening sentence is fine too, if it describes the page.
3. The fix: a description in front matter
Front matter wins over the excerpt, on docs, blog posts and Markdown pages in src/pages:
---
title: Slack slash commands
description: Handle Slack slash commands in a bot, with the request format, the 3-second reply limit and an example handler.
---
Aim for 70 to 155 characters that say what the page answers. Docusaurus copies it into og:description, so a link preview shows the same text. For a React page in src/pages, pass description to Layout. On a large site, start with the pages people link to: the blog index, the docs landing page and the most-visited guides.
If rewriting the opening of a page is easier, start it with a plain sentence instead of a heading, image, table or component. The excerpt then picks that sentence up.
4. Check your build
This script lists the pages in build/ whose description is missing, the blog default, Markdown or JSX left-overs, or under 50 characters, and any description shared by more than one page. Save it as check-descriptions.mjs, run npm run build, then node check-descriptions.mjs (Node 20 or later):
import { readdirSync, readFileSync } from "node:fs";
import { join } from "node:path";
const dir = process.argv[2] ?? "build";
const count = new Map();
for (const f of readdirSync(dir, { recursive: true }).filter((f) => f.endsWith(".html"))) {
// the build minifies HTML: attribute values may be unquoted, "quoted" or 'quoted'
const m = readFileSync(join(dir, f), "utf8").match(/<meta[^>]*\bname=["']?description["']?[\s/][^>]*?\bcontent=(?:"([^"]*)"|'([^']*)'|([^\s>]+))/);
const d = m ? (m[1] ?? m[2] ?? m[3]) : "";
const why = !d ? "missing" : d === "Blog" ? "blog default" : /^(\||<|<)/.test(d) ? "markup" : d.length < 50 ? "short" : "";
if (why) console.log(why.padEnd(13), f, JSON.stringify(d));
if (d) count.set(d, [...(count.get(d) ?? []), f]);
}
for (const [d, fs] of count) if (fs.length > 1) console.log(`shared by ${fs.length}`.padEnd(13), JSON.stringify(d));
Docusaurus minifies the built HTML, so the script accepts unquoted and single-quoted values (content=Blog), and a < in a description is left as is. We ran it on a Docusaurus 3.10.2 build of the cases above. For a live site, the free site checker reads your sitemap and reports short, missing and duplicate descriptions across 50 pages. SEO for Docusaurus covers the other settings (preview images, noindex, the sitemap), and Duplicate titles and descriptions on a docs site covers versioned docs.
Automating it with Headlark
Writing a description for each of hundreds of pages is the part that doesn't get done. Headlark's build step runs after docusaurus build and writes a title, a description and Open Graph and X tags into each page's HTML from the page's own content. Your canonical, robots directives and JSON-LD types are kept. Setup for Docusaurus, including baseUrl, is at the end of SEO for Docusaurus.
Try it
Try it free for 14 days on one site and up to 500 pages, no card needed. Add your site.