https://github.com/danielearwicker/zapata
Extremely minimal static site generator: handlebars + markdown + frontmatter
https://github.com/danielearwicker/zapata
Last synced: about 2 months ago
JSON representation
Extremely minimal static site generator: handlebars + markdown + frontmatter
- Host: GitHub
- URL: https://github.com/danielearwicker/zapata
- Owner: danielearwicker
- License: mit
- Created: 2019-12-15T13:57:37.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2022-07-07T14:59:13.000Z (almost 4 years ago)
- Last Synced: 2025-01-25T18:43:16.047Z (over 1 year ago)
- Language: CSS
- Size: 304 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# zapata
Extremely minimal static site generator: handlebars + markdown + frontmatter
# Installation
```
npm install -g zapata
```
# Usage
To create yourself a simple starting point, create a new directory, change to it and then run `zapata create`:
```
mkdir mysite
cd mysite
zapata create
```
You write posts (articles, pages) as markdown `.md` files in the `posts` directory. A single `template.html` file (in Handlebars format) is used to convert each post into an HTML page.
To generate the site as plain HTML:
```
zapata generate
```
This creates (or replaces) a sub-directory called `generated`. Everything is copied into `generated` (apart from the raw `template.html` and `posts`), so you can include images and `.css` resources and other pages required by your template.
Posts are converted to `.html` files at the root level.
The generated `index.html` file is just a redirector that switches to the latest post.
# Structure of a post
A post must start with a frontmatter section, which is a YAML object inside `---` lines:
```
---
title: The introductory page of this site
posted: 2019-12-14
author: Octavia Optimism
---
```
The `title` and `posted` properties are mandatory. Posts are sorted by the `posted` data (most recent first).
Any other properties you define are exposed to the template as an object called `data`.
# License
MIT