feat: convert standalone pages to top-level MDX - #686
Merged
Conversation
## 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>
Deploying ddev-com-front-end with
|
| 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 |
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. |
Member
|
So happy 😊 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

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
.astrofiles.This wires up the
@astrojs/mdxintegration and moves the standalone static pages (contact, foundation, privacy, newsletter) to file-basedsrc/pages/*.mdx, each using alayoutfrontmatter key pointing at a newMarkdownLayout.astro. MDX inherits the existing remark/rehype pipeline frommarkdown.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.tsin each page rather than duplicated, and thecontactpage 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
Automated Testing Overview
Release/Deployment Notes