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

Replace Contentlayer #127

Open
capsloq opened this issue Mar 3, 2024 · 0 comments
Open

Replace Contentlayer #127

capsloq opened this issue Mar 3, 2024 · 0 comments

Comments

@capsloq
Copy link
Contributor

capsloq commented Mar 3, 2024

This is more of on suggestion rather than an issue.

I was recently looking for a replacement for Contentlayer.
I love Contentlayer but it's not maintained anymore. The sponsor pulled the funding and it's future is uncertain.
I needed something that is working with Nextjs 14 and a larger amount of MDX Files (~5k). My main issue was running out of memory. I am suspecting a memory leak within Contentlayer when used within a Nextjs 14 project.

Originally i used skateshop to jumpstart the project so i have a similar use of technologies / packages in my project.
Anyways, for the switch i did some research and decided on https://github.com/zce/velite.

Velite is very very similar to Contentlayer. The author even says he took Contentlayer as heavy inspiration and just started Velite because Contentlayer is no longer maintained. So if you know Contentlayer you will be quick to pick up Velite.

I refactored my Nextjs14 project containing 4.800 MDX Files from Contentlayer to Velite and that resolved a lot of typing issues as well as running out of memory. I was also able to turn Partial Prerendering back on. That is/was an issue within this project (skateshop) at the time.

Unfortunately, i can't share my project since it's closed source. However the refactoring was done within a day since the libraries are so similar.

Not associated with Velite just wanted to share.
There might be other great MDX Libs e.g. https://github.com/souporserious/mdxts
The main issue is Contentlayer not being maintained anymore.

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

1 participant