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

chore: show incompatibilty with astro 4 #18

Closed
wants to merge 1 commit into from
Closed

Conversation

levino
Copy link

@levino levino commented Dec 10, 2023

This PR shows that the starlight-blog plugin for starlight is incompatible with [email protected] and astro@4.

Copy link

vercel bot commented Dec 10, 2023

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
Copy link
Author

levino commented Dec 10, 2023

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

return {
...entryMeta,
editUrl: undefined,
entry: {
data: {
head: [],
pagefind: false,
title,
},
slug,
},
entryMeta,
hasSidebar: true,
headings: [],
id: slug,
lastUpdated: undefined,
pagination: {
next: undefined,
prev: undefined,
},
sidebar: [],
slug,
toc: {
items: [],
maxHeadingLevel: 0,
minHeadingLevel: 0,
},
}
misses a key "labels" with translations for the menu entries etc. I dunno where to get these translations from.

@HiDeoo
Copy link
Owner

HiDeoo commented Dec 10, 2023

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.

@HiDeoo HiDeoo closed this Dec 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants