feat: update content

This commit is contained in:
ryanchristo 2026-11-15 20:31:14 -08:00
parent 5a98111911
commit 6bb8c947a3
No known key found for this signature in database
44 changed files with 696 additions and 268 deletions

View file

@ -1,26 +0,0 @@
import fs from 'fs'
import path from 'path'
import matter from 'gray-matter'
const docsDirectory = path.join(process.cwd(), 'research/docs')
export const getDocs = () => {
const fileNames = fs.readdirSync(docsDirectory)
return fileNames.map((fileName) => {
// set id and full path
const id = fileName.replace(/\.md$/, '')
const fullPath = path.join(docsDirectory, fileName)
// read file contents
const fileContents = fs.readFileSync(fullPath, 'utf8')
// parse file contents
const { data } = matter(fileContents)
// return id and data
return {
id,
...data,
}
}) as any[]
}