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

Stylesheet is duplicated on the Index page #4757

Closed
1 task
phenomen opened this issue Sep 14, 2022 · 3 comments · Fixed by #4892
Closed
1 task

Stylesheet is duplicated on the Index page #4757

phenomen opened this issue Sep 14, 2022 · 3 comments · Fixed by #4892
Assignees
Labels
- P4: important Violate documented behavior or significantly impacts performance (priority)

Comments

@phenomen
Copy link

What version of astro are you using?

1.2.3

Are you using an SSR adapter? If so, which one?

None

What package manager are you using?

npm

What operating system are you using?

Windows, Linux

Describe the Bug

After build, stylesheet is placed in the head and in the middle of the body.

image

On Stackblitz it's reproducible on the index page (/) with

npm build
npm preview

Link to Minimal Reproducible Example

https://stackblitz.com/edit/github-xkmtka?file=src/pages/index.mdx

Participation

  • I am willing to submit a pull request for this issue.
@matthewp matthewp added the - P4: important Violate documented behavior or significantly impacts performance (priority) label Sep 14, 2022
@matthewp matthewp self-assigned this Sep 23, 2022
@rishi-raj-jain
Copy link
Contributor

This seems like a bigger issue. I was trying this and found that the output generated doesn't even have a html, body and head tags unless inserted in layouts or pages. Shouldn't we be creating those if not found?

@matthewp
Copy link
Contributor

We don't create them, but we still should be injected the stylesheets. I assume this is something to do with how MDX works, i'll take a look.

@matthewp
Copy link
Contributor

This was a fun one, cc @rishi-raj-jain see #4892

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
- P4: important Violate documented behavior or significantly impacts performance (priority)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants