# simple-site

> A simple tool to generate web sites.

Latest version **0.1.27** (published 2020-01-10) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install simple-site
pnpm add simple-site
yarn add simple-site
bun add simple-site
```

Provides the command `simple-site`.

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.27 |
| Published | 2020-01-10 |
| First published | 2017-03-12 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 13 |
| Unpacked size | 76 KB |
| Known vulnerabilities | 0 (+21 in 6 direct dependencies) |
| Install scripts | no |
| Author | Stefan Niederhauser |
| Maintainers | nidi |

## Links

- npm: https://www.npmjs.com/package/simple-site
- Repository: https://github.com/Schaltstelle/simple-site
- Homepage: https://github.com/Schaltstelle/simple-site#readme
- Issues: https://github.com/Schaltstelle/simple-site/issues
- npm.io page: https://npm.io/package/simple-site

## Dependencies (13)

- [glob](https://npm.io/package/glob.md) 7.1.2
- [chalk](https://npm.io/package/chalk.md) 3.0.0
- [debug](https://npm.io/package/debug.md) 3.1.0
- [marked](https://npm.io/package/marked.md) 0.8.0
- [moment](https://npm.io/package/moment.md) 2.24.0
- [js-yaml](https://npm.io/package/js-yaml.md) 3.13.1
- [chokidar](https://npm.io/package/chokidar.md) 3.3.1
- [ecstatic](https://npm.io/package/ecstatic.md) 3.3.2
- [fs-extra](https://npm.io/package/fs-extra.md) 5.0.0
- [picomatch](https://npm.io/package/picomatch.md) 2.2.1
- [handlebars](https://npm.io/package/handlebars.md) 4.5.3
- [live-server](https://npm.io/package/live-server.md) 1.2.1
- [promised-handlebars](https://npm.io/package/promised-handlebars.md) 2.0.1

## Recent versions

- 0.1.27 (latest) — 2020-01-10
- 0.1.26 — 2020-01-08
- 0.1.25 — 2020-01-08
- 0.1.24 — 2020-01-07
- 0.1.23 — 2020-01-07
- 0.1.22 — 2019-06-11
- 0.1.21 — 2019-06-11
- 0.1.20 — 2019-06-10
- 0.1.19 — 2019-06-10
- 0.1.18 — 2019-06-05
- 0.1.17 — 2019-06-04
- 0.1.16 — 2019-04-02
- 0.1.15 — 2018-05-01
- 0.1.14 — 2018-05-01
- 0.1.13 — 2018-03-06
- … 10 more at https://npm.io/package/simple-site/versions

## README

# simple-site
[![Build Status](https://travis-ci.org/Schaltstelle/simple-site.svg?branch=master)](https://travis-ci.org/Schaltstelle/simple-site)
[![codecov](https://codecov.io/gh/Schaltstelle/simple-site/graph/badge.svg)](https://codecov.io/gh/Schaltstelle/simple-site)
[![License](https://img.shields.io/badge/License-Apache%202.0-yellowgreen.svg)](https://opensource.org/licenses/Apache-2.0)

A simple website generator.

## Usage
Install with `npm install -g simple-site`.

Run with `simple-site build`. 

## Function
Simple-site recursively processes all files in the current directory and outputs them into an output directory.
Depending on the file extension, different actions take place.
- `*.md` apply the contents to the given template (see below).
- `*.html` apply possibly existing handlebar `{{...}}` tags.
- all other files copied into the output directory without any processing.

## Templating
A simple .md file looks like this:
```yaml
title: Hello site!
author: Joe Doe
date: 2017-03-17
template: _templates/simple.html
---
Here some *markdown* content.
```
the corresponding template `simple.html` would be:
```html
<body>
    <h1>{{title}}</h1>
    {{date}}, {{author}}
    <br>
    {{{content}} 
</body>
```
{{...}} are [handlebars](http://handlebarsjs.com/) expressions which reference the data from the .md file.

## Configuration
Configuration parameters can be defined on the command line `simple-site build --outputDir=dist` or in a file named `_config.yaml`.
All parameters are available in handlebar tags.
The following parameters exist:

`outputDir` The output directory. Default: `output`

`exclude` File patterns that should excluded from processing (by default all files starting with _ or . are already excluded).

`watch` When present, all files are watched and processed on change, the output directory is served on port 8111.

## Plugins
All `.js` files in `_plugins` are read and processed at the begin of the process.

---
_Source: https://npm.io/package/simple-site · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
