HiDeoo / starlight-blog

Starlight plugin to add a blog to your documentation
https://starlight-blog-docs.vercel.app
MIT License
159 stars 21 forks source link

chore: show incompatibilty with astro 4 #18

Closed levino closed 11 months ago

levino commented 11 months ago

This PR shows that the starlight-blog plugin for starlight is incompatible with starlight@0.15 and astro@4.

vercel[bot] commented 11 months ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
starlight-blog-example ❌ Failed (Inspect) Dec 10, 2023 2:48pm
levino commented 11 months ago

I do not know why the github actions do not run, but they will fail.

I tried to fix the issues myself, but I failed at least for today. I am also a bit confused by how this plugin is actually integrated into the astro project. It looks like it somehow bypasses the plugins section of the starlight configuration and registers as an integration instead, which seems weird to me but maybe that is necessary for the routing? Or maybe the recommended way to hook up the plugins to starlight has changed. Maybe in order to fix it, one has to adapt to the new way.

What I have seen from my investigation is that https://github.com/HiDeoo/starlight-blog/blob/0b2034998a6af3d78065d9a5f83151d56e32a873/packages/starlight-blog/libs/page.ts#L27-L54 misses a key "labels" with translations for the menu entries etc. I dunno where to get these translations from.

HiDeoo commented 11 months ago

Thanks for your report.

I do not know why the github actions do not run, but they will fail.

Workflows from forks need to be approved to run.

It looks like it somehow bypasses the plugins section of the starlight configuration and registers as an integration instead, which seems weird to me but maybe that is necessary for the routing?

This integration predates the plugin API introduced in Starlight v0.14.0 which also at the same time prevents any integration or plugins to add custom pages. I've opened a PR in Starlight to attempt to fix the issue.

The next version will be refactored to a Starlight plugin once the above issue is fixed in Starlight.

As the PR I think has only been created for repro purposes, I'll close it and we will keep the issue #19 instead.