Skip to content

Commit bffa4b3

Browse files
committed
add a now page
1 parent 87915e3 commit bffa4b3

File tree

5 files changed

+67
-1
lines changed

5 files changed

+67
-1
lines changed

src/content.config.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,13 @@ const blog = defineCollection({
1717
tags: z.array(z.string()),
1818
}),
1919
});
20+
21+
const now = defineCollection({
22+
loader: glob({ pattern: "**/[^_]*.md", base: "./src/now" }),
23+
schema: z.object({
24+
updatedDate: z.date(),
25+
}),
26+
});
27+
2028
// Export a single `collections` object to register your collection(s)
21-
export const collections = { blog };
29+
export const collections = { blog, now };

src/layouts/Navigation.astro

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import NavigationLink from "./NavigationLink.astro"
1010
<section>
1111
<NavigationLink match="/posts" href="/blog" target="_self">Blog</NavigationLink>
1212
<NavigationLink href="/tags" target="_self">Tags</NavigationLink>
13+
<NavigationLink href="/now" target="_self">Now</NavigationLink>
1314
</section>
1415
</nav>
1516
</header>

src/layouts/NowLayout.astro

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
---
2+
import Layout from './Layout.astro';
3+
4+
const { frontmatter } = Astro.props;
5+
---
6+
7+
<base target="_blank" />
8+
9+
<Layout pageTitle="UmYeah's /now">
10+
<h2>/now</h2>
11+
<p style="font-size: 16px;">Last updated: {frontmatter.updatedDate.toLocaleDateString()}</p>
12+
<hr />
13+
<section>
14+
<slot />
15+
</section>
16+
</Layout>
17+
18+
<style>
19+
section {
20+
text-align: left;
21+
}
22+
</style>

src/now/index.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
---
2+
updatedDate: 2025-08-31
3+
---
4+
5+
### Currently Working On
6+
7+
- [AitH](https://aith.umyeah.dev) - a vibe coded app to help keep track of thing that should Always (be) in the House
8+
- [Fwoop](https://fwoop.umyeah.dev) - another vibe coded app for tracking my food, weight, and poop activity
9+
- Spending my working hours as a Principal Engineer at [Dataminr](https://www.dataminr.com)
10+
11+
### Reading
12+
13+
- John Steinbeck's [*The Winter of Our Discontent*](https://www.goodreads.com/book/show/4796.The_Winter_of_Our_Discontent)
14+
- [The Meaning of Life: Perspectives from the World's Great Intellectual Traditions](https://www.audible.com/pd/The-Meaning-of-Life-Perspectives-from-the-Worlds-Great-Intellectual-Traditions-Audiobook/B00DJBVRMM) (audiobook)
15+
16+
### Listening To & Watching
17+
18+
- See my [Best of 2025](/posts/best-of-2025) for current favorites
19+
20+
---
21+
22+
*This page is inspired by Derek Sivers' [now page movement](https://nownownow.com/about).*

src/pages/now.astro

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
---
2+
import { getEntry, render } from 'astro:content';
3+
import NowLayout from '../layouts/NowLayout.astro';
4+
5+
const entry = await getEntry('now', 'index');
6+
if (!entry) throw new Error('Now page not found');
7+
8+
const { Content } = await render(entry);
9+
---
10+
11+
<NowLayout frontmatter={entry.data}>
12+
<Content />
13+
</NowLayout>

0 commit comments

Comments
 (0)