forrtproject / forrtproject/forrtproject.github.io
Generate accurate, unique meta descriptions
- 主要言語
- HTML
- スター
- 42
- フォーク
- 33
- 平均マージ
- 2日 6時間
- マージ済み PR(30日)
- 19
説明
## Why this needs addressing
The shared head template hard-cuts every description with `printf "%.254s"`, which can split words. The audit also found generic fallback descriptions repeated across author and tag pages. The live author page `/authors/kimberly-quinn/` currently uses the site-wide description and is marked `noindex, follow`.
Google does not require a fixed meta-description length; it recommends accurate, page-specific, useful descriptions and truncates snippets as needed. The issue is therefore duplication and poor generation, not the number 254 by itself.
Relevant implementation: `layouts/partials/site_head.html`.
## Requested change
- Generate unique, human-readable descriptions for glossary terms, curated resources, author profiles, and tag archives from their actual content/metadata.
- When a fallback truncation is needed, truncate on a word boundary and treat the target as a presentation heuristic, not an SEO rule.
- Escape entities exactly once so literal `“`-style output is not emitted.
- Keep deliberate `noindex` behaviour for genuinely empty taxonomies/profiles, but do not use the generic site description as their page description.
## Acceptance criteria
- Representative descriptions are page-specific, valid HTML attributes, and do not end mid-word.
- Duplicate-description counts for author/tag/resource samples are reduced or explicitly justified.
- Non-English descriptions render the intended characters once.
- Add a build-time check for missing or unintentionally duplicated descriptions on indexable pages.
Reference: https://developers.google.com/search/docs/appearance/snippet
コントリビューションガイド
評価
この issue はまだ評価されていません。