fuma-nama/fumadocs

Loader doesn't consider rootDir (Issue while using `src` folder)

Closed this issue · 2 comments

To Reproduce

  1. quick start setup converted to use src folder

Current vs. Expected behavior

I updated the fumadocs packages to use the latest version

    "fumadocs-core": "^13.4.5",
    "fumadocs-mdx": "^10.0.1",
    "fumadocs-ui": "^13.4.5",

and source.ts file loader to use the rootDir: 'src/content/docs' all the mdx files data is available in the .source/index.js file but the data is not returned via getPages(), getPage()

Provide environment information

Operating System:
  Platform: win32
  Arch: x64
  Version: Windows 11 Home Single Language
  Available memory (MB): 15792
  Available CPU cores: 12
Binaries:
  Node: 22.7.0
  npm: N/A
  Yarn: N/A
  pnpm: N/A
Relevant Packages:
  next: 14.2.7 // Latest available version is detected (14.2.7).
  eslint-config-next: N/A
  react: 18.3.1
  react-dom: 18.3.1
  typescript: 5.5.4
Next.js Config:
  output: N/A

Which area(s) are affected? (Select all that apply)

Content Sources (e.g. Fumadocs MDX, Content Collections)

Additional context

No response

Source API isn't related to this, it's a build time stuff.

Set the directory path from source.config.ts instead.

The source file should be generated in the root directory and you may configure path alias on tsconfig to import them using an alias.

I have updated the relevant docs for source API, hope it clarifies that