Skip to content
Discussion options

You must be logged in to vote

Hey! I think currently in this case it’s easier to use Astro’s glob() loader directly instead of the Starlight one:

// src/content.config.ts
import { defineCollection } from 'astro:content';
- import { docsLoader } from '@astrojs/starlight/loaders';
+ import { glob } from 'astro/loaders';
import { docsSchema } from '@astrojs/starlight/schema';

export const collections = {
  docs: defineCollection({
-   loader: docsLoader(),
+   loader: glob({ pattern: "**/[^_]*.{typ,md,mdx}", base: "./src/content/docs" }),
    schema: docsSchema()
  }),
};

Would be nice to make this more automatic in the future, but not sure we have the APIs from Astro to do so currently.

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@ZnPdCo
Comment options

@delucis
Comment options

Answer selected by ZnPdCo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants