Skip to content

Restore the Plausible analytics script on the Fumadocs site - #4

Merged
kyleconroy merged 1 commit into
mainfrom
claude/restore-docs-script-5pblef
Sep 2, 2026
Merged

Restore the Plausible analytics script on the Fumadocs site#4
kyleconroy merged 1 commit into
mainfrom
claude/restore-docs-script-5pblef

Conversation

@kyleconroy

Copy link
Copy Markdown
Contributor

Summary

The old Sphinx docs loaded Plausible via docs/_templates/layout.html in sqlc-dev/sqlc. That override went away when docs/ there became a pure Markdown directory, so the Fumadocs build for /en/latest shipped without analytics.

This adds the same tag back to the root layout (app/layout.tsx), byte for byte:

<script defer data-domain="docs.sqlc.dev" data-api="https://proxy.sqlc.dev/api/event" src="https://proxy.sqlc.dev/js/script.js"></script>

It is a plain <script> in <head> rather than next/script: the Next component only injects the tag client-side after hydration, and it did not appear in the exported HTML at all.

Verification

  • Ingested current sqlc docs, ran npm run build and npm run types:check.
  • The tag is present in all 81 exported pages. The only HTML files without it are the two howto/uploadhowto/push redirect stubs, as intended.

Not changed

The legacy Sphinx snapshots are rebuilt from each tag's own docs/, so v1.27.0 and later already carry the script. Older tags never had it on Read the Docs either and are left as-is.

🤖 Generated with Claude Code

https://claude.ai/code/session_01GDfqKuPpCRwaDtjxVCRfGe


Generated by Claude Code

The old Sphinx docs carried it in docs/_templates/layout.html, which went
away when sqlc-dev/sqlc docs/ became pure Markdown. Add the same tag to
the root layout so every exported page loads it again.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GDfqKuPpCRwaDtjxVCRfGe
@kyleconroy
kyleconroy merged commit 7178b6e into main Sep 2, 2026
1 check passed
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.

2 participants