Giter VIP home page Giter VIP logo

react-static-plate's Introduction

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">.

react-static-plate's People

Contributors

webyak avatar apostolos avatar

Watchers

Tzvi Gershbaum avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.