Skip to content

Conversation

@Schousboe
Copy link

Just a little practical update

If you want Astro to bundle, process and optimize your CSS, you can not have a CSS file in /public. It it also recommended not to import it with <link> tag's. Instead you should move it to src/styles and import it in the frontmatter, so Astro automatically does these services for you. So i did that

This is also to follow normal Astro standards as this will work in any type of Javascript including React.

Here is the Astro documentation about this topic for instance:

Import a local stylesheet
Load a static stylesheet via link tags

If you want Astro to bundle, process and optimize your CSS, you can *not* have a CSS file in `/public`.
It it also recommended *not* to import it with `<link>` tag's.
Instead you should move it to `src/styles` and import it in the frontmatter, so Astro automatically does these services for you.

This is also to follow normal Astro standards as this will work in any type of Javascript including React.

Here is the Astro documentation about this topic for instance:
**[Import a local stylesheet(https://docs.astro.build/en/guides/styling/#import-a-local-stylesheet)**
**[Load a static stylesheet via link tags](https://docs.astro.build/en/guides/styling/#load-a-static-stylesheet-via-link-tags)**
@vercel
Copy link

vercel bot commented Jan 28, 2026

@Schousboe is attempting to deploy a commit to the Personal Projects Team on Vercel.

A member of the Team first needs to authorize it.

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.

1 participant