Skip to content

Latest commit

 

History

History
76 lines (56 loc) · 2.42 KB

File metadata and controls

76 lines (56 loc) · 2.42 KB

ZetaChain Docs

Nextra 2 (Next.js) documentation site. Locales: en-US (default), zh-CN.

Project Structure

  • src/pages/ — MDX content pages, organized by section
  • src/pages/*/_meta.en-US.json / _meta.zh-CN.json — Nextra sidebar config with titles and descriptions
  • src/components/ — React components used in MDX pages
  • src/config/next-seo.config.ts — Global SEO defaults (title, description, OG tags)
  • src/theme.config.tsx — Nextra theme config (head tags, canonical URL, i18n)
  • next-sitemap.config.js — Sitemap generation config
  • public/robots.txt — Auto-generated by next-sitemap

SEO/GEO Requirements

Every content change MUST follow these rules to maintain search engine and AI search visibility.

Canonical Domain

All URLs must use www.zetachain.com. Never use bare zetachain.com. Check:

  • src/constants/globalLinks.ts
  • src/config/next-seo.config.ts
  • Any hardcoded URLs in MDX content

New Pages

Every new .mdx page must have:

  1. Frontmatter with title and description:
    ---
    title: "Page Title"
    description: "One-sentence factual summary of the page content"
    ---
  2. _meta.en-US.json entry as an object with title and description (not a bare string):
    {
      "page-slug": {
        "title": "Page Title",
        "description": "Short description for SEO"
      }
    }
  3. Both locales — every *.en-US.mdx needs a corresponding *.zh-CN.mdx, and every _meta.en-US.json needs a _meta.zh-CN.json.

Images

  • All <Image> and <img> tags must have descriptive alt text (not file paths).
  • Decorative images use alt="".

External Links

  • Use rel="noopener noreferrer" on target="_blank" links.
  • Never use rel="nofollow" for links to partner/ecosystem sites (it tells search engines to ignore the link).

Backlinks

When adding third-party services or partners to the docs, add them to:

  • src/pages/about/services/index.en-US.mdx (and zh-CN) — the services table
  • Optionally a dedicated subpage under src/pages/about/services/ with _meta entries

Headings

  • Each page should have exactly one <h1> (provided by the Hero component via frontmatter title).
  • Content headings in MDX should start at ## (h2), not # (h1).

Build

yarn dev          # Dev server on port 3001
yarn build        # Production build
yarn typecheck    # TypeScript check
yarn lint         # ESLint