0.3.0 • Published 5 years ago

ouais v0.3.0

Weekly downloads
6
License
GPL-3.0-or-later
Repository
github
Last release
5 years ago

Ouais Static Site Generator

Templating languages? No, ouais.

Design Goals

  1. Write markdown and YAML to HTML
  2. Use template functions (not templating languages)
  3. Support clean URLs

Install

npm install ouais

Usage

ouais --s 'src/md' --d 'build' --t 'your-template.js'

API

--s, --src Directory to read from (defaults to src/md)
--d, --dest Directory to write to (defaults to build)
--t, --template Template to apply
--c, --clean-urls Option to use clean URLs (defaults to true). Use 'false' to disable.

Example Markdown File

---
title: 'Whatever'
---
Lorem ipsum.

Example Template Function

// your-template.js
const yourTemplate = (html, metadata) => {
  const { title } = metadata
  return `<!DOCTYPE html>
<title>${title}</title>
<main>
  <h1>${title}</h1>
  ${html}
</main>
`
}

module.exports = yourTemplate