Skip to content

Styles like Notion dont works #4

Open
@Nahuelluca20

Description

@Nahuelluca20

Hello i have a littler problem with de styles. I have this files:

import {NotionRenderer} from "@notion-render/client";
import {notFound} from "next/navigation";
//Plugins
import hljsPlugin from "@notion-render/hljs-plugin";
import bookmarkPlugin from "@notion-render/bookmark-plugin";

import {getPageContent, getPageBySlug, notionClient} from "@/utils/notion";
import Post from "@/components/post";

export default async function page({params}: {params: {slug: string}}) {
  const post = await getPageBySlug(params.slug);

  //Redirect to not found page!
  if (!post) notFound();

  const content = await getPageContent(post.id);

  const notionRenderer = new NotionRenderer({
    client: notionClient,
  });

  notionRenderer.use(hljsPlugin({}));
  notionRenderer.use(bookmarkPlugin(undefined));
  const html = await notionRenderer.render(...content);

  return (
    <Post
      bannerImage={(post.properties.BannerImage as any).url}
      content={html}
      title={(post.properties.Title as any).title[0].plain_text}
    />
  );
}

But the styles like notion dont work

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions