Code Monkey home page Code Monkey logo

nera's Introduction

Nera - a lightweight static site generator

Nera is a really simple static site generator. It creates static html files out of
Markdown files.

Get started

Make sure you run at least Node version 10.2 on your system

git clone [email protected]:seebaermichi/nera.git

# Install dependencies
npm install

# Run local server
npm run serve

# Render the static files
npm run render

# Local development
npm start

Directory and file structure

|-- assets/
|-- config/
    |-- app.yaml
|-- pages/
|-- src/
    |-- plugins/
    |-- nera.js
|-- views/
|-- index.js

Assets

Are all CSS, JavaScript, font and image files which are used on your website. During the render process all assets are copied to the public directory.

Config

Here you can define global settings for your website. All the global settings should got to the config/app.yaml. Like lang, name, etc.

Pages

Within the pages directory you add the Markdown files which actually include the content of your page. Find more information about the Markdown files below.

Src

The src directory include the app itself. Here you find the nera.js file which includes all the functionality to run the
app.

Plugins

The src folder also includes the plugins folder. In it you would place additional functionality. There is already an
example, the main navigation. Find detailed documentation about plugins in the plugins README file.

Views

In the views directory you put all the layout files. We use pug as a templating framework.

Page Markdown files

Each Markdown file which includes the content of a dedicated webpage needs to have some settings in the head. See an example below:

---
layout: pages/default.pug
title: Homepage
---
# Content
Content goes here...

Of course you can add many more so called meta data. It will be available in the view files as meta object.
In addition the basic config values are available within the app object.

nera's People

Stargazers

Burak avatar

Watchers

Armagan Amcalar avatar James Cloos avatar  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.