Skip to content

Improved SEO by adding fallback for empty meta description#617

Open
kritsii wants to merge 2 commits intowagtail:mainfrom
kritsii:fix-meta-description
Open

Improved SEO by adding fallback for empty meta description#617
kritsii wants to merge 2 commits intowagtail:mainfrom
kritsii:fix-meta-description

Conversation

@kritsii
Copy link

@kritsii kritsii commented Feb 27, 2026

This PR ensures that the <meta name="description"> tag is never rendered empty.
Previously, if page.search_description was not set, the meta description content attribute would be empty, causing a Lighthouse SEO warning:
Document does not have a meta description

This update adds a fallback to use the page title when no search description is provided.

After this change:

  • The Lighthouse SEO warning is resolved

  • SEO score improves from 91 to 100

  • The page always includes a valid meta description

  • This improves overall SEO robustness and ensures better search engine indexing.

@kritsii
Copy link
Author

kritsii commented Mar 3, 2026

Hi @thibaudcolas @lb- ,
just wanted to follow up on this PR, let me know if there's anything I should update.
Happy to make changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant