Github doesn’t climb my site properly with Bootstrap 4

Asked

Viewed 205 times

1

Good evening guys, I’m trying to get my site up on GITHUB that I’m working on for studies, but it’s not working properly it seems that the Bootstrap and CSS settings don’t work when I mirror it with the desktop github app, someone knows where I’m missing?

See how the site is getting: https://wilkerbn.github.io/Curso/

View the files in the repository: https://github.com/Wilkerbn/Curso

If anyone knows where I’m going, please help me.

Grateful.

1 answer

0

Your path is wrong to access CSS

Note that in your HTML the reference is like this

<!-- Bootstrap CSS -->
<link rel="stylesheet" href="node_modules/bootstrap/compiler/bootstrap.css">
<link rel="stylesheet" href="node_modules/bootstrap/compiler/style.css">

But in the repository the way is another

https://raw.githubusercontent.com/Wilkerbn/Curso/master/node_modules/bootstrap/dist/css/bootstrap.css

node_modules/bootstrap/dist/css/bootstrap.css

inserir a descrição da imagem aqui


You can follow this same idea to fix all these 404 errors...

inserir a descrição da imagem aqui

  • Okay, I’ve updated the links now the problem is another: Refused to apply style from 'https://raw.githubusercontent.com/Wilkerbn/Curso/master/node_modules/bootstrap/compiler/style.css' because its MIME type ('text/Plain') is not supported a stylesheet MIME type, and Strict MIME checking is enabled. Can you tell me how to fix?

  • @Wilkerbruno I believe it is pq the MIME Type of . CSS is wrong. Normally css is included in the document this way <link rel="stylesheet" type="text/css" media="screen" href="meu.css" /> Notice that his type is type="text/css". So I guess somehow that could be your problem out there... But if the loading problem has been solved, consider marking the answer as accepted and then you open another question more specifically about MIME Type so other people can also help you

Browser other questions tagged

You are not signed in. Login or sign up in order to post.