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: 5e8e8f0

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

This stack of pull requests is managed by Graphite. Learn more about stacking.

@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 5e8e8f0

Command Status Duration Result
nx run edge-worker:test:integration ✅ Succeeded 5m 18s View ↗
nx run client:e2e ✅ Succeeded 2m 59s View ↗
nx affected -t verify-exports --base=origin/mai... ✅ Succeeded 4s View ↗
nx affected -t build --configuration=production... ✅ Succeeded 31s View ↗
nx affected -t lint typecheck test --parallel -... ✅ Succeeded 2m 16s View ↗
nx run core:pgtap ✅ Succeeded 2m 13s View ↗
nx run cli:e2e ✅ Succeeded 5s View ↗
nx run edge-worker:e2e ✅ Succeeded 55s View ↗

☁️ Nx Cloud last updated this comment at 2025-12-08 21:12:44 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: _

@jumski jumski force-pushed the setup-d2-diagrams branch from dda0f95 to 689397e Compare October 19, 2025 20:17
@jumski jumski force-pushed the setup-d2-diagrams branch 2 times, most recently from 972001f to b0dbf88 Compare November 19, 2025 10:41
… 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

github-actions bot commented Dec 8, 2025

🔍 Preview Deployment: Website

Deployment successful!

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

📝 Details:

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

_Last updated: _

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