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

[v3] Github repository source is copied in .data but not present in database #2841

Open
arkhaiel opened this issue Nov 11, 2024 · 1 comment
Labels
question Further information is requested v3

Comments

@arkhaiel
Copy link
Contributor

Environment

Version

3.0.0-alpha.6

Reproduction

export const collections = {
  content: defineCollection({
    type: 'page',
    source: '**/*.md',
  }),
  test: defineCollection({
    type: 'page',
    source: {
      repository: 'https://github.com/arkhaiel/nsi-md',
      path: '/',
    },
  }),
}

Description

The .data/content folder contains the content of the github repo I provided, but the sqlite database doesn't. The database contains the MD file I put in the local content directory.
I don't know if it's a normal behaviour since it's an alpha module or if it's a bug, but here's my report !

Fresh empty nuxt3 project + @nuxt/content@next module, nothing more.

Image

Additional context

No response

Logs

@arkhaiel arkhaiel added the bug Something isn't working label Nov 11, 2024
@farnabaz farnabaz added the v3 label Nov 20, 2024
@farnabaz
Copy link
Member

farnabaz commented Nov 20, 2024

The path in the source is a glob pattern which matches the content files.
If your repository contains markdown in root directory, you can try using:

test: defineCollection({
    type: 'page',
    source: {
      repository: 'https://github.com/arkhaiel/nsi-md',
      path: '**',
    },
}),

As you already faced it, path is a misleading name for pattern, that's why we renamed it to include. The rename will release in next version

@farnabaz farnabaz added question Further information is requested and removed bug Something isn't working labels Nov 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested v3
Projects
None yet
Development

No branches or pull requests

2 participants