Getting started

About

Cogear.JS is a static websites generator built with Node.JS (9.x or higher) and based on Webpack (v4.6).

It's inspired by Jekyll and others, but built on the top of the latest frontend technologies.

Provides awesome hot reloading experience in development mode.

Use arrow keys to navigate through the docs.

Features

  • 🖥 Modern stack of technologies
    Build modern static websites with bundled scripts and styles.
    Rapidly prototype and instantly deploy to the server.
    Use any modern frontend stack (webpack bundled) – Vue.JS, React, Angular, Ember, etc.
  • 🚀 Blazing fast and reliable
    Performs nearly 1.000 pages per second (depends on the pages content and raw computer processor power).
    Server can handle thousands requests per second to serve static files (even on tiny VPS).
  • 📦 For any hosting
    Doesn't require any database (data stored in flat files) and works with any hosting (as it produces static html and assets files).
  • 🚚 Deploy built in
    Create a preset and update your site to the server via FTP, SFTP or even rsync.
  • 🔓 Secure. No updates needed
    Just forget about annoying regular updates from usual CMS.
    It's 100% secure for hacking because there is no backend after being deployed to the server.
  • Free. Open Sourced
    Use it for free. For any needs. Forever.

Github Pages (or any similar project) you can host generated site for free.

What it can be used for:

  • Rapid site prototyping
  • Portfolio site
  • Company site
  • Product site
  • Personal blog
  • Artist or musician site

Any site that has admin-generated content.

Multi-user content management can be provided via Github. Just store your source in the repository, accept pull-requests from other users and build a site after commits (can be automated).

Using Firebase or any other backend, written in any lang (PHP, Ruby, Python, Node.JS) or even with CMS like a WordPress, with help of modern frontend technologies like Vue.JS or React, it can be turned into more dynamic site like e-commerce, products catalog and so on.

What it cannot be used for:

  • Forum
  • Social network
  • Chat

Or any other site type with great amount of user-generated content which relies on heavily database usage and dynamically generated pages.

Of course you can try, but it has to be modern SPA which handles data from dedicated API.

Requirements

You have Node.JS (9.x or higher) and NPM (usually comes together) to be installed.

Download and install.

The latest version (v10.9.0) is recommended.

You can also use Yarn instead of NPM.

Cogear.JS runs on:

  • Mac
  • Linux
  • Windows

You may want to use awesome VSCode editor.

Installation

To install Cogear.JS do next:

$ npm install cogear -g
# or
$ yarn global add cogear

Done. Congratulations!

Cogear.JS is now available via cli-command cogear.

Now you're ready to build your first site.

Usage

Go to the directory where all your local sites are hosted.

$ cd ~/Sites

Create a new site via command:

$ cogear new site.io # where "site" is your site folder name

crafting site

After that go to site directory:

$ cd ~/Sites/site.io

And start up Cogear.JS in development or production mode (learn more).

$ cogear # run in development mode with hot-reload – by default

$ cogear production # build a site and run local server

Options

All available options can be seen via --help (or shortcut -h) command.

help

Let's take a look at the workflow.