diff --git a/_components/PostListItem.tsx b/_components/PostListItem.tsx
new file mode 100644
index 0000000..115adf2
--- /dev/null
+++ b/_components/PostListItem.tsx
@@ -0,0 +1,16 @@
+interface Props {
+ post: any;
+}
+
+export default function(props: Props) {
+ return (
+
+ {props.post.data.title}
+
+
+ {props.post.data.tags.map(tag => - {tag}
)}
+
+ {props.post.data.description}
+
+ );
+}
diff --git a/blog/index.tsx b/blog/index.tsx
index fd932be..04b4ae4 100644
--- a/blog/index.tsx
+++ b/blog/index.tsx
@@ -1,7 +1,9 @@
export const title = "Blog";
export const description = "Hello, stranger. Stay a while and listen.";
-export default function({ nav }) {
+export default function({ nav, comp }) {
+ const { PostListItem } = comp;
+
const sortPosts = (a,b) => {
if (a.data.date < b.data.date) {
return 1;
@@ -24,16 +26,7 @@ export default function({ nav }) {
return (
- {nav.menu("/blog/posts").children.sort(sortPosts).map(post => (
- -
- {post.data.title}
-
-
- {post.data.tags.map(tag => - {tag}
)}
-
- {post.data.description}
-
- ))}
+ {nav.menu("/blog/posts").children.sort(sortPosts).map(post => )}
);
}