JSPM

  • Created
  • Published
  • Downloads 15
  • Score
    100M100P100Q72476F
  • License MIT

HTML-based static site generator

Package Exports

  • @prpl/core

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@prpl/core) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

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>