Have you read the Contributing Guidelines on issues?
Prerequisites
Description
Related: #11818 (same createExcerpt regex)
createExcerpt (in @docusaurus/utils) is used to auto-generate a page's meta description / og:description when no description is set in frontmatter. It strips HTML/JSX tags with the regex /<[^>]*>/g, which only matches a tag that opens and closes on the same line.
When the first content node of a doc is a multi-line JSX/MDX element, only its first line is seen (e.g. <MyComponent), the regex finds no >, nothing is stripped, and that literal partial tag becomes the page description.
So a self-closing component written across multiple lines leaks <ComponentName into <meta name="description"> and <meta property="og:description">.
Reproducible demo
Codesandbox didn't display meta tags.
Instead here is the deployment of an old dev commit where we noticed it:
https://2e482d9e.wasp-docs-on-main.pages.dev/docs/guides/debugging/db-studio-fly-io
Notice that it says:
<meta name="description" content="<LastCheckedWithVersionsNotice" data-rh="true">
<meta property="og:description" content="<LastCheckedWithVersionsNotice" data-rh="true">
Source file of the page is:
wasp-lang/wasp@9e9e739#diff-d8b5abb713973340ba8c74763cc1f66fd480a99a60769fe2be013086e363e853
---
title: Database Studio with Fly.io
comments: true
---
import LastCheckedWithVersionsNotice from "@site/src/components/LastCheckedWithVersionsNotice";
<LastCheckedWithVersionsNotice
versions={{ Wasp: "0.24", "Fly CLI": "0.4.11" }}
/>
This guide shows you how to connect to your production database on Fly.io and run `wasp db studio` to inspect or modify your data.
Steps to reproduce
-
Scaffold a fresh site: npm init docusaurus@latest my-site classic.
-
Create a doc with no description frontmatter, whose first body content is a multi-line JSX element, then a real paragraph:
---
title: Repro
---
<SomeComponent
foo="bar"
/>
This paragraph should become the description.
-
npm run start (or build) and inspect the page <head>.
Expected behavior
The auto-generated description / og:description should be the first real paragraph:
This paragraph should become the description.
The JSX element should be ignored, the same way a single-line <SomeComponent foo="bar" /> already is.
Actual behavior
description and og:description are set to the first line of the element:
<meta name="description" content="<SomeComponent">
<meta property="og:description" content="<SomeComponent">
Your environment
System:
- OS: macOS 26.5
- CPU: (12) arm64 Apple M4 Pro
- Memory: 3.72 GB / 48.00 GB
- Shell: 5.9 - /bin/zsh
Binaries:
- Node: 24.14.1 - /Users/mindek/.nvm/versions/node/v24.14.1/bin/node
- npm: 11.12.1 - /Users/mindek/.nvm/versions/node/v24.14.1/bin/npm
- pnpm: 10.10.0 - /Users/mindek/Library/pnpm/pnpm
- bun: 1.3.14 - /opt/homebrew/bin/bun
Browsers:
- Chrome: 150.0.7871.47
- Firefox Developer Edition: 153.0
- Safari: 26.5
npmPackages:
- @docusaurus/core: ~3.10.1 => 3.10.1
- @docusaurus/faster: ~3.10.1 => 3.10.1
- @docusaurus/module-type-aliases: ~3.10.1 => 3.10.1
- @docusaurus/preset-classic: ~3.10.1 => 3.10.1
- @docusaurus/theme-mermaid: ~3.10.1 => 3.10.1
- @docusaurus/tsconfig: ~3.10.1 => 3.10.1
Self-service
Have you read the Contributing Guidelines on issues?
Prerequisites
npm run clearoryarn clearcommand.rm -rf node_modules yarn.lock package-lock.jsonand re-installing packages.Description
Related: #11818 (same
createExcerptregex)createExcerpt(in@docusaurus/utils) is used to auto-generate a page's metadescription/og:descriptionwhen nodescriptionis set in frontmatter. It strips HTML/JSX tags with the regex/<[^>]*>/g, which only matches a tag that opens and closes on the same line.When the first content node of a doc is a multi-line JSX/MDX element, only its first line is seen (e.g.
<MyComponent), the regex finds no>, nothing is stripped, and that literal partial tag becomes the page description.So a self-closing component written across multiple lines leaks
<ComponentNameinto<meta name="description">and<meta property="og:description">.Reproducible demo
Codesandbox didn't display meta tags.
Instead here is the deployment of an old dev commit where we noticed it:
https://2e482d9e.wasp-docs-on-main.pages.dev/docs/guides/debugging/db-studio-fly-io
Notice that it says:
Source file of the page is:
wasp-lang/wasp@9e9e739#diff-d8b5abb713973340ba8c74763cc1f66fd480a99a60769fe2be013086e363e853
Steps to reproduce
Scaffold a fresh site:
npm init docusaurus@latest my-site classic.Create a doc with no
descriptionfrontmatter, whose first body content is a multi-line JSX element, then a real paragraph:npm run start(orbuild) and inspect the page<head>.Expected behavior
The auto-generated
description/og:descriptionshould be the first real paragraph:The JSX element should be ignored, the same way a single-line
<SomeComponent foo="bar" />already is.Actual behavior
descriptionandog:descriptionare set to the first line of the element:Your environment
System:
Binaries:
Browsers:
npmPackages:
Self-service