All Projects → seebaermichi → nera

seebaermichi / nera

Licence: other
A lightweight static site generator

Programming Languages

javascript
184084 projects - #8 most used programming language
Pug
443 projects

Projects that are alternatives of or similar to nera

Verless
A simple and lightweight Static Site Generator.
Stars: ✭ 276 (+2200%)
Mutual labels:  static-site-generator, blog-engine, static-site
Assemble
Community
Stars: ✭ 3,995 (+33191.67%)
Mutual labels:  static-site-generator, blog-engine, static-site
presta
Minimalist serverless framework for SSR, SSG, serverless APIs and more.
Stars: ✭ 89 (+641.67%)
Mutual labels:  static-site-generator, blog-engine, static-site
hugo-initio
Hugo Theme port of Initio bootstrap template by GetTemplate
Stars: ✭ 58 (+383.33%)
Mutual labels:  static-site-generator, static-site
front-matter-manipulator
A utility for parsing and manipulating documents with Front Matter
Stars: ✭ 25 (+108.33%)
Mutual labels:  static-site-generator, static-site
Blended
The Most Versatile Static HTML Site Generator
Stars: ✭ 22 (+83.33%)
Mutual labels:  static-site-generator, static-site
Kotsu
✨ Clean, opinionated foundation for new projects — to boldly go where no man has gone before
Stars: ✭ 48 (+300%)
Mutual labels:  static-site-generator, static-site
static-web-apps-gallery-code-samples
A community showcase of projects built with Azure Static Web Apps 🎉 Visit: https://microsoft.github.io/static-web-apps-gallery-code-samples/
Stars: ✭ 96 (+700%)
Mutual labels:  static-site-generator, static-site
sutanlab.id
☕️ My Personal Homepage & Blog site with NextJS. 🇺🇸 🇮🇩
Stars: ✭ 39 (+225%)
Mutual labels:  static-site-generator, static-site
sistine
A simple, flexible, productive static site generator written entirely in Ink
Stars: ✭ 17 (+41.67%)
Mutual labels:  static-site-generator, static-site
jigsaw-docs-template
Starter template for a documentation site, using Jigsaw by Tighten
Stars: ✭ 39 (+225%)
Mutual labels:  static-site-generator, static-site
contentful-hugo
A CLI tool that pulls data from Contentful and turns it into markdown files for Hugo and other static site generators. It also includes an express server that can be used for local development and content previews
Stars: ✭ 31 (+158.33%)
Mutual labels:  static-site-generator, static-site
neofeed-theme
A personal feed for Neocities, GitHub Pages, or anywhere else, built with Hugo. #IndieWeb friendly and all yours. It's better than Twitter.
Stars: ✭ 62 (+416.67%)
Mutual labels:  static-site-generator, static-site
awesome-astro
Curated resources on building sites with Astro, a brand new way to build static and server rendered sites, with cross-framework components, styling and reactive store support.
Stars: ✭ 210 (+1650%)
Mutual labels:  static-site-generator, static-site
hyperdraft
Turn your notes into a website.
Stars: ✭ 59 (+391.67%)
Mutual labels:  static-site-generator, static-site
wordpress-scaffold
The scaffold for GRRR's WordPress Pro setup.
Stars: ✭ 16 (+33.33%)
Mutual labels:  static-site-generator, static-site
oliverbenns.com
oliverbenns.com
Stars: ✭ 51 (+325%)
Mutual labels:  static-site-generator, static-site
jekyll-rdf
📃 A Jekyll plugin to include RDF data in your static site or build a complete site for your RDF graph
Stars: ✭ 46 (+283.33%)
Mutual labels:  static-site-generator, static-site
voldemort
A simple static site generator using Jinja2 and Markdown templates.
Stars: ✭ 48 (+300%)
Mutual labels:  static-site-generator, static-site
mpa-frontend-template
🔥 Template based on webpack, pug, stylus, es6, postcss for multi page applications
Stars: ✭ 27 (+125%)
Mutual labels:  static-site-generator, static-site

Nera - a lightweight static site generator

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

Please be aware of that this software is still under development. It might be that there will be changes which are not compatible with former versions.

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 (browser-sync)
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/
        |-- plugin-helper.js
    |-- core.js
    |-- index.js
    |-- render.js
    |-- setup-plugins.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. They will be available in the data.app object within source or plugin files or as app object within the view files.

Pages

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

Src

The src directory includes the app itself. Here you find the core.js, index.js, render.js and setup-plugins.js files which include all the functionality to read the markdown files, get the settings, load plugins, copy assets and render the Html files into the puplic folder.

Plugins

The src folder also includes the plugins folder. In it you would place additional functionality.
Have a look at the current collection of available plugins.

Views

In the views directory you put all the layout files. We use pug as a templating framework.
In addition to the content of the markdown file there is also more data available. There is one app object, which includes all the properties from the config/app.yaml file. The other object is the meta object. Where app includes data relevant or usable on every page the meta object only includes data for the page itself. Therefore it includes by default all the properties and values you define in the meta section of the markdown file. In addition it includes

createdAt
is datetime when the markdown file was created

href
is the path to the current html file

dirname
is the dirname of the current html file

The meta object could of course also include more data depending on what your plugins add to id.

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.

Translations

If you want to use Nera for your multi-language website, you can do this easily by adding translations to the app config file and use the t function in your pug templates.
config/app.yaml

...
translations:
  en:
    app_description: Nera is an easy to use and light weight static site generator
  es:
    app_description: Nera es un generador de sitios estáticos liviano y fácil de usar

views/layouts/layout.pug

...
head
    ...
    meta(name="description", content=`${ meta.description || t('app_description') }`)
    ...

The t function will search for the key in the translations of the app config file and will return the translation for this key. If it can not find the translations property or if there isn't the given key within the translations the function will just return the key.

Links

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].