Skip to content

feat: convert standalone pages to top-level MDX - #686

Merged
stasadev merged 5 commits into
mainfrom
20230811_markdown_pages
Jul 24, 2026
Merged

feat: convert standalone pages to top-level MDX#686
stasadev merged 5 commits into
mainfrom
20230811_markdown_pages

Conversation

@stasadev

@stasadev stasadev commented Jul 24, 2026

Copy link
Copy Markdown
Member

The Issue

Continuing this work:

I forgot to open that PR before pushing the changes, so here's a new PR.

How This PR Solves The Issue

I was inspired to try to make top-level Markdown work on ddev.com, so that content pages can be authored as Markdown/MDX instead of hand-written HTML in .astro files.

This wires up the @astrojs/mdx integration and moves the standalone static pages (contact, foundation, privacy, newsletter) to file-based src/pages/*.mdx, each using a layout frontmatter key pointing at a new MarkdownLayout.astro. MDX inherits the existing remark/rehype pipeline from markdown.processor, so callouts, slugs, heading anchors, external links, the search index, and relative-link handling all keep working.

Shared values (org name/address/phone, support email, URLs) are now imported directly from src/const.ts in each page rather than duplicated, and the contact page reuses the real <Icon> component for its support cards instead of inlined SVG. The <address> block is normalized to identical markup across all pages.

Manual Testing Instructions

Compare

Preview Production
https://20230811-markdown-pages.ddev-com-front-end.pages.dev/contact/ https://ddev.com/contact/
https://20230811-markdown-pages.ddev-com-front-end.pages.dev/foundation/ https://ddev.com/foundation/
https://20230811-markdown-pages.ddev-com-front-end.pages.dev/newsletter/ https://ddev.com/newsletter/
https://20230811-markdown-pages.ddev-com-front-end.pages.dev/privacy/ https://ddev.com/privacy/

Automated Testing Overview

Release/Deployment Notes

stasadev and others added 3 commits July 24, 2026 16:35
## How This PR Solves The Issue

I was inspired to try to make top-level Markdown work on ddev.com, so
that content pages can be authored as Markdown/MDX instead of hand-written
HTML in `.astro` files.

This wires up the `@astrojs/mdx` integration and moves the standalone
static pages (contact, foundation, privacy, newsletter) to file-based
`src/pages/*.mdx`, each using a `layout` frontmatter key pointing at a new
`MarkdownLayout.astro`. MDX inherits the existing remark/rehype pipeline
from `markdown.processor`, so callouts, slugs, heading anchors, external
links, the search index, and relative-link handling all keep working.

Shared values (org name/address/phone, support email, URLs) are now
imported directly from `src/const.ts` in each page rather than duplicated,
and the `contact` page reuses the real `<Icon>` component for its support
cards instead of inlined SVG. The `<address>` block is normalized to
identical markup across all pages.

🤖 Developed with assistance from [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jul 24, 2026

Copy link
Copy Markdown

Deploying ddev-com-front-end with  Cloudflare Pages  Cloudflare Pages

Latest commit: bb500b1
Status: ✅  Deploy successful!
Preview URL: https://a1265f93.ddev-com-front-end.pages.dev
Branch Preview URL: https://20230811-markdown-pages.ddev-com-front-end.pages.dev

View logs

@stasadev

Copy link
Copy Markdown
Member Author

It's a pretty small change, and I noticed a couple of spacing issues after #685 that I fixed here, so I'm going to pull it.

@stasadev
stasadev merged commit b8b9a23 into main Jul 24, 2026
3 checks passed
@stasadev
stasadev deleted the 20230811_markdown_pages branch July 24, 2026 14:14
@rfay

rfay commented Jul 24, 2026

Copy link
Copy Markdown
Member

So happy 😊

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