Snippets: Reusable custom components
While MDC provides a rich set of pre-built components, the real power comes with Snippets: your own reusable, parameterized components that work across your entire portal.
Think of Snippets as your component library. Create once, use everywhere. Need a custom call-to-action that appears on multiple pages? Build it as a Snippet. Want consistent API authentication instructions across your docs? Snippet. Complex pricing tables that need regular updates? You guessed it, Snippet.
Here's what makes Snippets powerful:
Dynamic Parameters: Build flexible Snippets with defaults that can be adapted to match the context. Define default values in the Snippet, then override them wherever it's used.
Let's say you create an api-quickstart Snippet with defaults:
# In the Snippet (with front matter defaults)
---
apiName: "Our API"
authMethod: "API Key"
docsLink: "/authentication"
---
Get started with {{ $doc.snippet.apiName }} using {{ $doc.snippet.authMethod }}.
See our [authentication guide]({{ $doc.snippet.docsLink }}) for details.
Then customize it per API:
# In your Payments API page
::snippet
---
name: api-quickstart
data:
apiName: "Payments API"
authMethod: "OAuth 2.0"
docsLink: "/payments/oauth"
---
::
One Snippet, infinite variations. Update the template once, and every API's quickstart guide updates automatically while keeping their specific details intact.
Publishing and privacy Controls: Snippets support both visibility states (public/private) and publishing states (published/unpublished), giving you granular control over what developers see and when.
Private snippets only appear for authenticated users, making it perfect for things like beta features, internal documentation, or partner-specific content.
The publish/unpublish toggle enables proactive content management. Pre-stage a maintenance banner across all pages but keep it unpublished. When downtime hits, one click publishes the alert portal-wide. No scrambling to update individual pages during an incident.
Nested composition: Snippets can include other Snippets and any MDC components. Build complex layouts by composing smaller, focused Snippets together.
The beauty is maintenance at scale. Update a Snippet once, and every page using it updates automatically. No more hunting through dozens of pages to change that support email or update your onboarding flow. This is how you build a portal that scales with your API program.
Portal Editor: Real-time customization
Gone are the days of edit-save-refresh-evaluate-repeat. Our Portal Editor provides a side-by-side experience where you write MDC on the left and see live updates on the right. It's like having a design tool and CMS rolled into one.
The editor understands MDC syntax, providing autocomplete for components and their properties. Made a mistake? The preview shows exactly what went wrong. Want to test mobile views? Switch viewport sizes instantly.