Code Monkey home page Code Monkey logo

React Static Website Generator

Really simple static site generator based on React without ES6. It uses server side rendering to build the pages.

Features

  • No markdown, only react :) You are free to use any markup you need.
  • Uses SASS preprocessor and autoprefixer for CSS, automatically minifies the CSS output.
  • Minifies client side javascript using UglifyJS
  • MIT licensed

How to install?

cd my-website-folder
npx jso-react-static-website build
npm install

How to use?

  • Build the site using
    npm run build
    
  • Run and go to http://localhost:3000 to see it
    npm run site
    
  • The site output is located at /dist folder
  • Go to /src/js/website-generator and edit or add your own react components.

How to pass general website data to react components?

Use /data/data.json file, every component has access to its content via props. For example websiteName property defined in /data/data.json can be accesses as this.props.websiteName in react components.

Where to add CSS?

  • It's located at /src/css
  • The output file is /dist/css/styles.min.css and it's already minified using UglifyCSS
  • SASS preprocessor is used to handle CSS
  • All CSS go through Autoprefixer to add vendor prefixes if needed

Where to add client side JavaScript?

  • It's located at /src/js/client
  • The output file is /dist/js/website.min.js and it's already minified using UglifyJS.

Where should I add my images and other assets?

  • Any assets should be placed at /assets folder
  • They automatically copied to the destination folder /dist

License

The project is free for use under the MIT license

jsoceandiver's Projects

aforge.net icon aforge.net

AForge.NET Framework is a C# framework designed for developers and researchers in the fields of Computer Vision and Artificial Intelligence - image processing, neural networks, genetic algorithms, machine learning, robotics, etc.

gitbook icon gitbook

📝 Modern documentation format and toolchain using Git and Markdown

ionicons icon ionicons

The premium icon font for Ionic Framework and web apps everywhere

node-fs-extra icon node-fs-extra

Node.js: extra methods for the fs object like copy(), remove(), mkdirs()

nunjucks icon nunjucks

A powerful templating engine with inheritance, asynchronous control, and more (jinja2 inspired)

rough-sketch icon rough-sketch

Transform your shapes in a sketchy, scribbly, hand-drawn-like, style

toolcool-color-picker icon toolcool-color-picker

Tool Cool Color Picker is a color picker library written in typescript and using web component technologies.

victor icon victor

A JavaScript 2D vector class with methods for common vector operations

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.