Localhost is fine, but Github pages are just not cooperating with Bootstrap

I am currently in the process of building a portfolio website using Bootstrap 4, animate.css, typed.js and my own custom css.

When testing the site on localhost through VS Code, everything appears to be functioning correctly. However, upon viewing the site on Github pages, none of the styles or JavaScript effects are working as expected. I have double-checked all the links in the head tag and they seem to be correct, but Iā€™d appreciate another set of eyes on this issue. Please review the code snippet below for reference.

<html lang="en">
<head>
    <!-- CSS -->
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/3.7.2/animate.min.css">
    <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
    <link rel="stylesheet" href="/css/style.css">
     <link href="https://fonts.googleapis.com/css?family=Montserrat:100,200,400,700,900|Titillium:100,200,400,700,900+Web&display=swap"
        rel="stylesheet">

    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">

    <!-- JS -->
    <script src="/js/typed.js"></script>
    <title>Ryan Mottram Online Portfolio</title>
</head>

<body>

    <nav class="navbar navbar-expand-lg navbar-light sticky-top animated slideInDown">
        <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNavDropdown"
            aria-controls="navbarNavDropdown" aria-expanded="false" aria-label="Toggle navigation">
            <span class="navbar-toggler-icon"></span>
        </button>
        <div class="collapse navbar-collapse" id="navbarNavDropdown">
            <ul class="navbar-nav ml-auto">
                <li class="nav-item">
                    <a class="nav-link" href="index.html">Home<span class="sr-only">(current)</span></a>
                </li>
                <li class="nav-item">
                    <a class="nav-link" href="me.html">Ryan Mottram</a>
               
                 ... // omitted for brevity

                <li class="dropdown-item">Computer Science Project</a>
                    </div>
                </li>
            </ul>
        </div>
    </nav>
 
    <div class="jumbotron jumbotron-fluid animated">
        <div id="container">
            <h2 class="typing-anim"><span class="type"></span></h2>
         ... // omitted for brevity
       
    <script src="/js/particles.js"></script>
    <script src="/js/app.js"></script>
    <script src="https://code.jquery.com/jquery-3.3.1.slim.min.js"
        integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous">
    </script>
   ... 

</body>

</html>

Answer ā„–1

It seems like there may be an issue with the file paths you are using.

GitHub is looking for this:

https://rmottram.github.io/js/script.js

The correct path should be:

https://rmottram.github.io/Portfolio/js/script.js

To fix this, I recommend updating your paths from

/js/typed.js

to

./js/typed.js

Answer ā„–2

Appreciation to both of you for your helpful suggestions! I followed Damien's advice and added './' before the path, which resolved the issue. Thanks again!

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Is there a way to customize the selected option in the autocomplete feature of Material UI components?

Is it possible to customize the CSS of selected options in Material UI autocomplete? Can this be achieved by utilizing the theme? ...

Verifying the "select" dropdown option prior to final submission

My website features multiple select dropdowns that require validation before submission. For instance, there may be a situation where seven select dropdowns are present as described below. My desired validation criteria is: If there are 5 or more "sel ...

I'm just starting to delve into React and I am eager to transform my regular JavaScript code into a React format. However, I am not quite sure how to

In my React JavaScript, I am trying to insert some regular JavaScript code. I attempted to use the {} brackets, but it did not work as expected. import './App.css'; function App() { return ( <> <div className=" ...

Trouble with Flex 3 styles not fully applying to dynamically generated tabs within a TabNavigator

When using ActionScript to dynamically create a tab, I noticed that the style is applied to the skins but not to the text of the newly created tab until I click on another tab and then go back to it. ActionScript private function clickAddTabHandler(event ...

Explore the potential of req.params

As a novice programmer, I am diving into learning Express for the first time. Currently, I have set up global arrays as follows: var labreport1 = [...] var labreport2 = [...] I wrote a function that fetches data and stores the successful response in the ...

What might be causing my lightbox image to fail to load when I click on it?

Whenever I click on the image, the lightbox loads but the actual image fails to load, leaving a blank white box instead. Despite following a tutorial on YouTube that showed me how to create a lightbox step by step, I can't figure out what went wrong. ...

Troubleshooting: Bootstrap 5.0 Navbar Dropdown Issue Unresolved

My navbar dropdown isn't working when clicked. I've searched for solutions without success. Is there a script missing? layout.html: <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> ...

Having trouble with Simplehtmldom's innertext function?

While working with simple_html_dom: I encountered the following code snippet: $j = ' <itemBody> <div>films - to watch (Simple Present)<br/> <textEntryInteraction responseIdentifier="RESPONSE_1"/> ...

Not successfully integrating an angular component

In my Angular application, I am working on creating a new component and injecting it into the app. Below is the code for the angular component: (function(angular) { 'use strict'; angular.module('some.someModule', ['bm.component.t ...

Display the button immediately following the text within the cell without extending beyond its boundaries

Check out the code snippet below: <td> <div> <span class ="name">Can be long, can be short</span> <button>Test</button> </div> </td> td{ white-space: no-wrap; width:175px; position: relati ...

Element misbehaving after a certain point

I'm encountering an issue with a piece of code that is not working as expected. The problem seems to be specifically with the after element. The desired behavior is for two lines to draw from the top left corner and the bottom right corner when hoveri ...

Zero-length in Nightmare.js screenshot buffer: an eerie sight

I'm currently working on a nightmare.js script that aims to capture screenshots of multiple elements on a given web page. The initial element is successfully captured, but any subsequent elements below the visible viewport are being captured with a l ...

Adding an item depending on the selection made from a dropdown menu

When selecting options from a dropdown menu to create multiple fields, only the first selection is taken into account. For example, if I choose different values for 3 fields, it duplicates the first field 3 times. Below is the current function I am using: ...

Steps to integrate Bottom Tab bar on mobile platforms

Creating a Bottom Navigation Bar for Websites Exploring the technology used to implement bottom navigation bars on LinkedIn and how it can be applied to web pages. Any recommendations for frameworks like React or Angular? ...

How can I deliver assets in React without the PUBLIC_URL showing up in the path?

I have set up a portfolio website that includes my resume. I am trying to make it so that when someone visits the route http://localhost:3000/resume.pdf, they can view my resume directly. The resume.pdf file is located in my public folder. However, instead ...

Is it possible for the font size to adjust based on the heading (h1, h2, h3) I choose when using CSS to specify a particular font size?

What will happen if the following HTML code is used: <h1> This is text</h1> <h2> This is also text</h2> and CSS is applied to change the font size like this: .h1 { font-size: 30px } .h2{ font-size: 30px } Will both texts ...

TypeScript does not raise errors for ANY variables that are initialized later

In my code, there is a function that accepts only numeric variables. function add(n1: number) { return n1 + n1; } However, I mistakenly initialized a variable with type "any" and assigned it a string value of '5'. let number1; number1 = &apo ...

Harness the power of asynchronous programming by incorporating the async await method within

Within my Node Express application, I am looking to retrieve all comments associated with a particular lesson and enhance each comment by including a fullname field. To accomplish this, I have created a function called findFullNameByUserId in the UserContr ...

Challenges with v-autocomplete in Vuetify.js

I am currently working with the v-autocomplete component and finding it somewhat rigid in terms of customization. I am hoping someone can provide some insight on this issue. Is there a way to have a default display text value in the input when the page fi ...

What causes Express Async Errors to produce unexpected outcomes?

I stumbled upon a fantastic npm package called Express Async Errors that is highly recommended in the documentation. However, when I try to implement it, my server crashes. Here is my Route handler code: Controller const { Genre } = require("../models"); ...