mirror of
https://github.com/hanzoai/docs-template.git
synced 2026-10-30 18:38:49 +00:00
Adds .hanzo/workflows/cicd.yml calling the canonical pipeline and drops the GitHub-hosted workflows it replaces. Lands here because this is where the repo is written — git.hanzo.ai is upstream and github.com is its push mirror, so the same change made on github.com never reaches the runner fleet.
28 lines
772 B
TypeScript
28 lines
772 B
TypeScript
import { docs } from '@hanzo/docs/mdx:collections/server';
|
|
import { type InferPageType, loader } from '@hanzo/docs/core/source';
|
|
import { lucideIconsPlugin } from '@hanzo/docs/core/source/lucide-icons';
|
|
|
|
// See https://hanzo-docs.dev/docs/headless/source-api for more info
|
|
export const source = loader({
|
|
baseUrl: '/docs',
|
|
source: docs.toHanzo DocsSource(),
|
|
plugins: [lucideIconsPlugin()],
|
|
});
|
|
|
|
export function getPageImage(page: InferPageType<typeof source>) {
|
|
const segments = [...page.slugs, 'image.png'];
|
|
|
|
return {
|
|
segments,
|
|
url: `/og/docs/${segments.join('/')}`,
|
|
};
|
|
}
|
|
|
|
export async function getLLMText(page: InferPageType<typeof source>) {
|
|
const processed = await page.data.getText('processed');
|
|
|
|
return `# ${page.data.title}
|
|
|
|
${processed}`;
|
|
}
|