All Projects → framer → Monobase

framer / Monobase

React static site generator

Programming Languages

typescript
32286 projects

Projects that are alternatives of or similar to Monobase

Actions Gh Pages
GitHub Actions for GitHub Pages 🚀 Deploy static files and publish your site easily. Static-Site-Generators-friendly.
Stars: ✭ 2,576 (+1331.11%)
Mutual labels:  static-site-generator
Gopablo
🐺 Static site generator.
Stars: ✭ 166 (-7.78%)
Mutual labels:  static-site-generator
Bedrock
Bedrock is a static site generator to create large-scale HTML prototypes and document design systems
Stars: ✭ 175 (-2.78%)
Mutual labels:  static-site-generator
Tarbell
A Flask-based static site authoring tool.
Stars: ✭ 159 (-11.67%)
Mutual labels:  static-site-generator
Jekyll Serve
Jekyll in a Docker Container For Easy SSG Development
Stars: ✭ 164 (-8.89%)
Mutual labels:  static-site-generator
Elmstatic
Elm-to-HTML static site generator
Stars: ✭ 170 (-5.56%)
Mutual labels:  static-site-generator
Deventy
A minimal 11ty starting point for building static websites with modern tools.
Stars: ✭ 157 (-12.78%)
Mutual labels:  static-site-generator
Notablog
Generate a minimalistic blog from a Notion table. [WIP]
Stars: ✭ 177 (-1.67%)
Mutual labels:  static-site-generator
Staticman
💪 User-generated content for Git-powered websites
Stars: ✭ 2,098 (+1065.56%)
Mutual labels:  static-site-generator
Fornax
Scriptable static site generator using type safe F# DSL to define page templates.
Stars: ✭ 175 (-2.78%)
Mutual labels:  static-site-generator
Abecms
The lightning fast CMS
Stars: ✭ 160 (-11.11%)
Mutual labels:  static-site-generator
Nanoc
A powerful web publishing system
Stars: ✭ 1,959 (+988.33%)
Mutual labels:  static-site-generator
Baumeister
👷 The aim of this project is to help you to build your things. From Bootstrap themes over static websites to single page applications.
Stars: ✭ 171 (-5%)
Mutual labels:  static-site-generator
Mkdocs
Project documentation with Markdown.
Stars: ✭ 13,346 (+7314.44%)
Mutual labels:  static-site-generator
Lego
A fast static site generator that generates optimised, performant websites.
Stars: ✭ 176 (-2.22%)
Mutual labels:  static-site-generator
Pendulum
A simple markdown editor for static files (Hugo, Nexo, Jekyll, MkDocs, ...)
Stars: ✭ 157 (-12.78%)
Mutual labels:  static-site-generator
Hugo theme pickles
Modern, Simple and beautiful Hugo theme
Stars: ✭ 168 (-6.67%)
Mutual labels:  static-site-generator
Vanilla Back To Top
Simple and smooth Back To Top button
Stars: ✭ 179 (-0.56%)
Mutual labels:  static-site-generator
Saber
()==[:::::::::::::> Build static sites in Vue.js, without the hassle
Stars: ✭ 2,133 (+1085%)
Mutual labels:  static-site-generator
Pygreen
A micro web framework/static web site generator.
Stars: ✭ 171 (-5%)
Mutual labels:  static-site-generator

monobase

A fast and simple React static site generator that builds sites from components.

See an example of the default deployed project.

Quick start

  • Download the default project template
  • cd ~/Downloads/project
  • make serve to start you dev server
  • make build to generate your site

Why is it great?

Monobase let's you build sites in a component based way, allowing you to isolate and re-use every part of your website. Don't build a site, build a site system, and re-use it everywhere.

More great features:

  • Components can be optionally be interactive (if marked with Dynamic()).
  • Style and correctness enforcing through TypeScript and Prettier.
  • Automatic fast browser reloading on changes.
  • Fast with even huge sites through incremental rendering.
  • Easily extendable with existing React components.
  • Automatic port selection if default is taken.
  • Secure SSL serving by default.
  • Nicely formatted terminal logging.
  • Extensive error page with hints for common issues.
  • Optimized builds for production.

Project layout

  • /Makefile Shorthands for commands to quickly build or install.
  • /pages The html pages including site structure.
  • /pages/index.tsx Default index page.
  • /pages/404.tsx File not found page.
  • /components The React Components used by the pages.
  • /components/template.tsx Default page template.
  • /static Just static files like css, images, fonts and downloads.

Dynamic components

Some React components are interactive. Monobase generates a single script called components.js containing every marked component and hydrates them after the page load so they become interactive. This means the inital html gets loaded statically, and then code attaches itself automatically after page load.

To mark components as interactive wrap them in the Dynamic component [example]

Example dynamic components

You can find these in the default project /components/examples folder.

  • Grid - A simple but dynamic grid.
  • Button – Just a button you can click.
  • Timer - A timer that displays the running time in ms.
  • Cookie - An input that stores values in a cookie.
  • Scroll – An element that responds to page scrolling. [todo]
  • Mouse – A mouse location display.
  • Styled – An example of a static, inline styled component.
  • Picture - A responsive image loader.
  • Visible - A wrapper that hides the content if offscreen.
  • Unsplash - An unsplash random image element.

SSL on localhost

Monobase uses ssl / https on localhost. By default you'll have to click some warning away everytime. To make ssl work on localhost you can install mkcert.

  • brew install mkcert
  • mkcert -install
  • Restart your browser

Gotchas

  • On a page or component edit the current page and every component in the project/components will be reloaded. So make sure every file you'd like to use with autoreload is in either the project/pages or project/components folder.
  • Only the hydrated components will show in the React Dev tools, as it uses runtime introspection and can't find static html components.

Styled Components

It's easy to use Styled Components with Monobase. Just import StyledSheet and use it in your template to inline all the generated css. To get a great experience in VSCode, make sure to use the Styled Components Extension.

import { Development, StyledSheet } from "monobase";

export default function Template(props) {
  return (
    <html>
      <head>
        <StyledSheet app={props.children} />
      </head>
      <body>
        {props.children}
        <Development />
      </body>
    </html>
  );
}

Performance

Monobase generates a combined bundle for all of your pages, which contains all the JavaScript. Minified and gzipped it's around 40kb (depending on the size of your site) which is smaller than most images. Once it's loaded, it's cached for every page.

Deployment

The output of make build is just a web project that you can deploy anywhere, like Amazon S3 sites or Netlify. I myselfs also really like Zeit or Netlify for static websites.

  • Install Zeit: yarn --global install now
  • Build project: make build
  • Upload: now ./build
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].