Home
Support Forums

CSS and JS not rendering

Hello all, I recently attempted deleting my site from a GitHub repo and everything was going well until I previewed the deploy and noticed that the css and JS weren’t rendering.

Here’s my GitHub repo: GitHub - severicus/portfolio

And my site: https://aa-prtf.netlify.app/

Hi @severicus

Welcome to the forums.

The paths for the CSS and JS are incorrect.

For the CSS

<link rel="stylesheet" href="../dist/css/main.css">

The dist directory is that deployed. In this instance the correct href is

<link rel="stylesheet" href="/css/main.css">

For the JS the sample applies as per CSS

<script src="/dist/js/typewriter.js"></script>

you need to remove /dist from the src, so

<script src="/js/typewriter.js"></script>

This applies to the to <img ...> in the header for the logo too.

These changes need applying to all pages in the site, not just the index.

1 Like