feat(docs): improved SEO (#DS-4376) - #1917
Open
artembelik wants to merge 1 commit into
Open
Conversation
Comment on lines
+12
to
+14
| return description | ||
| .replace(/ |\u00a0/g, ' ') | ||
| .replace(/&/g, '&') |
|
Visit the preview URL for this PR (updated for commit 2f56159): https://koobiq-next--prs-1917-3qdj9n67.web.app (expires Sun, 23 Aug 2026 14:02:32 GMT) 🔥 via Firebase Hosting GitHub Action 🌎 Sign: c9e37e518febda70d0317d07e8ceb35ac43c534c |
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a centralized, SSG-friendly SEO system for the docs site, including generated per-page meta descriptions derived from the first paragraph of localized Markdown overviews, and keeps sitemap/prerender registries aligned with the routable content set.
Changes:
- Introduces a
DocsSeoService+ puredocsResolveSeo()resolver to manage titles, meta tags, canonical, and hreflang alternates. - Generates and commits a static
DOCS_SEO_DESCRIPTIONSregistry from localized Markdown (en/ru) during docs-content build. - Refactors sitemap/prerender route generation around a single shared
docsGetIndexablePagePaths()source of truth and expands coverage (welcome + examples).
Reviewed changes
Copilot reviewed 27 out of 27 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| tools/markdown-to-html/transform-markdown.ts | Reuses overview source globs and triggers SEO description generation after markdown transforms. |
| tools/markdown-to-html/seo-description.ts | Implements paragraph-to-plain-text extraction/truncation for meta descriptions. |
| tools/markdown-to-html/generate-seo-descriptions.ts | Generates apps/docs/src/app/seo-descriptions.ts from localized markdown sources. |
| tools/markdown-to-html/generate-seo-descriptions.spec.ts | Adds unit tests for the markdown SEO description extractor. |
| tools/generate-sitemap.ts | Switches sitemap generation to shared indexable-paths registry and includes locale roots. |
| tools/generate-prerender-routes.ts | Switches prerender route generation to shared indexable-paths registry. |
| packages/components/splitter/splitter.ru.md | Adds leading summary paragraph for SEO description extraction (ru). |
| packages/components/splitter/splitter.en.md | Adds leading summary paragraph for SEO description extraction (en). |
| packages/components/list/list.ru.md | Adds leading summary paragraph for SEO description extraction (ru). |
| packages/components/list/list.en.md | Adds leading summary paragraph for SEO description extraction (en). |
| packages/components/dl/dl.ru.md | Adds leading summary paragraph for SEO description extraction (ru). |
| packages/components/dl/dl.en.md | Adds leading summary paragraph for SEO description extraction (en). |
| packages/components/core/styles/layout-flex.ru.md | Adds leading summary paragraph for SEO description extraction (ru). |
| packages/components/core/styles/layout-flex.en.md | Adds leading summary paragraph for SEO description extraction (en). |
| apps/docs/src/sitemap.xml | Updates committed sitemap with locale roots and examples URLs. |
| apps/docs/src/prerender-routes.txt | Updates committed prerender route list to include additional indexable pages (e.g. examples). |
| apps/docs/src/app/structure.ts | Extends docs structure items with optional per-page SEO override typing. |
| apps/docs/src/app/services/title-strategy.ts | Delegates navigation-driven SEO updates to DocsSeoService. |
| apps/docs/src/app/services/seo.ts | Adds centralized SEO resolver + DOM applier (meta/canonical/alternates/title/lang). |
| apps/docs/src/app/services/seo.spec.ts | Adds unit tests for resolver behavior and DOM tag updates across navigations. |
| apps/docs/src/app/services/i18n.ts | Adds apiTab translation used by UI + SEO tab titles. |
| apps/docs/src/app/services/snapshots/i18n.spec.ts.snap | Updates snapshot for new apiTab translation entry. |
| apps/docs/src/app/seo-descriptions.ts | Adds generated static description registry consumed by SEO resolver. |
| apps/docs/src/app/page-paths.ts | Introduces shared indexable page path registry for sitemap/prerender generation. |
| apps/docs/src/app/page-paths.spec.ts | Ensures committed sitemap/prerender registries stay in sync with computed paths. |
| apps/docs/src/app/components/component-viewer/component-viewer.template.html | Uses localized translation for the API tab label. |
| apps/docs/e2e.playwright-spec.ts | Updates/extends e2e expectations for new titles and prerendered SEO metadata. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+49
to
+53
| const prettierConfig = await resolveConfig(GENERATED_FILE); | ||
|
|
||
| await writeFile( | ||
| join(process.cwd(), GENERATED_FILE), | ||
| await format(output, { ...prettierConfig, filepath: GENERATED_FILE }) |
Comment on lines
+1
to
+4
| import { extractSeoDescription } from './seo-description'; | ||
|
|
||
| describe(extractSeoDescription.name, () => { | ||
| it('returns visible plain text from the first paragraph', () => { |
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.
No description provided.