mirror of
https://github.com/morten-olsen/morten-olsen.github.io.git
synced 2026-02-08 01:46:28 +01:00
init
This commit is contained in:
20
src/pages/resume.json.ts
Normal file
20
src/pages/resume.json.ts
Normal file
@@ -0,0 +1,20 @@
|
||||
import { getCollection } from 'astro:content';
|
||||
import { basics, skills, languages } from '../data/profile';
|
||||
|
||||
|
||||
export async function GET(context: any) {
|
||||
const work = await getCollection('work');
|
||||
const references = await getCollection('references');
|
||||
const resume = {
|
||||
...basics,
|
||||
skills,
|
||||
languages,
|
||||
work: work.map((item) => ({
|
||||
...item.data,
|
||||
})),
|
||||
references: references.map((item) => ({
|
||||
...item.data,
|
||||
})),
|
||||
}
|
||||
return new Response(JSON.stringify(resume));
|
||||
};
|
||||
Reference in New Issue
Block a user