0.1.27 • Published 5 years ago

simple-site v0.1.27

Weekly downloads
4
License
Apache-2.0
Repository
github
Last release
5 years ago

simple-site

Build Status codecov License

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:

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:

<body>
    <h1>{{title}}</h1>
    {{date}}, {{author}}
    <br>
    {{{content}} 
</body>

{{...}} are handlebars 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.

0.1.27

5 years ago

0.1.26

5 years ago

0.1.25

5 years ago

0.1.23

5 years ago

0.1.24

5 years ago

0.1.22

6 years ago

0.1.21

6 years ago

0.1.20

6 years ago

0.1.19

6 years ago

0.1.18

6 years ago

0.1.17

6 years ago

0.1.16

6 years ago

0.1.15

7 years ago

0.1.14

7 years ago

0.1.13

7 years ago

0.1.12

8 years ago

0.1.11

8 years ago

0.1.10

8 years ago

0.1.9

8 years ago

0.1.8

8 years ago

0.1.7

8 years ago

0.1.4

8 years ago

0.1.2

8 years ago

0.1.1

8 years ago

0.1.0

8 years ago