timlrx / tailwind-nextjs-starter-blog

This is a Next.js, Tailwind CSS blogging starter template. Comes out of the box configured with the latest technologies to make technical writing a breeze. Easily configurable and customizable. Perfect as a replacement to existing Jekyll and Hugo individual blogs.
https://tailwind-nextjs-starter-blog.vercel.app/
MIT License
8.56k stars 1.98k forks source link

Citation (rehype-citation) does not work #755

Closed dariusz-wozniak closed 10 months ago

dariusz-wozniak commented 10 months ago

Describe the bug

I have added the following text to the .mdx file: Check citations.[@Nash1950]

The .bib file remains untouched and it contains Nash1950:

@article{Nash1950,
  title={Equilibrium points in n-person games},
  author={Nash, John},
  journal={Proceedings of the national academy of sciences},
  volume={36},
  number={1},
  pages={48--49},
  year={1950},
  publisher={USA}
}

Citation does not work. Rendered markdown does not recognize it:

image

To Reproduce

Expected behavior

Citation should work.

System Info (if dev / build issue):

Browser Info (if display / formatting issue):

Any

Additional context

No

timlrx commented 10 months ago

You will need to add the location of the bib file to the frontmatter i.e. bibliography: references-data.bib like https://github.com/timlrx/tailwind-nextjs-starter-blog/blob/12b4ed236fd75d59f2941b651d83d180f611c92e/data/blog/new-features-in-v1.mdx#L9C1-L9C34.

Or if you prefer to use one BibTex file for all posts, you can also add it to the options in the plugin.

dariusz-wozniak commented 10 months ago

@timlrx : works like a charm, thank you!