Github Page deployment issue

Viewed 36

I recently completed my first project that integrates html, css, and javascript. When I deployed the website to github pages, the site generated looks like the html file is not communicating with the css and js files.

When I run the index.html file on my local machine, it works just fine on the mozilla and safari browsers. Can anyone help me understand why this is happening?

Here is a link to the github repository My Github Repository

Here is what the site is supposed to look like

Thank you

1 Answers

Looking at your repository the files are in the same directory as the index.html, so:

instead of <script src="./javaScript/script.js"></script>

import like this:<script src="/script.js"></script>

Doing /script.js is the same as https://xavier-julian-rodriguez.github.io/OrlandoDateGenerator/script.js

To check if you are importing correctly try to access the file from the url: https://xavier-julian-rodriguez.github.io/OrlandoDateGenerator/script.js

Related