Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot redefine property: Cite #36

Open
adnjoo opened this issue Dec 6, 2023 · 1 comment
Open

Cannot redefine property: Cite #36

adnjoo opened this issue Dec 6, 2023 · 1 comment

Comments

@adnjoo
Copy link

adnjoo commented Dec 6, 2023

Hi I tried using rehype-citation (to help format some markdown files) in a Next.js 13.5.4 application like this:

rehype-citation version 0.2.0

import rehypeCitation from 'rehype-citation';
...
options.rehypePlugins = [
        ...(options.rehypePlugins ?? []),
        rehypeSlug,
        rehypeAutolinkHeadings,
        rehypeKatex,
        [rehypeCitation, { path: path.join(root, 'data') }],
        [rehypePrismPlus, { ignoreMissing: true }],
        rehypePresetMinify,
      ];
return options;

and get this error: Cannot redefine property: Cite

Screenshot 2023-12-05 at 7 12 12 PM

@timlrx
Copy link
Owner

timlrx commented Jan 8, 2024

It should work and a demo example is available in the repo or at my blog template. Which framework are you using to process the markdown content? If you are using mdx-bundler or contentlayer, you will need to use v1 of the plugin as the underlying dependencies have not yet been updated to the latest unified js versions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants