Add docs CTAs, sticky install banner, and analytics tracking#1025
Closed
AvdLee wants to merge 1 commit into
Closed
Add docs CTAs, sticky install banner, and analytics tracking#1025AvdLee wants to merge 1 commit into
AvdLee wants to merge 1 commit into
Conversation
Owner
Author
|
Closing this, we will do it differently |
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.
Motivation
Description
DocsCTAAstro component supportingtitle,description,primary, optionalsecondary, acompactvariant, responsive layout, accessible focus states, and data attributes for analytics hooks.DocsInstallBannercomponent that persists dismissal inlocalStorageand is dark-mode compatible.src/components/starlight/Footer.astroand injecting them into docs pages via a small client scriptsrc/scripts/docs-engagement.ts(inserts a compact CTA after the first major content section and a full CTA at the bottom) without modifying MD/MDX sources.Docs CTA Impression(withplacement), CTA clicks (per-CTA event names),Docs Banner Shown,Docs Banner Dismissed, andDocs Banner Click.src/styles/starlight-custom.cssto match the Starlight design tokens and provide accessible focus outlines and responsive behavior.src/components/starlight/Footer.astroandsrc/styles/starlight-custom.css, addedsrc/components/starlight/DocsCTA.astro,src/components/starlight/DocsInstallBanner.astro, andsrc/scripts/docs-engagement.ts, and wired the client module into the docs footer to run only on docs content pages.Testing
cd docs && npm run lintand lint passed successfully.cd docs && npm run format:check(Prettier) and formatting passed successfully after adjustments.cd docs && npm run typecheckand type checks passed (client script compiled as a module and exported an empty export to satisfy module scope).cd docs && npm run knipand it completed successfully.cd docs && npm run buildwhich completed client and static build steps locally but the full build failed in this environment due to an external network fetch error insrc/pages/blog/[slug].astro(ENETUNREACH), unrelated to the CTA/banner changes; the docs-specific changes themselves did not trigger errors.TODO / Recommendations
plausible-event-name=...taxonomy for easier dashboard grouping.src/components/starlight/PageTitle.astro).Codex Task