Repository navigation
Improve SEO metadata, JSON-LD structured data, robots.txt, and bundle sample media assets - #17
Merged
Merged
Conversation
…le sample media assets - Override htmltitle and site_meta in overrides/main.html to keep <title>, og:title, and twitter:title in sync and enrich non-Gemma page titles with the primary model family name. - Emit schema.org JSON-LD (WebSite on homepage, TechArticle + BreadcrumbList on docs pages) and robots meta tags. - Add docs/robots.txt pointing to https://gemma.ai/sitemap.xml. - Fix frontmatter titles/descriptions and remove hidden H1 attributes across 28 docs pages, plus add linter guardrails and unit tests. - Bundle sample media assets (surprise.png, kitchen.jpg, cat.png, roses-are.wav) under docs/assets/capabilities/ and update snippets and generated notebooks to fetch from https://gemma.ai/assets/...
MaartenGr
requested review from
bebechien,
irbg and
osanseviero
as code owners
November 3, 2026 09:49
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Improves on-page and technical SEO across
gemma.aiand bundles sample media assets underdocs/assets/:Template-level SEO titles & JSON-LD structured data (
overrides/main.html):{% block htmltitle %}alongside{% block site_meta %}so<title>,og:title, andtwitter:titlestay in sync.<title>,og:title,twitter:title, and JSON-LD headlines with the primary model family name frompage.meta.models(viapartials/model-names.html) whenever a page'stitledoes not already include"Gemma"(e.g.,DiffusionGemma — Generate output - Gemma DocumentationorLoRA and QLoRA — Gemma 4 - Gemma Documentation).schema.orgJSON-LD (<script type="application/ld+json">):WebSiteon the homepage withalternateName: ["Gemma Docs", "Google Gemma Documentation", "Gemma AI", "gemma.ai"].TechArticle+BreadcrumbListon all documentation pages.<meta name="robots" content="index, follow, max-image-preview:large, max-snippet:-1, max-video-preview:-1">(andnoindex, nofollowfor pages withsearch.exclude: true).og:type="article"on documentation pages (websiteon the homepage).docs/robots.txt:docs/robots.txtdeclaringUser-agent: *,Allow: /, andSitemap: https://gemma.ai/sitemap.xml.Page frontmatter (
title,description) and visible<h1>fixes:docs/models/gemma-4/model-card.md: Renamestitle: Model cardtotitle: Gemma 4 model card(matching all other model cards) and replaces the generic Gemma 1 description with a Gemma 4–specific summary.docs/models/gemma-4/index.md& 4 variant overviews (gemma-3n,embeddinggemma,functiongemma,shieldgemma): Removes{: #hidden-title style="display: none;" }so primary<h1>headings are visible to users and search crawlers, and updatesmodels/gemma-4/index.mdwith a Gemma 4–specifictitleanddescription.docs/deployment/*.md): Aligns frontmattertitle:with each page's# H1(Run Gemma with Ollama,Serve Gemma with vLLM, etc., matchinghuggingface.mdandkeras.md) while keeping compact sidebar labels inzensical.toml."— a visual walkthrough."and generic Gemma 1 descriptions with specific summaries, and regeneratesdocs/llms.txt.Linter guardrails (
scripts/frontmatter_schema.py,scripts/lint_docs.py) & tests (tests/test_agent_docs.py):"visual walkthrough"descriptions infrontmatter_schema.py.<h1>tags (#hidden-title/display: none), model cards whosetitleomits the model name, and pages whose frontmattertitledrops"Gemma"when the page's<h1>includes it.Bundle sample media assets (
docs/assets/capabilities/):surprise.png,kitchen.jpg,cat.png, androses-are.wav(previously fetched fromhttps://ai.google.dev/gemma/docs/...) underdocs/assets/capabilities/.docs/get-started/capabilities/image.md,docs/get-started/capabilities/audio.md,docs/deployment/huggingface.md,docs/deployment/keras.md, anddocs/models/embeddinggemma/multimodal.md(plus their 16 generateddocs/notebooks/*.ipynbfiles) to load fromhttps://gemma.ai/assets/....Verification
uv run python -m unittest discover -s tests -p "test_*.py"(37 tests passed)uv run python scripts/lint_docs.py --baseline(0 new, 0 knownfindings across all 15 checks)uv run python scripts/build_docs.py(verifiedsite/robots.txtand validated all 99 JSON-LD blocks across the built site)