Giter Club home page Giter Club logo

nanogen's Introduction

Nanogen

npm Build Status Maintainability Test Coverage

Deploy to Netlify

Minimalist static site generator, powered by Node.js

Features

  • Generate HTML pages from EJS and/or Markdown files.
  • The site can have a global layout (the common header, navigation, footer) and some pages may have a specific one.
  • It can read site metadata from a global file and have specific data for individual pages.
  • Allow partials (blocks of reusable interface components)

Getting started

Prerequisites

  • Node.js installed (version 8 or above)

Install

You may install it globally with:

npm i -g nanogen

Or run the cli directly with npx (available with npm 5.2 or above):

npx nanogen <command>

Creating a new site

To create a brand new site, navigate to the folder you want your site to be and run:

nanogen init

This will create a initial site structure like this:

/
  src/
    assets/
    layouts/
    pages/
    partials/
  site.config.js

To build the site and open it in a browser, run:

npm start

There is already a default layout inside the layouts folder, but you may add more.

Read more about Layouts.

Inside the pages folder is where you put ejs, md or html files that will generate the pages of the final site. Any file name and folder structure used here will be transposed to the resulting site (without the pages part).

Read more about Pages.

Available commands and options

You may run nanogen -h to see the available commands and options:

  Initialize a new site:

    $ nanogen init

  Start the current site:

    $ nanogen start [options]

  Build the current site:

    $ nanogen build [options]

  Options
    -c, --config <file-path>  Path to the config file (default: site.config.js)
    -p, --port <port-number>  Port to use for local server (default: 3000)

    -h, --help                Display this help text
    -v, --version             Display Nanogen version

Docs

Read the full documentation

Authors

  • Douglas Matoso - Initial work - doug2k1

See also the list of contributors who participated in this project.

License

This project is licensed under the MIT License - see the LICENSE file for details

nanogen's People

Contributors

doug2k1 avatar dmatoso-cit avatar jromest avatar karnthis avatar

Watchers

James Cloos avatar splitdoll avatar

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.