Skip to content

Conversation

@jumski
Copy link
Contributor

@jumski jumski commented Oct 8, 2025

Integrates D2 diagramming tool into the website build pipeline, enabling architecture diagrams directly in MDX files.

Changes

  • Added astro-d2 integration with pgflow brand colors for light/dark themes
  • Created .github/actions/setup-d2 - reusable action to install D2 CLI with retry logic
  • Updated CI workflow to install D2 before building website
  • Added public/d2/ to gitignore - SVGs are generated at build time

How it works

Write D2 diagrams in MDX files using ````d2` code blocks:

direction: down
worker: "Edge Worker" {
  shape: cloud
}

At build time:

  1. astro-d2 renders diagrams to SVG in public/d2/
  2. Code blocks are replaced with <img> tags
  3. Static assets deploy to Cloudflare Pages

Example

See /concepts/how-pgflow-works/ for live diagrams showing the three-layer architecture.

@changeset-bot
Copy link

changeset-bot bot commented Oct 8, 2025

⚠️ No Changeset found

Latest commit: 2314aae

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link
Contributor Author

jumski commented Oct 8, 2025

@jumski jumski changed the title feat: add D2 theme support and update documentation with architecture diagrams Add D2 diagram support to documentation Oct 8, 2025
@jumski jumski marked this pull request as ready for review October 8, 2025 12:07
@nx-cloud
Copy link

nx-cloud bot commented Oct 8, 2025

View your CI Pipeline Execution ↗ for commit 2314aae

Command Status Duration Result
nx run edge-worker:test:integration ✅ Succeeded 5m 17s View ↗
nx run client:e2e ✅ Succeeded 2m 50s View ↗
nx affected -t verify-exports --base=origin/mai... ✅ Succeeded 3s View ↗
nx affected -t build --configuration=production... ✅ Succeeded 3s View ↗
nx affected -t lint typecheck test --parallel -... ✅ Succeeded 1m 49s View ↗
nx run core:pgtap ✅ Succeeded 1m 33s View ↗
nx run cli:e2e ✅ Succeeded 5s View ↗
nx run edge-worker:e2e ✅ Succeeded 29s View ↗

☁️ Nx Cloud last updated this comment at 2025-12-10 12:00:54 UTC

@github-actions
Copy link
Contributor

🔍 Preview Deployment: Playground

Deployment successful!

🔗 Preview URL: https://pr-241--pgflow-demo.netlify.app

📝 Details:

  • Branch: setup-d2-diagrams
  • Commit: 71b3ec28a995fbc5ed646a9832796b18de203527
  • View Logs

_Last updated: _

… diagrams

- Introduced 'astro-d2' package and integrated D2 theme overrides for light and dark modes
- Updated documentation to include detailed D2 architecture and task lifecycle diagrams
- Modified package.json to include 'astro-d2' dependency
- Enhanced Astro configuration with new theme settings and diagrams for better clarity
@github-actions
Copy link
Contributor

🔍 Preview Deployment: Website

Deployment successful!

🔗 Preview URL: https://pr-241.pgflow.pages.dev

📝 Details:

  • Branch: setup-d2-diagrams
  • Commit: e423520cc6cc44dd0ab04b89e5a3b0363a5b0023
  • View Logs

_Last updated: _

Copy link
Contributor Author

jumski commented Dec 10, 2025

Merge activity

  • Dec 10, 12:24 PM UTC: A user started a stack merge that includes this pull request via Graphite.
  • Dec 10, 12:24 PM UTC: @jumski merged this pull request with Graphite.

@jumski jumski merged commit aabc0d3 into main Dec 10, 2025
13 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.

2 participants