Skip to content

mdx

2 posts with the tag “mdx”

How I'm Using MDX Frontmatter to Scale devportals.tech

Building devportals.tech has been an exercise in practicing what I preach about documentation engineering. One of the most impactful decisions I made early was leveraging MDX frontmatter not just for basic metadata, but as the foundation for scalable content workflows. Here’s how it’s working in practice.

When I first set up this Astro Starlight site, I could have just used basic Markdown. But knowing I wanted to build something that demonstrates professional documentation practices, I started with structured frontmatter from day one:

---
title: "Content Branching Strategy for Documentation Teams"
description: "How to manage documentation releases, staging, and quality control using Git workflows"
date: 2025-09-23
authors:
- name: Joaquin Romo
tags:
- git-workflow
- content-management
- documentation-strategy
- staging
---

Simple, but it’s already paying dividends.

As I’ve added more content to the site, patterns are emerging that I never planned but are incredibly valuable:

My tags are becoming a taxonomy that helps visitors (and me) understand the content landscape:

  • content-strategy for high-level planning topics
  • git-workflow for technical implementation details
  • documentation-strategy for process and methodology
  • astro-starlight for platform-specific insights

The Starlight Blog plugin automatically generates tag pages, so this creates navigation paths I didn’t have to manually build.

Even as the only author right now, having structured author metadata sets me up for:

  • Future collaboration - The schema is ready when I invite guest writers
  • Professional presentation - It shows I think about authorship professionally
  • Content attribution - If I repurpose content elsewhere, attribution is baked in

Every piece has a clear publication date, and I’m starting to add lastUpdated fields for major revisions. This helps me:

  • Track content freshness - I can see what might need updates
  • Show visitors currency - Recent dates build confidence
  • Plan maintenance - I can query for older content that needs review

The structured metadata makes my Git workflow much more manageable. When I’m working on new content in feature branches, I can easily see:

  • What’s ready to publish (clean frontmatter)
  • What needs more work (missing descriptions, placeholder content)
  • How content fits into the overall site structure

Having consistent frontmatter forces me to think about each piece:

  • What’s the actual value proposition? (title and description)
  • Who benefits from reading this? (tags and implicit audience)
  • How does this fit the larger narrative? (category and relationships)

It’s like having a checklist that ensures I’m not just writing, but creating strategic content.

I’m using Astro’s content collections with a schema that validates my frontmatter:

const blogSchema = z.object({
title: z.string(),
description: z.string(),
date: z.date(),
authors: z.array(z.object({
name: z.string()
})),
tags: z.array(z.string())
});

This catches mistakes early and ensures consistency. When I tried to publish a post with malformed dates or missing descriptions, the build failed with clear error messages.

As devportals.tech grows, I’m planning to leverage this metadata foundation for:

I want to build scripts that analyze my content patterns:

  • Which topics get the most tags (showing my focus areas)
  • Content gaps where I have few posts
  • Author productivity metrics (just for fun as a solo creator)

The structured data opens possibilities for:

  • “Related content” sections based on tag similarity
  • Topic clustering for themed reading paths
  • Content recommendations based on visitor interests

Rich metadata makes automated social media posts more meaningful. Instead of generic “new post” notifications, I can generate contextual descriptions that highlight the specific value each piece provides.

What I’m really doing is treating my personal documentation site like a product. The frontmatter discipline forces me to:

  • Think strategically about each piece of content
  • Build systems that scale beyond manual management
  • Demonstrate professionalism in how I approach documentation

For anyone building their own documentation site, I’d recommend starting with structured frontmatter even if you’re not sure how you’ll use it all. The discipline of thinking about metadata makes you a better content creator, and the flexibility enables capabilities you haven’t thought of yet.

The question isn’t whether you need metadata - it’s whether you want to build something that can grow intelligently or just accumulate content randomly.


Have you found creative ways to use frontmatter in your own documentation projects? I’d love to hear about approaches that have worked well for you.

From reST to MDX: Why Documentation Frameworks Are Evolving

Documentation frameworks are not just technical choices — they reflect cultural shifts in how we think about developer experience.

For years, reStructuredText (reST) powered serious technical documentation, especially in the Python and scientific communities.
Today, Markdown and MDX dominate modern developer portals. Why? Let’s explore this shift.


Origins:

  • Created for the Python ecosystem.
  • Strict, extensible, and great for generating reference documentation.
  • Closely tied to tools like Sphinx and ReadTheDocs.

Strengths:

  • Rigid grammar and semantic markup → consistency across docs.
  • Mature auto-documentation pipelines (e.g., autodoc with Sphinx).
  • Widely used in academic and scientific projects.

Challenges:

  • Verbose and harder to learn.
  • Contributions from non-experts can be intimidating.
  • Limited support for modern interactive or component-driven docs.

Why Markdown won:

  • Lightweight, readable, and easy to learn.
  • GitHub popularized it as the default for READMEs.
  • Perfect fit for docs-as-code workflows (PRs, reviews, version control).

Tradeoffs:

  • Less expressive than reST.
  • Needed extensions (like frontmatter, tables, or fenced code blocks) to catch up.

What it is:
MDX lets you write Markdown, but embed JSX (React components) directly into your docs.

Why it matters for dev portals:

  • Live code samples and sandboxes.
  • Reusable UI components inside content.
  • Docs can behave more like apps than static manuals.

In the wild:

  • Docusaurus (Meta’s framework).
  • Next.js with MDX plugins.
  • Astro Starlight (content-first with React/Vue/Svelte integrations).

  • Role Evolution: Technical writers → Documentation engineers.
  • Docs Evolution: Static reference → Dynamic experience.
  • Collaboration Evolution: Gatekeeping → Community contribution.

MD/MDX directly supports these cultural shifts by making docs easier to contribute to and more engaging for developers.


Despite the momentum of MD/MDX, reST continues to thrive in:

  • Python projects like Django, NumPy, and SciPy.
  • Scientific communities that value its rigor.
  • Legacy pipelines built around Sphinx extensions.

For many orgs, rewriting entire docsets is costly, so reST will persist in specialized contexts.


  • Momentum: MD/MDX frameworks are the present and future of dev portals.
  • Niche longevity: reST will survive in Python and academia.
  • Your takeaway: Framework choice isn’t only about syntax. It’s about workflows, interactivity, and alignment with developer expectations.

  • reST gave us rigor.
  • Markdown gave us accessibility.
  • MDX gives us interactivity.

This evolution mirrors the shift in developer portals themselves:
From manuals → to platforms → to experiences.

If you’re building a modern developer portal, understanding this history helps you make smarter choices today.