site: add the Google Preferred Sources button - #86
Conversation
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.
There was a problem hiding this comment.
💡 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".
| 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. |
There was a problem hiding this comment.
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 👍 / 👎.
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.jsloader in<head>and a[google-add-preferred-source-btn]element in the body. Google renders andlocalises the button itself, and draws nothing if the API is unavailable — the
footer just stays empty rather than breaking.
data-themeattribute, but the site followsthe OS theme via
prefers-color-schemeand has no JS toggle, so bothvariants ship and a media query picks one.
dns-prefetchfornews.google.com, matching how the other third-partytags are set up.
PRIVACY.mdnotes the new Google-hosted widget.Website + docs only — no app behaviour changed, so no version bump (rule 9).