Skip to content

feat: Add Plausible#272

Merged
cpsievert merged 3 commits intomainfrom
feat/add-plausible
Mar 20, 2026
Merged

feat: Add Plausible#272
cpsievert merged 3 commits intomainfrom
feat/add-plausible

Conversation

@elnelson575
Copy link
Contributor

Add the Plausible script in necessary to enable tracking. Tested with docs preview.

@elnelson575 elnelson575 marked this pull request as draft March 19, 2026 23:30
@elnelson575 elnelson575 marked this pull request as ready for review March 19, 2026 23:38
@cpsievert cpsievert requested a review from Copilot March 20, 2026 14:10
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds Plausible analytics to the Quarto documentation site by injecting an additional header include that loads the Plausible script.

Changes:

  • Added docs/include-in-header.html to load Plausible analytics in the document <head>.
  • Updated Quarto site config to include the new header file on all HTML pages.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
docs/include-in-header.html New header include containing Plausible script tags and initialization snippet.
docs/_quarto.yml Registers the new header include file via format.html.include-in-header.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +3 to +6
<script>
window.plausible=window.plausible||function(){(plausible.q=plausible.q||[]).push(arguments)},plausible.init=plausible.init||function(i){plausible.o=i||{}};
plausible.init()
</script>
Copy link

Copilot AI Mar 20, 2026

Choose a reason for hiding this comment

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

The inline snippet defines plausible.init and then calls plausible.init() with no arguments, which only sets plausible.o to an empty object. If no runtime configuration is intended, this extra inline script is unnecessary (and adds an inline-JS requirement). If configuration is intended, pass explicit options and ensure initialization happens in a way that actually affects the loaded Plausible script (e.g., don’t call init as a no-op).

Suggested change
<script>
window.plausible=window.plausible||function(){(plausible.q=plausible.q||[]).push(arguments)},plausible.init=plausible.init||function(i){plausible.o=i||{}};
plausible.init()
</script>

Copilot uses AI. Check for mistakes.
@cpsievert cpsievert merged commit 01584d2 into main Mar 20, 2026
7 of 19 checks 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.

3 participants