starlight-blog
starlight-blog copied to clipboard
Blog doesn't work with custom loaders
Describe the bug
I've replaced the Starlight docsLoader with my own loader so that I can put content in a different directory than src/content/docs. It looks like getBlogEntries hardcodes the src/content/docs path, so my custom loader breaks the plugin entirely.
To Reproduce
- Create a Starlight with blog
- Add a blog post
- Move the content of src/content/docs (which includes the blog/ folder) to a different folder.
- Create a content collection called
docsthat loads from that different folder.
Expected behavior
Blog files should be picked up.
How often does this bug happen?
Every time
System Info
No response
Additional Context
No response
Thanks for the feedback :raised_hands:
Small question: is the custom loader only used to have content located in a different directory? Is such loader available publicly to take a look at the implementation?
As this is not a natively supported feature of the Starlight docs loader for the time being (due to an Astro limitation), most plugins do the same at the moment until the limitation is lifted and Starlight supports custom directories natively in its docs loader.