import fs from 'fs' import path from 'path' export default defineEventHandler(async (event) => { const { file } = event.context.params const docsDir = path.resolve(process.cwd(), 'content/documentation') const filePath = path.join(docsDir, file) if (!file.endsWith('.md') || !fs.existsSync(filePath)) { return { error: 'File not found' } } const content = fs.readFileSync(filePath, 'utf-8') return { content } })