Stylesheet not linking

Hi there,

I am a newbie to Dato and am enjoying using it so far. I’m combining it with Middleman, but after my first middleman build, the stylesheet is no longer connected.

Does anyone know why this might be? It was working before I integrated the app with Dato and it’s frustrating as this is the first CMS I can actually see myself working with!

Hi :slight_smile:

this is strange. Did you follow this guide to integrate DatoCMS into an existing middleman project?

Which middleman and middleman-dato gem’s version are you using on your project?

Thank you for your reply! I used this guide: Middleman and DatoCMS: a beginner's guide - DatoCMS and the gem ‘middleman-dato’. The guide is essentially the same as the one you linked, but without live-reload, from what I can see. The CSS doesn’t load at all, even locally, and it’s not visible in the inspector either. It worked with Dato (I added some records from the CMS) but stopped working after I ran bundle exec middleman build, at which point I lost the css link. I got a view bugs in the server after that - my commented css was breaking the app, so I deleted the comments . Thank you for your help. Is there anything else it might be?

Quite difficult to tell without looking at the code. If you are able to share your project (with the commits before/after the introduction of DatoCMS) we can try to take a look at it… but the DatoCMS plugin, as you can easily imagine, does not interfere with Middleman style sheets in any way, so there’s a 99.99% chance this issue it’s not DatoCMS-related

Hi there,

I do realise it is probably a Middleman issue rather than a DatoCMS one, but it’s strange because the stylesheet was working until I integrated the cms.

Here’s the link to my repo. It’s a very basic template atm - I was just trying to get Dato integrated before I build the app. GitHub - elizaplowden/attomo.

Thank you for your help!

Eliza

hi @elizaplowden

I can see that a lot of packages has been upgraded when you integrated dato. For example sprockets got upgraded from version 3 to 4. sprockets is responsibile for css and js files compilation, so maybe upgrading sprockets did cause your problem.

Maybe the template repo you used as a starting point is a little bit old? What if you start from our middleman demo instead ( Middleman portfolio - DatoCMS ) and you integrate your css in it instead? Maybe it will be easier this way!