Skip to content
Merged
Show file tree
Hide file tree
Changes from 10 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .changeset/seo-title-description-length.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
'@svelte-vitals/core': minor
'svelte-vitals': minor
'@svelte-vitals/vite': minor
'@svelte-vitals/mcp': minor
---

Add SEO022 (title length, 30–60 chars) and SEO023 (meta description length,
70–160 chars). Both check only static text — the literal title/description is now
captured onto the head model — and flag both too-short and too-long values; a
dynamic title/description is skipped (presence stays owned by SEO001/SEO002).
22 changes: 22 additions & 0 deletions docs/src/content/docs/ja/rules/seo022.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
title: SEO022 · タイトルの長さ
description: ドキュメントのタイトルは 30〜60 文字であるべきです。
---

**重大度:** info

## チェック内容

静的な `<title>` の表示テキストが 30 文字未満、または 60 文字超のものを検出します。カウント前に空白はトリム・圧縮されます。動的なタイトルは検査しません。

## なぜ重要か

タイトルが短すぎると最も強力なオンページ SEO シグナルを無駄にし、長すぎると検索結果で切り詰められて見出しの末尾が隠れます。

## 修正方法

```svelte
<svelte:head>
<title>検索結果で目を引く、簡潔でわかりやすいページタイトルの付け方ガイド</title>
</svelte:head>
Comment thread
coderabbitai[bot] marked this conversation as resolved.
Resolved
```
25 changes: 25 additions & 0 deletions docs/src/content/docs/ja/rules/seo023.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
title: SEO023 · 説明文の長さ
description: meta description は 70〜160 文字であるべきです。
---

**重大度:** info

## チェック内容

静的な `<meta name="description">` の内容が 70 文字未満、または 160 文字超のものを検出します。カウント前に空白はトリム・圧縮されます。動的な説明文は検査しません。

## なぜ重要か

説明文が短すぎると検索スニペットを活かしきれず、長すぎると検索エンジンに切り詰められて行動喚起が途切れます。

## 修正方法

```svelte
<svelte:head>
<meta
name="description"
content="このページでは、SvelteKit で構築したサイトの SEO を強化し、検索結果での表示やクリック率を改善するための具体的な手順をわかりやすく解説します。"
/>
</svelte:head>
Comment thread
coderabbitai[bot] marked this conversation as resolved.
Resolved
```
22 changes: 22 additions & 0 deletions docs/src/content/docs/rules/seo022.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
title: SEO022 · Title length
description: The document title should be 30–60 characters.
---

**Severity:** info

## What it checks

Flags a static `<title>` whose visible text is shorter than 30 or longer than 60 characters. Whitespace is trimmed and collapsed before counting; dynamic titles are not checked.

## Why it matters

A title that is too short wastes the strongest on-page SEO signal; one that is too long is truncated in search results, hiding the end of your headline.

## How to fix

```svelte
<svelte:head>
<title>Concise, descriptive page title (30–60 chars)</title>
</svelte:head>
```
22 changes: 22 additions & 0 deletions docs/src/content/docs/rules/seo023.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
title: SEO023 · Description length
description: The meta description should be 70–160 characters.
---

**Severity:** info

## What it checks

Flags a static `<meta name="description">` whose content is shorter than 70 or longer than 160 characters. Whitespace is trimmed and collapsed before counting; dynamic descriptions are not checked.

## Why it matters

A description that is too short under-uses the search snippet; one that is too long is truncated by search engines, cutting off your call to action.

## How to fix

```svelte
<svelte:head>
<meta name="description" content="A concise, compelling summary of the page in roughly 70–160 characters." />
</svelte:head>
```
Loading