EN

@core / kit-blog

1.0.1 ▾
verifiedMIT
GitHub

Blog kit for Next.js: posts with authors, categories, tags, series, feeds, moderated comments and newsletter

Code32 filesContext~883 tokensscan passed

The exact tree that will be injected, after .genpmignore. Pinned to

src/app/(blog)/_components/post-card.tsxread-only · fa952a4
import type { PostSummary } from '@/lib/blog';
import { formatDate, postPath } from '../_lib/paths';

export function PostCard({ post, level = 2 }: { post: PostSummary; level?: number }) {
  const H = `h${Math.min(Math.max(level, 2), 6)}` as 'h2';
  return (
    <article className="blk-card blog-card">
      <H>
        <a href={postPath(post)}>{post.title}</a>
      </H>
      <p className="blog-meta">
        {post.publishedAt && <time dateTime={post.publishedAt.toISOString()}>{formatDate(post.publishedAt)}</time>} · {post.readingMinutes} min read
        {post.membersOnly && ' · Members only'}
      </p>
      <p>{post.excerpt}</p>
    </article>
  );
}

Report @core/kit-blog

Sign in with GitHub to report a package.