feat: hide blog posts
This commit is contained in:
parent
94ca2a8a2a
commit
c891a924cd
6 changed files with 49 additions and 6 deletions
|
|
@ -10,10 +10,12 @@ export async function GET() {
|
|||
|
||||
resolved.forEach(({ metadata }, index) => {
|
||||
const path = Object.keys(modules)[index].replace('.svx', '');
|
||||
posts.push({ ...metadata, href: `blog/${path}` });
|
||||
if (!metadata.hidden) posts.push({ ...metadata, href: `blog/${path}` });
|
||||
});
|
||||
|
||||
posts.sort((a, b) => new Date(b.date).valueOf() - new Date(a.date).valueOf());
|
||||
|
||||
return {
|
||||
body: { posts }
|
||||
body: { posts },
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue