diff --git a/app/p/[slug]/page.tsx b/app/p/[slug]/page.tsx index dcef78f..abffff8 100644 --- a/app/p/[slug]/page.tsx +++ b/app/p/[slug]/page.tsx @@ -1,3 +1,4 @@ +import '@catppuccin/highlightjs/sass/catppuccin.variables.scss'; import clsx from 'clsx'; import components from 'components/mdx/components'; import data from 'content/mdx-data'; @@ -6,11 +7,10 @@ import { SingleToc, generateToc } from 'lib/utils'; import { compileMDX } from 'next-mdx-remote/rsc'; import dynamic from 'next/dynamic'; import { notFound } from 'next/navigation'; +import rehypeHighlight from 'rehype-highlight'; import rehypeSlug from 'rehype-slug'; import remarkGfm from 'remark-gfm'; -import rehypeHighlight from 'rehype-highlight'; import { Post } from 'types'; -import '@catppuccin/highlightjs/sass/catppuccin.variables.scss'; const PostToc = dynamic(() => import('components/post/post-toc')); const PostCommnetLine = dynamic( diff --git a/components/pages/gists/gists-code.tsx b/components/pages/gists/gists-code.tsx index 321c4de..450fde5 100644 --- a/components/pages/gists/gists-code.tsx +++ b/components/pages/gists/gists-code.tsx @@ -1,14 +1,15 @@ +import '@catppuccin/highlightjs/sass/catppuccin.variables.scss'; import clsx from 'clsx'; +import CopyCode from 'components/post/copy-code'; import { createElement, Fragment, memo } from 'react'; +import rehypeHighlight from 'rehype-highlight'; import rehypeReact from 'rehype-react'; import remarkGfm from 'remark-gfm'; import remarkParse from 'remark-parse'; import remarkRehype from 'remark-rehype'; -import rehypeHighlight from 'rehype-highlight'; import { GistsFile } from 'types'; import { unified } from 'unified'; import styles from './gists-code.module.css'; -import '@catppuccin/highlightjs/sass/catppuccin.variables.scss'; interface Props { file: GistsFile; @@ -77,10 +78,16 @@ const GistsCode = ({ file, showFileName = false }: Props) => { -