docusaurus: Css is not loading properly in build

šŸ› Bug Report

I want to deploy the build folder, but the build folder css is all messed up. The pages has no styling. When I’m running in development mode the pages are loading fine, but in build mode, pages are not loading properly. Please see attached photos

Have you read the Contributing Guidelines on issues?

Yes

To Reproduce

  1. Clone the repo git clone https://github.com/react-native-bootstrap/react-native-bootstrap
  2. cd into website folder cd website
  3. Start development server and see website is working fine yarn start
  4. Not build the static website & open index.html in build folder yarn build

Expected behavior

The website should have looked like this

Screenshot_2020-05-31 React Native Bootstrap React Native Bootstrap(1)

Running index.html file from build folder should have worked fine, so that I can deploy it on github pages

Actual Behavior

Website looks like this after deploying build folder in gh-pages

Screenshot_2020-05-31 React Native Bootstrap React Native Bootstrap

Your Environment

  • Docusaurus version used: 2.0.0-alpha.56
  • Firefox 76.0.1 (64-bit)
  • Node.js v10.15.3
  • Operating system and version (desktop or mobile): Ubuntu 18.04

Reproducible Demo

The entire code is present here https://github.com/react-native-bootstrap/react-native-bootstrap/tree/master/website

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Reactions: 1
  • Comments: 15 (4 by maintainers)

Most upvoted comments

You need a CNAME file as well in static with the contents react-native-boostrap.io.

This is not a Docusaurus problem, so I’m closing this.

Hi @sanjeevyadavIT ,

I have the same issue as you, Have you got any solution to it?

Also Just want to know, After running yarn build can we run a static website through a browser without running any server?