@altamir/react-static-site-generator
Altamir React Static Site Generator facilitates the creation of static sites by those with limited development experience. Leveraging the flexibility of React, it can create beautiful static sites with very few lines of code.
Last updated 9 months ago by sdstolworthy .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @altamir/react-static-site-generator 
SYNC missed versions from official npm registry.

Altamir React Static Site Generator

Static Site Generator

The React Static Site Generator is designed to help create impressive websites impressively fast.

Right now, RSSG depends on bulma-styled-components, a package created by Altamir's own mpaupulaire4. In the future, RSSG should be plug-and-play, allowing to pass in custom UI libraries and create amazing sites.

Use

Installation

  1. Navigate into any React.js project and run npm install @altamir/react-static-site-generator or yarn add @altamir/react-static-site-generator.

  2. Import the module where it will be used.

import React from 'react'
import siteGenerator from '@altamir/react-static-site-generator'
  1. Generate static components
import ReactDOM from 'react-dom';
import siteGenerator from '@altamir/react-static-site-generator'
import * as Bulma from 'bulma-styled-components'

ReactDOM.render(siteGenerator({
  pages: {
    main: {
      title: 'Home Page',
      components: [{
        type: Bulma.Notification,
        content: 'hello'
      }]
    },
    about: {
      title: 'About Me',
      content: ''
    }
  }
}, {
  componentLibraries: [Bulma],
  themeProvider: Bulma.BulmaStyledTheme
}), document.getElementById('root'));

Configuration

Usage right now is very simplistic. Basically, RSSG is just accepting a JSON markup of a website, and then traversing that and spitting out a React SPA.

Here is an example of a site object that RSSG can take in:

siteGenerator({
  pages: {
    main: {
      title: 'Home Page',
      components: [{
        type: Bulma.Notification,
        content: 'hello'
      }]
    },
    about: {
      title: 'About Me',
      content: ''
    }
  }
}, {
  componentLibraries: [Bulma],
  themeProvider: Bulma.BulmaStyledTheme
})

Contributing

Please Contribute! Please remember to comment your code. This project deals largely in generics, so comments are enormously helpful in understanding what is going on.

Current Tags

  • 0.2.5                                ...           latest (9 months ago)

14 Versions

  • 0.2.5                                ...           9 months ago
  • 0.2.4                                ...           9 months ago
  • 0.2.3                                ...           9 months ago
  • 0.2.2                                ...           9 months ago
  • 0.2.1                                ...           9 months ago
  • 0.2.0                                ...           9 months ago
  • 0.1.8                                ...           9 months ago
  • 0.1.7                                ...           9 months ago
  • 0.1.6                                ...           9 months ago
  • 0.1.5                                ...           9 months ago
  • 0.1.4                                ...           9 months ago
  • 0.1.3                                ...           9 months ago
  • 0.1.1                                ...           9 months ago
  • 0.1.0                                ...           9 months ago
Downloads
Today 0
This Week 0
This Month 43
Last Day 0
Last Week 15
Last Month 30
Dependencies (4)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |