feat(docs): Google 'Add to preferred sources' button in the site footer - #36
Merged
Merged
Conversation
- Standard JavaScript implementation from the official Google docs: publisher.js in the VitePress head + the auto-scanned [google-add-preferred-source-btn] container. - PreferredSourceFooter.vue mounts in the layout-bottom slot: renders the Google button (theme-aware: light/dark follows the site theme) plus an honest note — the eligible source is the domain sebasoft.github.io (Google's source preferences tool accepts domains and subdomains, not subdirectories). - Browser E2E verified on the HTTP-served build: publisher.js scans and initializes the container (data-initialized=true), the container survives SPA route changes (layout-bottom slot stays mounted), and clicking opens the Google service iframe (news.google.com/swg/ui). - tests/contracts/preferred-source-footer.test.ts: 4 contract tests over the footer surface.
SebaSOFT
force-pushed
the
feat/preferred-source-footer
branch
from
September 28, 2026 13:00
7146b99 to
542687d
Compare
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.
What
Botón oficial de Google
Add to preferred sourcesen el footer de todas las páginas del sitio de docs. Implementación estándar de la doc oficial (developers.google.com/search/docs/appearance/preferred-sources):publisher.js(async) en el head de VitePress — la librería oficial de GooglePreferredSourceFooter.vuemontado en el slotlayout-bottom(persiste en navegación SPA, verificado): renderiza el contenedorgoogle-add-preferred-source-btnescaneado automáticamente + nota explicativadata-themelight/dark sigue el tema del sitiosebasoft.github.io— la tool de preferencias de Google acepta dominios y subdominios, no subdirectorios (nuestro site vive en/neuron-js/)Por qué importa
Preferred Sources hace que el contenido aparezca con badge `preferred` en Top Stories, AI Overviews y AI Mode de Google para los usuarios que nos agregan — refuerzo directo de la línea de descubrimiento por agentes (SEO-6).
Verificación real (browser, build servido por HTTP)
publisher.jscarga y escanea + inicializa el contenedor (data-initialized=true)news.google.com/swg/ui/v1/serviceiframe) — el flujo real de adicióndocs:buildverdeNota de branching
PR independiente de #35 (WebMCP) — ambos tocan
docs/.vitepress/config.ts(head) sin conflicto real: #35 agrega los dos scripts webmcp, este agrega publisher.js. Merge en cualquier orden.