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: 689397e

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


How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • merge:queue - adds this PR to the back of the merge queue
  • hotfix:queue - for urgent hot fixes, skip the queue and merge this PR next

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

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

🤖 Nx Cloud AI Fix Eligible

An automatically generated fix could have helped fix failing tasks for this run, but Self-healing CI is disabled for this workspace. Visit workspace settings to enable it and get automatic fixes in future runs.

To disable these notifications, a workspace admin can disable them in workspace settings.


View your CI Pipeline Execution ↗ for commit 689397e

Command Status Duration Result
nx affected -t build --configuration=production... ❌ Failed 25s View ↗
nx affected -t lint typecheck test --parallel -... ✅ Succeeded 7m 26s View ↗

☁️ Nx Cloud last updated this comment at 2025-10-19 20:27:31 UTC

@github-actions
Copy link
Contributor

🔍 Preview Deployment: Website

Deployment successful!

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

📝 Details:

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

_Last updated: _

@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
@jumski jumski force-pushed the setup-d2-diagrams branch from dda0f95 to 689397e Compare October 19, 2025 20:17
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