feat(data): surface the embeddable-charts demo from the data page - #642
Merged
Conversation
The /charts/embeddable-rankings/ demo (how to embed Claracle charts on another site) had no menu entry and no internal link, so it was effectively unreachable. Add a discoverable link at the bottom of the /data/ landing page, guarded with site.GetPage so it never renders a broken link if the page is absent.
Contributor
🔎 Site preview readyA rendered preview of this PR was built with Hugo extended (drafts + future content included). Download it: open the workflow run → Artifacts → Then serve and open it locally: unzip site-preview.zip -d site-preview && cd site-preview
python3 -m http.server 8080 # then open http://localhost:8080/(Links are root-relative, so open it via a local web server rather than Reviewer checklist
|
Contributor
There was a problem hiding this comment.
Pull request overview
This PR improves discoverability of the embeddable Claracle rankings demo by adding a guarded internal link to /charts/embeddable-rankings/ on the /data/ landing page, ensuring the “how to embed charts” entry point is reachable without exposing the iframe endpoints directly.
Changes:
- Adds a short call-to-action paragraph at the bottom of the Data landing page linking to the embeddable rankings demo.
- Uses
site.GetPageto conditionally render the link only when the target page exists (avoids broken links if removed later).
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.
Why
The observatory charts are discoverable (via the Data menu → each ranking page renders its chart), and the
/embeds/iframe endpoints are intentionally hidden (robotsNoIndex). But/charts/embeddable-rankings/— the demo that shows people how to embed Claracle charts on their own site (FR-051) — had no menu entry and no internal link, so it was effectively unreachable.Change
Add a discoverable link at the bottom of the
/data/landing page:Placed in
layouts/data/list.html(durable —content/data/_index.mdis generated and would be overwritten). Guarded withsite.GetPageso it renders nothing if the demo page is ever absent (no broken link).Validation
/data/and points to/charts/embeddable-rankings/, which builds.test_topic_hubs,test_rendered_weekly_links,test_internal_link_checkerpass.Context
Came out of a discoverability question — the charts themselves were findable, but the "embed our charts" feature had no entry point.