improvement(docs): overhaul docs (#1680)

* improvement(docs): overhaul docs

* lint

* light mode

* more light mode

* added llms.txt and llms-full.txt and sitemap

* fixed mobile styling and position for zoom in out

* finished styling

* improvement(docs): overhaul docs

* lint

* remove dups

* renaming components

* cleanup
This commit is contained in:
Waleed
2025-10-17 22:29:55 -07:00
committed by GitHub
parent 90c34b2c46
commit d1c08daaf4
35 changed files with 1268 additions and 599 deletions
+23 -7
View File
@@ -8,15 +8,31 @@ import type { source } from '@/lib/source'
const processor = remark().use(remarkMdx).use(remarkInclude).use(remarkGfm)
export async function getLLMText(page: InferPageType<typeof source>) {
const processed = await processor.process({
path: page.data._file.absolutePath,
value: page.data.content,
})
// Skip pages without proper file data
if (!page?.data?._file?.absolutePath || !page?.data?.content) {
return `# ${page.data.title || 'Untitled'}
URL: ${page.url || 'Unknown'}
return `# ${page.data.title}
URL: ${page.url}
${page.data.description || 'No description available'}`
}
${page.data.description}
try {
const processed = await processor.process({
path: page.data._file.absolutePath,
value: page.data.content,
})
return `# ${page.data.title || 'Untitled'}
URL: ${page.url || 'Unknown'}
${page.data.description || ''}
${processed.value}`
} catch (error) {
console.error(`Error processing page ${page.url}:`, error)
return `# ${page.data.title || 'Untitled'}
URL: ${page.url || 'Unknown'}
${page.data.description || 'No description available'}`
}
}