Ability to specify content directory name
It would be nice to be able to specify an arbitrary path to act as the content directory, e.g. have some .md files stored in /Prose/ and treat this directory the same way content/ is currently.
if you want to submit PR you need to introduce new nextra option e.g. contentDirName and replace this line
https://github.com/shuding/nextra/blob/c6912e2d2bbbed0684e7cc14517524112fafbfca/packages/nextra/src/server/index.ts#L40
with
-function getContentDirectory() {
+function getContentDirectory(contentDirName = 'content') {
// Next.js gives priority to `app` over `src/app`, we do the same for `content` directory
- const [contentDir = 'content'] = fg.sync(['{src/,}content'], {
+ const [contentDir = contentDirName] = fg.sync([`{src/,}${contentDirName}`], {
@dimaMachina happy to work on this, although I can't work out what your using to make types.generated.ts from the zod schemata?
You need to run tests and it will be generated https://github.com/shuding/nextra/blob/c6912e2d2bbbed0684e7cc14517524112fafbfca/packages/nextra/package.json#L69