codebushi / gatsby-starter-dimension

Gatsby.js V2 starter template based on Dimension, designed by HTML5 UP. Check out https://codebushi.com/gatsby-starters-and-themes/ for more Gatsby starters.
Other
319 stars 196 forks source link

When deployed onto gh-pages the the screens for mobile are not responsive #64

Open achuthrajula opened 4 years ago

achuthrajula commented 4 years ago

Running it locally is absoulutely fine but when deployed onto gh-pages, the site isn't responsive on mobile screens as expected

Expected Output: image

Actual Output: image

quasaray commented 3 years ago

A bit late, but for anyone else with the same problem I found a solution.

In the layout.js file, there is conditional logic based on the URL location

` if (location && location.pathname === '/') { content = (

{children}
)

} else { content = (

{children}
)

}`

This messes up the style if the deployed site is not the root. I fixed it by using the site repository on gh-pages