Skip to content

site: add the Google Preferred Sources button - #86

Merged
TheSaltyKorean merged 1 commit into
mainfrom
site/preferred-sources
Aug 26, 2026
Merged

site: add the Google Preferred Sources button#86
TheSaltyKorean merged 1 commit into
mainfrom
site/preferred-sources

Conversation

@TheSaltyKorean

Copy link
Copy Markdown
Owner

Adds Google's Preferred Sources button to the site footer, so a signed-in
reader can mark markdownstudio.dev as a preferred source and see it more often
in their Google Search results.

Per Google's docs
this is two lines: the publisher.js loader in <head> and a
[google-add-preferred-source-btn] element in the body. Google renders and
localises the button itself, and draws nothing if the API is unavailable — the
footer just stays empty rather than breaking.

  • The button's theme is a static data-theme attribute, but the site follows
    the OS theme via prefers-color-scheme and has no JS toggle, so both
    variants ship and a media query picks one.
  • dns-prefetch for news.google.com, matching how the other third-party
    tags are set up.
  • PRIVACY.md notes the new Google-hosted widget.

Website + docs only — no app behaviour changed, so no version bump (rule 9).

Two-line embed per Google's docs: the publisher.js loader in <head> plus a
[google-add-preferred-source-btn] element in the footer. Ships both theme
variants behind a prefers-color-scheme query, since the button's theme is a
static attribute and the site has no JS theme toggle. PRIVACY.md documents
the new Google-hosted widget.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 6ec5d8cf58

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread PRIVACY.md
Comment on lines +64 to +69
The site's footer also embeds Google's **Preferred Sources** button
(`news.google.com/swg/js/v1/publisher.js`), which lets a signed-in reader mark
markdownstudio.dev as a preferred source in their own Google Search settings.
It is a Google-hosted widget, so loading it tells Google the page was viewed,
and it is governed by [Google's privacy policy](https://policies.google.com/privacy).
It sets nothing itself unless you click it, and it is not used for measurement.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Update the privacy policy revision date

This adds a new third-party data disclosure while the policy header still says Last updated: July 13, 2026. Because the widget was added on August 26, readers cannot reliably determine whether they have seen the current privacy terms; update the revision date alongside this disclosure.

Useful? React with 👍 / 👎.

@TheSaltyKorean
TheSaltyKorean merged commit 554fbb4 into main Aug 26, 2026
5 checks passed
@TheSaltyKorean
TheSaltyKorean deleted the site/preferred-sources branch August 26, 2026 08:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant