Skip to content

Commit

Permalink
add published attribute to frontmatter and filter based on it
Browse files Browse the repository at this point in the history
  • Loading branch information
tsar-boomba committed May 1, 2024
1 parent e472fdc commit 2117ebf
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/pages/posts/index.astro
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const posts = await Astro.glob<PostFrontmatter>('./**/*.mdx');
>{
posts.length > 1 ? (
posts
.filter(({ frontmatter }) => frontmatter.title !== 'Example')
.filter(({ frontmatter }) => frontmatter.published)
.map((post) => (
<Card
as='a'
Expand Down
1 change: 1 addition & 0 deletions src/pages/posts/spotify-me.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ publishDate: 25 March 2024
tags:
- Rust
editDate: ""
published: true
---
## Background
I've recently felt like procrastinating on my schoolwork. That means its time to update my portfolio. This is the first time I'm updating it since probably October 2023 when I was applying to summer 2024 internships. This time I wanted to go above and beyond, so I decided to add Spotify integration to my site.
Expand Down
1 change: 1 addition & 0 deletions src/utils/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ export type PostFrontmatter = {
publishDate: string;
tags: string[];
editDate?: string;
published?: true;
};

export type PrimaryShades =
Expand Down

0 comments on commit 2117ebf

Please sign in to comment.