CSS not applied on deploy, works fine locally

I have a jekyll site that works fine locally but styles aren’t applied on deploy. Ive tried making sure the css paths are absolute, but that didn’t fix anything.

This is the deploy url

https://ashtonsbradley-github-4v0nejfnq-ashtons-projects-514014af.vercel.app

Hi, Ashton! :waving_hand: Welcome.

We can’t open that deploy link as it’s only visible to you and your team.

Could you instead share a public URL? I’ll also cross-post a thread on how to get good answers from the community so we can help you faster.

1 Like

I think this should be public. Sorry, am quite new to this and I don’t know much about css either. The template I used has three config.yml files in different places with different variables.

Any help greatly appreciated.

I set the url to be the one generated by vercel. This fixed the styling.

Then I had missing pages. At top level I added trialing slashes to some permalinks.

The I had missing second level pages. I added trailing slash to

permalink: /:categories/:slug

and it appears that everything is now working at the vercel url.

I seem to have one last problem. I have added a custom domain, and it works

ashtonbradley.nz

However, when subpages are clicked on, the url reverts to vercel.app url. Now, I can cure this by changing the url in jekyll to my custom domain.

But then I loose the styling again. So I don’t seem to have fixed styling with custom domain.

EDIT: I had to get the CNAME and A list thingy configured correctly and use www as the custom domain. Everything seems to work now.

1 Like

Hi @ashtonsbradley, I’m glad you got this working. Thanks for sharing your solution. This thread will definitely be helpful to other people who stumble upon this error.

Hoping to see you more around the Vercel Community.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.