Something went wrong. Try again.
[READ-ONLY] Mirror of https://github.com/flo-bit/flo-bit.github.io. my personal website, w/ astro, svelte, tailwind, typescript, threlte flo-bit.dev
Something went wrong. Try again.
1234567891011121314151617181920212223242526272829303132333435import { getCollection } from 'astro:content';
export const getFeaturedProjects = async () => { return (await getCollection("projects")) .filter((project: any) => project.data.featured) .sort((a: any, b: any) => b.data.date.valueOf() - a.data.date.valueOf());};
export const getProjects = async () => { return (await getCollection("projects")) .sort( (a: any, b: any) => b.data.date.valueOf() - a.data.date.valueOf(), );};
export const getBlogPosts = async () => { const posts = (await getCollection("blog")) .filter((post: any) => post.data.published || import.meta.env.MODE === "development") .sort( (a: any, b: any) => b.data.pubDate.valueOf() - a.data.pubDate.valueOf(), );
return posts;};
export const getVisibleBlogPosts = async () => { const posts = (await getCollection("blog")) .filter((post: any) => post.data.published && post.data.visible || import.meta.env.MODE === "development") .sort( (a: any, b: any) => b.data.pubDate.valueOf() - a.data.pubDate.valueOf(), );
return posts;};