• Stars
    star
    341
  • Rank 123,998 (Top 3 %)
  • Language
    JavaScript
  • Created over 8 years ago
  • Updated over 7 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Build fast static sites with React & CSS Modules.

React Static Plate

Build static sites with React & CSS Modules to host on Amazon S3, Github Pages, Surge etc. React | React Router | Babel 6 | CSS Modules | PostCSS | Webpack

Features

  • ES6+.
  • Hot Reloading.
  • ESLint rules based on Airbnb's Javascript Styleguide.
  • Every route is completely rendered into a .html page with renderToString.
  • Deferred script loading, so the browser can render the html without waiting for the js bundle first.
  • Hash is added to every asset's filename, so you can cache all assets forever.
  • Title, Meta and other SEO tags with react-helmet.
  • SEO friendly, no JavaScript required to view a page.
  • Generates sitemap.xml

Getting Started

Fork the repo, install the node modules and run the dev server:

$ npm install
$ npm start

Open http://localhost:3000 & have fun. 🐒

Deploy

Set your website in package.json and generate all the static files with npm run build. Then upload the contents of the build/ folder to your hosting solution of choice. Finish!

You can also check out the production build on your local machine using http-server:

$ npm install -g http-server
$ cd build
$ http-server

FAQ

My site is not working properly on Amazon S3:
Make sure you define paths with trailing slashes, like <Route path="about/">.

My site is not working properly on Github Pages:
Make sure you define paths without trailing slashes, like <Route path="about">.