mirror of
https://github.com/jordienr/zenblog.git
synced 2026-09-26 17:20:26 -04:00
wip
This commit is contained in:
@@ -4,6 +4,7 @@ import { ArrowLeftIcon } from "lucide-react";
|
||||
import Link from "next/link";
|
||||
import React from "react";
|
||||
|
||||
export const dynamic = "auto";
|
||||
const Post = async ({ params: { slug } }: { params: { slug: string } }) => {
|
||||
const blog = getBlogClient();
|
||||
const { data: post } = await blog.posts.get({ slug });
|
||||
|
||||
@@ -2,18 +2,11 @@
|
||||
import { getBlogClient } from "@/cms";
|
||||
import Link from "next/link";
|
||||
import React from "react";
|
||||
import { Tags } from "./ui/Tags";
|
||||
|
||||
type Props = {};
|
||||
|
||||
const Blog = async (props: Props) => {
|
||||
export const dynamic = "auto";
|
||||
const Blog = async () => {
|
||||
const blog = getBlogClient();
|
||||
const [{ data: posts }, { data: categories }, { data: tags }] =
|
||||
await Promise.all([
|
||||
blog.posts.list(),
|
||||
blog.categories.list(),
|
||||
blog.tags.list(),
|
||||
]);
|
||||
const { data: posts } = await blog.posts.list();
|
||||
|
||||
const latestPost = posts[0];
|
||||
const postsWithoutLatest = posts.slice(1);
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
"version": "0.1.0",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"typecheck": "tsc --noEmit",
|
||||
"build": "next build",
|
||||
"build:web": "next build",
|
||||
"dev": "next dev -p 8082",
|
||||
|
||||
Reference in New Issue
Block a user