Astro
The Skeleton documentation uses Astro. View the following integrations in astro.config.mjs
:
- Tailwind
- React
- Svelte
- MDX Markdown
- Prettier
- Expressive Code
- Astro-Icon
- Astro-Auto-Import
- Nanostores | Persistent
App Structure
Navigate the app structure within the /src
directory. This includes the following directories:
Path | Description |
---|---|
/components | Contains all doc site components. |
/content | Content collections for MDX page content. |
/examples | Documentation page code block examples. |
/icons | Contains doc site custom SVG icons. |
/layouts | The Astro page layouts. |
/pages | The Astro page route templates. |
/styles | All doc site stylesheets. |
Adding MDX Pages
- Browse to
/content
and create a new.mdx
file within the appropriate content collection. - Be sure to complete all required Frontmatter metadata within the
---
brackets. - The page will be automatically added to the sidebar navigation.
MDX Markdown
View the Astro MDX Documention or see /content/resources/_markdown.md
for “kitchen sink” examples. Custom MDX components are provided in /src/components/mdx
. To enable these, add the following export to every MDX file.
Global Components
A selection of globally accessible uitlity components provided to MDX contents via astro-auto-importer
.
IMPORTANT: These are globally registered and should not be imported within MDX pages.
See
astro.config.mjs
>AutoImport()
for details.
Essential Code
Code Blocks are provided via Expressive Code. Implement via Markdown fences or the full component.
Previewer
Allows you to quickly toggle between a rendered component and the source code.
Tables
Use Markdown tables or the available Table component (/src/components/docs/Table.astro
). The Table component will auto-generate headings based on the key names in the first object row.
TIP: Optionally add the
tonal
orkbd
props to highlight content in the first column.
Icons
Icons are provided via Astro-Icon and Iconify. This includes the following sets.
Linting
See the Astro Prettier documentation for usage details.