Guides
Step-by-step guides for common tasks
1 min read
Guides
Step-by-step guides to help you get the most out of Hermes.
Creating a New Page
- Create a new
.mdxfile insrc/content/docs/ - Add frontmatter with metadata:
---
title: My New Page
description: Page description
order: 5
---
- Write your content using Markdown or MDX
- The page will automatically appear in the navigation
Customizing the Theme
Edit tailwind.config.mjs to customize colors:
theme: {
extend: {
colors: {
primary: {
// Your color palette
}
}
}
}
Adding Search
Search is enabled by default. To use Algolia:
-
Set environment variables:
PUBLIC_ALGOLIA_APP_IDPUBLIC_ALGOLIA_API_KEYPUBLIC_ALGOLIA_INDEX_NAME
-
Update
src/config.tswith your Algolia credentials
Versioning
To add versioning:
- Add version to page frontmatter:
---
version: 'v2'
---
-
Update versions in
src/config.ts -
Use the version switcher in the sidebar
Custom Components
Create custom MDX components in src/components/mdx/:
---
interface Props {
// Your props
}
---
<div class="my-component">
<slot />
</div>
Then use them in your MDX files:
import MyComponent from '@components/mdx/MyComponent.astro';
<MyComponent>
Content here
</MyComponent>