Need a quick help with my new Jekyll static website

My code works totaly fine when I run it locally. When I deploy on to Netlify/Vercel. The application breaks.

I am not into development and have tried all possible option I could. Let me know if anyone is available for quick help

Link to the Repo - GitHub - pankajmouriya/misconfigured.cloud

Live Link - http://misconfigured-cloud.vercel.app/

@pankajmouriya_

Hey @pankajmouriya - welcome to the community.

A quick peek at your _config.yml suggests it’s likely a path issue.

In your _config.yml, change your baseurl:

baseurl: /path/ :point_left: What you have now
baseurl: /path :point_left: Note the removal of the trailing slash

If you look at the developer tools in your browser on the live site, you’ll notice the double slash in all of your paths.

<link rel="shortcut icon" href="https://misconfigured.cloud/path//👈public/favicon.ico">

2 Likes

Hi Ckruse,

Thanks for replying

I have tried fixing your above suggestion but it did not help

Live Link - https://adoring-hopper-87b87e.netlify.app/

If you have time, please check these files if there is any misconfiguration - https://github.com/pankajmouriya/misconfigured.cloud/tree/master/_layouts

anyone else who is available and can take a quick look into this issue ?

Thanks in advance

Your repo is no longer accessible, but looking at the Netlify site quickly using Developer tools in a browser, the root cause is still how you’re handling slashes.

There’s still a duplicate slash.

https://misconfigured.cloud//public/favicon.ico
https://misconfigured.cloud//css/styles.css

Jekyll builds your paths using url + baseurl from _config.yml. If the url setting has a trailing slash and the baseurl setting has a leading slash, you’ll get the double slash issue you’re experiencing.

And don’t worry, this can be one of the most frustrating parts of getting started with Jekyll. We’ve all been there :slight_smile:

There’s a great explanation here:

1 Like

Viewing logs is the first thing to look at for errors.

The browser tells you what is wrong.

It’s expecting /path/css/styles.css with the word “path” in it.

But, here is where the file actually is:

https://misconfigured-cloud.vercel.app/css/styles.css

2 Likes

Your repo is not available.


For Netlify and Vercel, you probably want an empty baseurl

baseurl: ''

config

https://michael-currin.netlify.app/


For a subpath on GitHub Pages, set it.

baseurl: /jekyll-blog-demo

config

https://michaelcurrin.github.io/jekyll-blog-demo/

This is useful because this is a different site:

baseurl: ''

config

https://michaelcurrin.github.io/

1 Like

I made it private, just made it public. It should be accessible now

Btw, thank you everyone for their help. I am looking at the replies and will try them now

1 Like

Well well well, Its fixed and working

Thank you so much everyone above who took out their time and helped.

Is there any course material or resource where one can learn troubleshooting apps using browser developer tools?

1 Like