Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
achuthrajula opened this issue Aug 5, 2020 · 1 comment

Comments

@achuthrajula
Copy link

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

@achuthrajula achuthrajula changed the title When deployed using gh-pages the the screens for mobile are not responsive When deployed onto gh-pages the the screens for mobile are not responsive Aug 5, 2020
@quasaray
Copy link

quasaray commented Oct 9, 2021

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 = ( <div> {children} </div> ) } else { content = ( <div id="wrapper" className="page"> <div> {children} </div> </div> ) }

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants