diff --git a/src/pages/qualifications/index.astro b/src/pages/qualifications/index.astro index 7295f8b..0f0aba6 100644 --- a/src/pages/qualifications/index.astro +++ b/src/pages/qualifications/index.astro @@ -94,20 +94,19 @@ function formatShortDate(input: Date | string) { {formatShortDate(entry.data.dateEnd)}
- {entry.data.institution} + {entry.data.degree} + {entry.data.field && ` – ${entry.data.field}`}
- {entry.data.degree} - {entry.data.field && ` - ${entry.data.field}`} + {entry.data.institution + + (entry.data.location + ? `, ${entry.data.location}` + : "")}
- {(entry.data.finalGrade || entry.data.location) && ( + {entry.data.finalGrade && (
{entry.data.finalGrade && - `Grade: ${ - entry.data.finalGrade + - (entry.data.location ? ", " : "") - }`} - {entry.data.location} + `Grade: ${entry.data.finalGrade}`}
)} {entry.body && ( diff --git a/src/pages/rss.xml.ts b/src/pages/rss.xml.ts index 933d206..37f5cf1 100644 --- a/src/pages/rss.xml.ts +++ b/src/pages/rss.xml.ts @@ -7,23 +7,17 @@ type Context = { }; export async function GET(context: Context) { - const posts = (await getCollection("blog")).map((item) => ({ - item, - pre: "blog", - })); - const projects = (await getCollection("projects")).map((item) => ({ - item, - pre: "projects", - })); + const posts = await getCollection("blog"); + const projects = await getCollection("projects"); const items = [...posts, ...projects].filter( - ({ item }) => !item.data.draft, + (item) => !item.data.draft, ); items.sort( (a, b) => - new Date(b.item.data.date).getTime() - - new Date(a.item.data.date).getTime(), + new Date(b.data.date).getTime() - + new Date(a.data.date).getTime(), ); return rss({ @@ -31,7 +25,7 @@ export async function GET(context: Context) { description: SITE.DESCRIPTION, site: context.site, stylesheet: "/rss-style.xsl", - items: items.map(({ item, pre }) => ({ + items: items.map((item) => ({ title: item.data.title, description: item.data.summary, author: SITE.AUTHOR,