Questions tagged [contentlayer]
7 questions
2
votes
2 answers
Module not found: Package path ./generated is not exported from package Contentlayer nextJS
I get this error that Module "contentlayer/generated" and its corresponding type declarations are not found.
Solution please .I have installed and updated the dependencies,if someone had the same problem and how the solution

Marcial Igme
- 21
- 1
1
vote
2 answers
next js 13.3 not generating contentlayer folder after running the server
Here is my next.config.js:
const { withContentlayer } = require("next-contentlayer");
module.exports = withContentlayer({
experimental: { appDir: true },
});
Here is my tsconfig.json:
{
"compilerOptions": {
"target": "es5",
"lib":…

ibo
- 51
- 3
0
votes
0 answers
How to reuse MDX repetitive code in next.js
I'm creating a blog using MDX in NEXTJS.
It always has a reference at the end to attach that referenced page, which seems inefficient because it repeats every time.
Is there any way to reuse this code in a plugin or some other way?

pvp11
- 204
- 2
- 10
0
votes
1 answer
Error with pnpm dev: Module not found for contentlayer/generated
I am using pnpm to run the development server for my Next.js project. When I execute pnpm dev, the development server starts successfully, but I encounter an error related to contentlayer/generated module. Here's the output I'm seeing:
...
- error…
0
votes
1 answer
MDX custom components using data-attributes
Is it possible to define custom MDX components using a data-attribute of the HTML element?
I'm working on a Next.js blog using contentlayer for MDX and Rehype Pretty Code for syntax highlighting code blocks. Below is the HTML output structure from…

Gangula
- 5,193
- 4
- 30
- 59
0
votes
1 answer
onVisitHighlightedLine cannot push classname using Rehype Pretty code
I'm using Rehype Pretty code to add syntax highlighting to my MDX blog. But I'm not able to get the line highlighting to work.
As per the documentation and few other resources, below is the configuration that should work, but I'm getting the…

Gangula
- 5,193
- 4
- 30
- 59
0
votes
1 answer
How to use MDX custom elements in contentlayer
I'm building a site that makes use of Nextjs and Contentlayer to render a bunch of MDX files.
I basically followed this tutorial to get it set up, except I'm going with MDX instead of plain markdown.
I'm using Contentlayer because the standard way…

Sheena
- 15,590
- 14
- 75
- 113