From 194733bc09f1233d4a2e388ef0ba62058db7bf5a Mon Sep 17 00:00:00 2001 From: RavelloH Date: Mon, 28 Oct 2024 20:15:13 +0800 Subject: [PATCH] Rollback. --- src/app/manage/posts/draft/[slug]/page.jsx | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/src/app/manage/posts/draft/[slug]/page.jsx b/src/app/manage/posts/draft/[slug]/page.jsx index ea4c28e..96892ca 100644 --- a/src/app/manage/posts/draft/[slug]/page.jsx +++ b/src/app/manage/posts/draft/[slug]/page.jsx @@ -1,8 +1,6 @@ import prisma from '@/app/api/_utils/prisma'; import config from '@/../config'; import { MDXRemote } from 'next-mdx-remote/rsc'; -import { getHighlighter } from 'shiki'; -import remarkShikiTwoslash from 'remark-shiki-twoslash'; import Comment from '@/components/Comment'; import PostSuggestion from '@/components/PostSuggeston'; import Link from 'next/link'; @@ -10,7 +8,6 @@ import formatDateWithTimeZone from '@/utils/time'; import { cookies } from 'next/headers'; import NotFound from '@/app/not-found'; import tokenServer from '@/app/api/_utils/token'; - let title; function createCategory(arr) { @@ -21,7 +18,7 @@ function createCategory(arr) { } return element; }); - return {joinedElements}; + return {joinedElements}; } function createTag(arr) { @@ -83,10 +80,6 @@ export default async function DraftContent(params) { title = post.title; - // 使用 Shiki 高亮代码 - const highlighter = await getHighlighter({ theme: 'nord' }); - const highlightedContent = await highlighter.codeToHtml(post.content, { lang: 'markdown' }); - return (
@@ -101,13 +94,14 @@ export default async function DraftContent(params) { {createCategory(post.category)} {' • '} {' '} {post.content.length}字 + {/* {' • '} --- */}

{createTag(post.tag)}
- +