Skip to content

astro-expressive-code emits style links inside code block when emitExternalStylesheet is set to true #452

Description

@Legend-Master

What version of Expressive Code are you using?

0.44.0

What tools are you using Expressive Code with?

Starlight

What package manager are you using?

pnpm

What operating system are you using?

Windows

What browser are you using?

Chrome

Describe the Bug

This is causing some render blocking issues, that contents are partially shown and then followed by a layout shift, see the home page of https://tauri.app/, set a higher network delay in the dev tools to see it easier.

video.mp4

(the header flashing seems to be video encoding artifacts, sorry please ignore)

I would expect to see the style link to be emitted to the <head> instead of alone side with the code blocks. This also applies to the script tags.

Participation

  • I am willing to submit a pull request for this issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions