Skip to content

fix: use /x/{slug} deep links for Lark example links#104

Merged
dvhthomas merged 3 commits intomainfrom
fix/lark-deep-links
Mar 24, 2026
Merged

fix: use /x/{slug} deep links for Lark example links#104
dvhthomas merged 3 commits intomainfrom
fix/lark-deep-links

Conversation

@dvhthomas
Copy link
Copy Markdown
Contributor

@dvhthomas dvhthomas commented Mar 23, 2026

Summary

  • Guide pages ("Try it now" links) pointed to the Lark homepage instead of deep-linking to the specific example via /x/{slug}. Fixed for system-sizing, household-budget, and recipe-scaling guides.
  • Created a lark shortcode ({{< lark "slug" "text" >}}) that centralizes the Lark base URL and supports optional deep-link slugs.
  • Added larkURL site param to hugo.yaml and migrated all hardcoded lark.calcmark.org references in layouts and content to use it.

Changes

File Change
site/hugo.yaml Add larkURL param
site/layouts/shortcodes/lark.html New shortcode with optional slug
site/layouts/_default/section.html Use site.Params.larkURL
site/layouts/_default/home.html Use site.Params.larkURL
site/layouts/partials/nav.html Use site.Params.larkURL
8 content files Convert hardcoded URLs to lark shortcode

Test plan

  • task site:build succeeds
  • task test passes
  • task quality passes
  • All 10 worked example pages generate correct /x/{slug} deep links
  • 3 guide pages now deep-link to correct examples
  • Unit-conversion guide uses generic "playground" text (no matching example exists)
  • Zero remaining hardcoded lark.calcmark.org in content or layouts

🤖 Generated with Claude Code

Metrics

Opened by @dvhthomas (agent-assisted) on 2026-03-23 22:57 UTC. Merged 2026-03-24 00:37 UTC.

Metric Value
Cycle Time 1h 40m (created -> merged)
Time to First Review n/a
Review Rounds 0

Generated by gh-velocity

How to interpret

Command: gh velocity pr --post

Setting Value
repository CalcMark/go-calcmark

dvhthomas and others added 3 commits March 23, 2026 16:55
Guide pages linked to the bare lark.calcmark.org root instead of
deep-linking to the specific example via /x/{slug}. Users clicking
"System Sizing example in Lark" landed on the homepage, not the example.

- Add larkURL param to hugo.yaml to centralize the Lark base URL
- Create lark shortcode with optional slug for deep links
- Fix 3 guide pages to deep-link: system-sizing, household-budget, recipe-scaling
- Update unit-conversion guide text (no matching example exists)
- Convert all remaining hardcoded lark.calcmark.org links in content and
  layouts to use the centralized param/shortcode

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Add lark-color icon to the lark shortcode inline links
- Add calcmark_source to embedded-datacenter-cost example page
- Fix unit-conversion guide to deep-link to /x/unit-conversion
- Add .lark-link and .lark-link-icon CSS styles

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@dvhthomas dvhthomas merged commit ba8ea98 into main Mar 24, 2026
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.

1 participant