Skip to content

feat(solutions): support linked Databricks Blog articles alongside native posts#72

Merged
andrelandgraf merged 2 commits intomainfrom
feat/solutions-linked-articles
Apr 29, 2026
Merged

feat(solutions): support linked Databricks Blog articles alongside native posts#72
andrelandgraf merged 2 commits intomainfrom
feat/solutions-linked-articles

Conversation

@andrelandgraf
Copy link
Copy Markdown
Collaborator

@andrelandgraf andrelandgraf commented Apr 29, 2026

Summary

The Solutions tab now supports two kinds of entries via a discriminated union:

  • Native solutions (type: "native"): authored on DevHub. Markdown lives in content/solutions/<id>.md, build-time generates /solutions/<id> like before.
  • Linked solutions (type: "linked"): pure metadata + Open Graph preview image. Cards on the index page deep-link to the original article (no detail route, no markdown stored). Adds four hand-picked Databricks Blog articles:
    • How to Build Production-Ready Data and AI Apps with Databricks Apps and Lakebase
    • Ship quality enterprise AI agents to business users with Agent Bricks and Databricks Apps
    • How to use Lakebase as a transactional data layer for Databricks Apps
    • Database Branching in Postgres: Git-Style Workflows with Databricks Lakebase

TypeScript guarantees you can't construct a half-linked / half-native solution: Solution = NativeSolution | LinkedSolution, with isNativeSolution / isLinkedSolution guards used at every fork in the renderer, the content-entries plugin (only emits routes for native), llms.txt, and the /solutions.md index.

Preview

Light mode

Solutions tab in light mode

Dark mode

Solutions tab in dark mode

Image format

Linked-solution previews use the Open Graph standard (1.91:1) so we can drop the upstream OG asset in directly. npm run verify:images now enforces a second contract:

Folder Aspect Min size Used by
static/img/{guides,examples}/ 16:9 ±2% 1600x900 recipes, examples, cookbooks
static/img/solutions/ 1.91:1 ±2% 1200x628 linked-solution OG previews

The four downloaded OG images are normalized to 1.91:1 (the one 2:1 outlier was lightly cropped with sips) and rendered in a fixed aspect-[1.91/1] container with object-cover so the grid stays consistent regardless of source resolution.

Test plan

  • npm run fmt
  • npm run typecheck
  • npm run verify:images (new 1.91:1 rule on static/img/solutions/)
  • npm run build (also runs in pre-commit)
  • npx vitest run — 164/164 pass, including new tests/solutions.test.ts (discriminator parity, unique ids, linked-metadata invariants) and updated tests/smoke.test.ts (llms.txt mixes internal .md for native and external URLs for linked)
  • npx playwright test — 93/93 pass (no /solutions/ route is emitted, /solutions and /solutions/devhub-launch still load)
  • Manual verification with agent-browser in light + dark mode at http://localhost:3001/solutions
…tive posts

Solutions now uses a discriminated union (`NativeSolution | LinkedSolution`):

- Native solutions live in `content/solutions/<id>.md` and render at
  `/solutions/<id>` exactly as before.
- Linked solutions are pure metadata + an Open Graph preview image. Cards
  on the index page open the original article (e.g. databricks.com/blog).
  No detail route is generated, no markdown content is stored.

Adds four hand-picked Databricks Blog articles (Apps + Lakebase, Agent
Bricks + Apps, Lakebase as transactional layer, Lakebase database
branching) with crawled metadata (title, description, authors, publish
date, OG image).

Linked-solution previews use the Open Graph standard (1.91:1) and are
verified by `npm run verify:images`, which now enforces a separate
contract for `static/img/solutions/` (1.91:1, ≥1200x628) on top of the
existing 16:9 contract for guides/examples.

`llms.txt` and `/solutions.md` index emit external URLs for linked
solutions and internal `.md` paths for native ones, with smoke + unit
tests covering both branches.
@andrelandgraf andrelandgraf merged commit bb31434 into main Apr 29, 2026
@andrelandgraf andrelandgraf deleted the feat/solutions-linked-articles branch April 29, 2026 16:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant