Skip to content

doc: Add HTML meta descriptions#643

Merged
skoech merged 2 commits intomainfrom
add-html-description-metadata
Oct 29, 2025
Merged

doc: Add HTML meta descriptions#643
skoech merged 2 commits intomainfrom
add-html-description-metadata

Conversation

@skoech
Copy link
Copy Markdown
Collaborator

@skoech skoech commented Oct 29, 2025

Description

This PR adds HTML meta descriptions to a few pages (more to come) as part of our Traffic/SEO/analytics objectives. We need to generate description metadata for pages, and not rely on Sphinx to create it (or search engines to extract summaries from the content).
The meta description is a type of HTML metadata that influences SEO. It provides a summary of the page, and often, search engines will use it as the search result snippet for that page, if they think it gives users a more accurate description than would be possible generating one purely from the on-page content.

The HTML files used by browsers to render our documentation are generated from non-HTML sources, i.e. rST. This means that we never directly edit the HTML source files, including the meta description and any other HTML metadata. Therefore, we cannot set the meta description directly in the raw HTML. Our Sphinx starter pack automatically generates the meta description for each HTML page from the first 200 visible characters of its main text, excluding the top-level heading, using the sphinxext-opengraph extension.

But we can manually set custom meta description to override the auto-generated one, using the meta directive at the top of the file, with the description option.

Type of change

Delete options that are not relevant.

  • Documentation update (change to documentation only)

How has this been tested?

I've tested the changes locally.

Note

All functional changes should accompany corresponding tests (unit tests, functional tests, etc.).

Please describe the addition/modification of tests done to verify this change. Also list any
relevant details for your test configuration.

Contributor checklist

Please check that you have:

  • self-reviewed the code in this PR

Signed-off-by: Sharon Koech <sharon.koech@canonical.com>
@skoech skoech added the documentation Improvements or additions to documentation label Oct 29, 2025
Signed-off-by: Sharon Koech <sharon.koech@canonical.com>
@skoech skoech changed the title Add HTML meta descriptions doc: Add HTML meta descriptions Oct 29, 2025
@SecondSkoll
Copy link
Copy Markdown

LGTM!
image

@skoech
Copy link
Copy Markdown
Collaborator Author

skoech commented Oct 29, 2025

Thank you, @SecondSkoll!

@skoech skoech merged commit 5949270 into main Oct 29, 2025
76 of 79 checks passed
@UtkarshBhatthere UtkarshBhatthere deleted the add-html-description-metadata branch April 28, 2026 17:08
skoech added a commit that referenced this pull request May 4, 2026
…723)

# Description

This PR adds HTML meta descriptions to some documentation files,
building upon work started in #643.

It also adds a checklist item in the PR template to ensure that the
metadata descriptions are added to every new documentation page created
and every modified file that doesn't already have it.

## Type of change

Delete options that are not relevant.

- Documentation update (change to documentation only)

## How has this been tested?

Built documentation locally to make sure spelling and link checks are
passing.

## Contributor checklist

Please check that you have:

- [ ] self-reviewed the code in this PR
- [ ] added code comments, particularly in less straightforward areas
- [ ] checked and added or updated relevant documentation
- [ ] checked and added or updated relevant release notes
- [ ] added tests to verify effectiveness of this change

---------

Signed-off-by: Sharon Koech <sharon.koech@canonical.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants