Skip to main content

Documentation Template Sample

A sample documentation layout showing all available components and styles.

Vanes
May 16, 2024
docstemplateguide

Introduction

This is a sample documentation page demonstrating the Tutorial template features. You can use this format to document your projects, APIs, or design system components.

This is an information block. Useful for notes and general context.

Features

Our markdown documentation supports several custom blocks and standard markdown features:

1. Warning Blocks

Be careful when modifying the astro.config.mjs file as it can break your build!

2. Danger Blocks

Never commit your .env files to public repositories.

Code Examples

We use Shiki for syntax highlighting. Here is a TypeScript example:

interface ComponentProps {
  title: string;
  isActive: boolean;
  onToggle: () => void;
}

export function MyComponent({ title, isActive, onToggle }: ComponentProps) {
  return (
    <div className={`p-4 border-2 ${isActive ? 'border-black' : 'border-gray-300'}`}>
      <h2>{title}</h2>
      <button onClick={onToggle}>Toggle State</button>
    </div>
  );
}

Typography & Elements

You can use standard markdown elements like:

“Design is not just what it looks like and feels like. Design is how it works.” — Steve Jobs

Tables

ComponentStatusDescription
Button✅ ReadyCore interactive element
Card✅ ReadyContainer for content
Modal🚧 WIPOverlay dialog

This concludes the documentation sample.