When I try to host my Jekyll site on GitHub Pages using my custom domain, the CSS doesn't seem to be rendering at all

Everything looks perfect when I test my site on local host, but once I push it to my GitHub repo, only the HTML appears with no CSS or JavaScript. I've attempted changing my URL in the config.yml file to https://chanvrequebec.com and modifying href="/css/main.css" to href="css/main.css", but unfortunately, none of these solutions have made any difference. I'm at a loss for what to do next. Any assistance would be greatly appreciated. Thank you.

Answer №1

Your website looks amazing on - although it should be noted that you are currently using HTTP instead of HTTPS as mentioned in your initial question!

If you have an SSL/TLS certificate for this domain, it's important to update the url in your _config.yml file to reflect the correct protocol: https://chanvrequebec.com

Here are a few key points to consider:

1st. In your _config.yml, you have specified:

markdown: redcarpet

However, starting from May 1st, Github Pages will no longer support redcarpet. It is recommended to switch to:

markdown: kramdown

2nd. Your website should also be accessible at , but due to GitHub Pages configuration error, this is not currently the case. To address this, you need to set the baseurl to baseurl: '/website' or update the url to http://jaubut.github.io/website. However, the latter option may lead to issues with internal links redirecting to the github.io subdomain.

To resolve these issues properly, here's what you should do:

  • Create a new repository named jaubut.github.io (User website)
  • Transfer the content from your current repo website to the master branch of the newly created repository
  • Maintain the current settings in your _config.yml
  • Your website will then be accessible at and
  • Delete the website repository once the transfer is complete
  • If you have an SSL/TLS certificate for your domain chanvrequebec.com, remember to update the url in your _config.yml accordingly: change url: "http://chanvrequebec.com" to url: "https://chanvrequebec.com"

All done!

I hope this information proves helpful to you!

Answer №2

Your website is located in the subfolder 'website'. To correctly link to the CSS file, use href="/website/css/main.css". The accurate URL for your site is: . If you want to use a custom domain, you'll need to set up a CNAME file, as explained here: .

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

Having trouble adding your own styling to bootstrap-4 using a custom CSS file?

Here is the code I used to connect my two stylesheets, with the custom css file being linked second as per what I believe is the correct way to do it. <!doctype html> <html> <head> <link rel="stylesheet" type="text/css" href=" ...

Guide on how to have two controllers execute identical tasks in Angular while modifying the appearance of the website

Trying to recreate Google's homepage functionality using Angular has been challenging for me. Despite watching Egghead videos and studying the API extensively, I couldn't find a specific example for this behavior. Here's what I aim to achiev ...

Execute a function once all images have finished loading

My current approach involves utilizing a function to load images from an array: for (var i = 0; i < images_list.length; i++) { var img = new Image(); img.onload = function() { images_objects.push(this); ...

Tips for directing attention to a specific row with an input field in JavaScript

I duplicated a table and added an input field for users to search or focus on a specific row. However, there are two issues: When a user enters a row number, the table displays the wrong row - for example, if the user enters 15, the table shows row number ...

When a dialog box is displayed, a scrollbar will automatically appear

I've encountered a strange issue while working with Angular dialogs: A vertical scrollbar unexpectedly appears, even though I've set the dialog to have a fixed width. component.ts const dialog = this.dialog.open(DialogComponent, { width: ...

I am struggling to style a form effectively with CSS grid

I am working on setting up a 2-column HTML form using CSS grid. In the first column, I have labels placed on individual rows. In the second column, I have form elements also placed on individual rows. This is my initial attempt at this task and I am sti ...

constant element within mat-menu in Angular

This coding snippet displays unread notifications to users: <mat-menu #menu="matMenu"> <div class="menu-item" mat-menu-item *ngFor="let item of notifications"> ...item content </div> <b ...

Is there a way to toggle the visibility of the angular material toolbar at regular intervals?

I'm currently experimenting with the CSS animation feature to display and conceal the angular material toolbar in this demonstration. Inside the application component, the hide attribute is toggled at intervals as shown below: hide:boolean = false ...

Problem with overlapping numbers in the Vis network

I am currently working on a project using Angular 8 and Visnetwork. Everything is going well, but I am facing an issue with overlapping numbers on lines. Is there a way to adjust the position of the numbers on one line without separating the lines? Can s ...

Can a specific element be chosen based on its background color?

Is it possible to change the background color of a child element within a div that has a specific background color using CSS? See my explanation below. For example: .container[background-color=some color] .content { background-color: some other color ...

Toggle switch unable to reset upon reloading the page

Issue with Toggle Switch Not Resetting on Page Reload I am encountering a problem with a toggle switch I implemented from the W3schools example (link here). Unlike in the W3schools editor where it resets its state upon reload, my toggle switch remains in ...

Establishing the default scroll position in tables using React.js

How can I set the initial scroll in ReactJS Material-UI tables? I'm working with a table that has numerous columns and I would like to have specific columns in view automatically without having to scroll, essentially establishing an initial scroll. I ...

What is the best way to align several columns at the center in Bootstrap?

I'm struggling to center-align Card 1 so that it perfectly aligns in the middle of the page alongside the other cards (Card 2, Card 3, Card 4, Card 5). Despite numerous attempts, I can't seem to find a solution for this issue. Does anyone know ...

Adjust the width to ensure the height is within the bounds of the window screen?

I am currently in the process of developing a responsive website, and my goal is to have the homepage display without any need for scrolling. The layout consists of a 239px tall header, a footer that is 94px tall, and an Owl Carousel that slides through im ...

Automatically adjust sizes with div elements

How can I automatically resize this iframe within a div? My current method is not effective. <iframe src="http://www.gamepuma.com/external.html?http://data.gamepuma.com/games/06/crash-bandicoot.swf" width="600" height="400" frameborder="0" margin ...

"Enhance user experience with autofocusing on form fields within an overlay

Despite spending hours searching, I can't seem to figure out a seemingly simple task. I am trying to set autofocus on a form field within an overlay that opens when a button is clicked. The overlay is implemented using basic jQuery overlay code. $(f ...

Ways to accomplish this visual style when focusing

While browsing a website, I noticed something intriguing: Upon clicking on it... How did they achieve this effect? It's not just a simple solid border, but more intricate. I examined the source code extensively but couldn't locate anything rele ...

Stopping HTML 5 video playback while transitioning to a different webpage

My website has a layout with a left menu containing video links and a content area where the videos are played. However, I have encountered an issue when switching between videos. Currently, if I click on Video 1 and then decide to watch Video 2 while Vid ...

When I try to alter HTML using JS, I encounter an undefined error related to AngularJS

Using this specific function: function adjustContent(elemento){ if (document.getElementById(elemento).innerHTML.indexOf('&#10004;')>0){ document.getElementById(elemento).innerHTML=document.getElementById(eleme ...

What is the best way to add an active class to a clicked menu item that already has a class

I have menu items on the master page, and if users click on that menu item, I want to show it as active. My goal is to append "Active" to the existing class to indicate that it is active. _Layout.cshtml: <div class="menu-items-navigation"> <di ...