JSPM

  • Created
  • Published
  • Downloads 8
  • Score
    100M100P100Q50560F
  • License MIT

HTML-based static site generator

Package Exports

  • @prpl/core
  • @prpl/core/package.json

Readme

PRPL

HTML-based static site generator implementing the PRPL pattern.

Why

  • No JavaScript required
  • No bundlers or config files
  • No underlying framework (e.g. React, Vue, Angular)
  • Standards based
  • Very, very fast

Install

npm init prpl or yarn init prpl

Usage

Use a <prpl> element to interpolate content in any HTML file.

Given this HTML file,

<!DOCTYPE html>
<prpl type="page" src="content/notes">
  <head></head>
  <body>
    <main>
      <h1>[title]</h1>
      [body]
    </main>
  </body>
</prpl>

and a markdown file with some metadata,

<!--
title: Hello world!
slug: /notes/my-first-note
date: 2020-11-26
description: This is my first note
categories: Misc
-->

This is my first note

the output is:

<!DOCTYPE html>
<head></head>
<body>
  <main>
    <h1>Hello World!</h1>
    <p>This is my first note</p>
  </main>
</body>