@@ -1,16 +1,14 @@
1−import Head from 'next/head'
1+import Head from "next/head";
2−import Link from 'next/link'
2+import Link from "next/link";
3−import { useState } from 'react';
3+import { useState } from "react";
4−import Container from '../components/Container'
4+import Container from "../components/Container";
5−import Footer from '../components/Footer'
5+import Footer from "../components/Footer";
6−import Header from '../components/Header'
6+import Header from "../components/Header";
7−import SingleColumn from '../components/SingleColumn'
7+import SingleColumn from "../components/SingleColumn";
8−import BackgroundImage from '../components/BackgroundImage'
8+import BackgroundImage from "../components/BackgroundImage";
9−import { getAllPosts, formatDate } from '../lib/lib'
9+import { getAllPosts, formatDate } from "../lib/lib";
12−export default function BlogPost({ posts }) {
11+export default function Blog({ posts }) {
15 <Container>
13 <Container>
16 <SingleColumn>
14 <SingleColumn>
@@ -18,61 +16,71 @@ export default function BlogPost({ posts }) {
18 <section className="layout-wide pt-48">
16 <section className="layout-wide pt-48">
19 <div className="measure">
17 <div className="measure">
20 <h2 className="pb-16">Urbit Blog</h2>
18 <h2 className="pb-16">Urbit Blog</h2>
21− <p className="pb-6">Stories from the broader Urbit community, the Urbit Foundation, and the many people contributing to Urbit.</p>
20+ Stories from the broader Urbit community, the Urbit Foundation,
21+ and the many people contributing to Urbit.
22− <p>Subscribe to the Urbit Newsletter for regular updates, including new blog posts and events.</p>
24+ Subscribe to the Urbit Newsletter for regular updates, including
25+ new blog posts and events.
24 </section>
28 </section>
25 <section className="layout-wide pt-24">
29 <section className="layout-wide pt-24">
27− posts.map((post) => {
30+ {posts.map((post) => {
32+ <div key={post.slug} className="mb-24 cursor-pointer">
29 <Link href={`/blog/${post.slug}`}>
33 <Link href={`/blog/${post.slug}`}>
30− <div key={post.slug} className='pb-24 cursor-pointer'>
34+ <div>
32 // Not all blog posts have images
36 // Not all blog posts have images
33− post.extra.image
37+ post.extra.image ? (
39+ src={post.extra.image}
40+ style={{ height: "720px" }}
34− ? <BackgroundImage src={post.extra.image} style={{ height:"720px" }} className="w-full rounded-lg" />
41+ className="w-full rounded-lg"
37− <h2 className='mt-4'>{post.title}</h2>
45+ <h2 className="mt-4">{post.title}</h2>
38 <div className="flex items-baseline">
46 <div className="flex items-baseline">
39− {
47+ {post.extra.author ? (
40− post.extra.author ? <div className='type-ui text-gray mt-4'>{post.extra.author}</div> : null
48+ <div className="type-ui text-gray mt-4">
41− }
49+ {post.extra.author}
43− post.extra.author && post.extra.ship ? <div className="mx-1 text-gray">•</div> : null
52+ {post.extra.author && post.extra.ship ? (
44− }
53+ <div className="mx-1 text-gray">•</div>
46− post.extra.ship ? <div className='type-ui text-gray font-mono'>{post.extra.ship}</div> : null
56+ <div className="type-ui text-gray font-mono">
47− }
57+ {post.extra.ship}
62+ <div className="type-ui text-gray mt-2">
63+ {formatDate(new Date(post.date))}
50− <div className='type-ui text-gray mt-2'>{formatDate(new Date(post.date))}</div>
56 </section>
70 </section>
58 </SingleColumn>
71 </SingleColumn>
59− <Footer/>
72+ <Footer />
60 </Container>
73 </Container>
64export async function getStaticProps() {
77export async function getStaticProps() {
65− const posts = getAllPosts([
78+ const posts = getAllPosts(
69− 'description',
79+ ["title", "slug", "date", "description", "extra"],
74 props: { posts },
84 props: { posts },