JSPM

  • Created
  • Published
  • Downloads 39
  • Score
    100M100P100Q53726F
  • License MIT

Hyperapp static site framework

Package Exports

  • hyperstatic

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (hyperstatic) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

hyperstatic

The hyperapp static site generator


Hyperstatic is a thin navigation layer on top of hyperapp that helps create fast and SEO friendly static sites.

It's goal is to be a simpler, lighter and faster GatsbyJS, that uses Hyperapp instead of React.

It's codebase has an inherently small footprint by using Puppeteer for pre-rendering and dynamic imports for code-splitting.

The key features are:

  • Routing and navigation
  • Prerendering
  • Prefetching at build-time
  • Code splitting

See the demo site here: https://hyperstatic.dev/

Starter template 🚀

To easiest way to get started is to use this starter template.


Installation in an existing hyperapp project:

  1. npm i hyperstatic

  2. Create a routes object with your routes patterns in it.
    Example

  3. Replace hyperapp's app call with hyperstatic. Add the extra routes attribute that is needed.
    Example

  4. Add the hyperstatic Router component that will render the pages
    Example

  5. Link to your pages using the Link component.
    Example

  6. For prerendering, add this helper command in your package.json scripts:

"scripts": {
  "prerender": "npm run build && hyperstatic"
}

That should be it!

For more info, see https://hyperstatic.dev/

Pull requests are welcome! ❤