Guides › 静态站 SEO 实战:让 Cloudflare Pages 站点更好被收录

静态站 SEO 实战:让 Cloudflare Pages 站点更好被收录

Updated: Oct 2026建站实战

Great content is worthless if search can't crawl it. Here's the full SEO stack this site actually uses.

Structured data

Per-page meta

Sitemap & robots

List every page in sitemap.xml, point robots.txt at it, submit via Search Console and request indexing. Keep it updated as content grows.

Extra for multilingual

We use single-URL with JS language switching. Separate /zh/ and /en/ URLs are cleaner for SEO but cost more to maintain. Pick by scale.

Pre-AdSense checklist

Choosing structured data

Bulk injection approach

With many pages, hand-editing heads is impractical. Write an idempotent script that walks all HTML, injects OG/Twitter/hreflang/JSON-LD, and uses a marker comment to avoid duplicates. Re-run after edits.

Social share image

Add a 1200×630 OG image so shared links render proper cards. Generating it programmatically with Pillow keeps the style consistent.

Two i18n approaches

Either way, declare hreflang for all variants and ensure each language has enough content to avoid thin pages.

seo-layers.svg
Diagram · seo-layers.svg

Real case: the SEO stack built once

At 24 articles the SEO stack was built once: OG / JSON-LD / hreflang sitewide, 14 reviews with Review ratings (eligible for star rich results), ItemList on listing pages, and a 30-URL sitemap submitted to Search Console. The whole stack runs off one idempotent script — re-run after adding content to sync everything.

Advertisement
Ad slot

Strumenti correlati