Skip to content

Commit c43bcb2

Browse files
committed
feat(devtools): add SEO tab documentation with detailed features and functionality
This commit introduces a new README.md file for the SEO tab in the devtools package. It outlines the purpose of the SEO tab, including its major features such as Social Previews, SERP Previews, JSON-LD Previews, and more. Each section provides an overview of functionality, data sources, and how the previews are rendered, enhancing the documentation for better user understanding.
1 parent d6a2925 commit c43bcb2

File tree

1 file changed

+75
-0
lines changed

1 file changed

+75
-0
lines changed
Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
# SEO Tab Overview
2+
3+
## Overview
4+
5+
The seo tab contains major tabs that are complement to the inspect elements light house tab and not a replacement for them. It is a replacement for the extensions and simple tools you use to check and discover things by simply digging deeper in the html section, network or other pages in your site.
6+
7+
SEO tabs:
8+
9+
- Social Previews: shows open graph and twitter previews for you page when shared across social media apps.
10+
- SERP Previews: shows you a similar preview of how your page will be displayed in search engine results page.
11+
- JSON-LD Previews: shows you all the json ld detected in the page.
12+
- Heading Structure Visualizer: preview your layout in heading tags.
13+
- Links preview: check all page links and thier details like internal/external, text, ...
14+
- Canonical & URL & if page is indexible and follow
15+
- overview tab for SEO Score / Report: that contains a percentage of how everything is going in the other tabs and a small icon/link that will redirect them to the sepcific tab for more informations and details.
16+
17+
## Social Previews
18+
19+
Shows simulated share cards for major networks using metadata read from `document.head`.
20+
21+
Implemented networks and tag checks:
22+
23+
- Facebook, LinkedIn, Discord, Slack, Mastodon, Bluesky:
24+
- `og:title`, `og:description`, `og:image`, `og:url`
25+
- X/Twitter:
26+
- `twitter:title`, `twitter:description`, `twitter:image`, `twitter:url`
27+
28+
How it works:
29+
30+
- Reads all `meta` tags from the current page head and maps matches into a per-network report.
31+
- Renders one card per network with:
32+
- network header color,
33+
- preview image (or `No Image` placeholder),
34+
- title (`No Title` fallback),
35+
- description (`No Description` fallback),
36+
- URL (falls back to `window.location.href` when missing).
37+
- Lists missing tags under each network in a dedicated "Missing tags" block.
38+
- Subscribes to head updates via `useHeadChanges` and refreshes reports reactively.
39+
40+
## SERP Previews
41+
42+
Shows Google-style result snippets based on the current page title, description, favicon, URL, and site name.
43+
44+
Data sources:
45+
46+
- `document.title`
47+
- `<meta name="description" ...>`
48+
- `<meta property="og:site_name" ...>` (fallback: hostname without `www.`)
49+
- `<link rel~="icon" ...>` for favicon (resolved to absolute URL when possible)
50+
- `window.location.href`
51+
52+
Rendered previews:
53+
54+
- Desktop preview
55+
- Mobile preview
56+
57+
Truncation and limits:
58+
59+
- Title truncated to `~60` characters for display.
60+
- Description truncated to `~158` characters for display.
61+
- Mobile description overflow check uses `~120` characters (3-line approximation).
62+
63+
Issue reporting:
64+
65+
- Shared checks:
66+
- missing favicon/icon,
67+
- missing title,
68+
- missing meta description,
69+
- title likely too long (message references width > 600px).
70+
- Desktop-specific check:
71+
- meta description may be trimmed (desktop/mobile pixel-width guidance message).
72+
- Mobile-specific check:
73+
- description exceeds mobile 3-line limit.
74+
75+
Like Social Previews, this section updates live through `useHeadChanges`.

0 commit comments

Comments
 (0)