All Projects → tyhopp → prpl

tyhopp / prpl

Licence: MIT License
A modular static site generator built for longevity

Programming Languages

typescript
32286 projects
javascript
184084 projects - #8 most used programming language
HTML
75241 projects
CSS
56736 projects
shell
77523 projects

Projects that are alternatives of or similar to prpl

Next.js
The React Framework
Stars: ✭ 78,384 (+178045.45%)
Mutual labels:  static-site-generator, ssg
plain
network .md into .html with plaintext files
Stars: ✭ 70 (+59.09%)
Mutual labels:  static-site-generator, ssg
Stencil
A toolchain for building scalable, enterprise-ready component systems on top of TypeScript and Web Component standards. Stencil components can be distributed natively to React, Angular, Vue, and traditional web developers from a single, framework-agnostic codebase.
Stars: ✭ 9,880 (+22354.55%)
Mutual labels:  static-site-generator, ssg
react-prpl-boilerplate
A simple boilerplate for learn PRPL pattern with React.
Stars: ✭ 23 (-47.73%)
Mutual labels:  prpl, prpl-pattern
frontman
💎 A Ruby-based static website generator
Stars: ✭ 103 (+134.09%)
Mutual labels:  static-site-generator, ssg
graphql-ssg
GraphQL data based Static Site Generator.
Stars: ✭ 30 (-31.82%)
Mutual labels:  static-site-generator, ssg
presta
Minimalist serverless framework for SSR, SSG, serverless APIs and more.
Stars: ✭ 89 (+102.27%)
Mutual labels:  static-site-generator, ssg
eleventy-plugin-cloudinary
An Eleventy shortcode that allows you to add an image from your cloudinary account
Stars: ✭ 28 (-36.36%)
Mutual labels:  static-site-generator, ssg
wordpress-scaffold
The scaffold for GRRR's WordPress Pro setup.
Stars: ✭ 16 (-63.64%)
Mutual labels:  static-site-generator, ssg
trailing-slash-guide
Understand and fix your static website trailing slash issues!
Stars: ✭ 255 (+479.55%)
Mutual labels:  static-site-generator, ssg
kerouac
Poetic static site generator for Node.js.
Stars: ✭ 80 (+81.82%)
Mutual labels:  static-site-generator, ssg
gisture
A minimal and flexible blog generator based on GitHub Gist.
Stars: ✭ 24 (-45.45%)
Mutual labels:  static-site-generator, ssg
contentz
Create Content, Get a Highly Optimized Website
Stars: ✭ 57 (+29.55%)
Mutual labels:  static-site-generator, ssg
next-plugin-preval
Pre-evaluate async functions during builds and import them like JSON
Stars: ✭ 174 (+295.45%)
Mutual labels:  ssg
soupault
Static website generator based on HTML element tree rewriting
Stars: ✭ 214 (+386.36%)
Mutual labels:  static-site-generator
logya
Logya is a static site generator written in Python designed to be easy to use and flexible.
Stars: ✭ 16 (-63.64%)
Mutual labels:  static-site-generator
template
Elder.js template project. It is part template, part tutorial. Dive in!
Stars: ✭ 101 (+129.55%)
Mutual labels:  static-site-generator
startbootstrap-stylish-portfolio-jekyll
Jekyll theme based on Stylish Portfolio Bootstrap theme
Stars: ✭ 20 (-54.55%)
Mutual labels:  static-site-generator
jigsaw-blog-template
Starter template for a blog, using Jigsaw by Tighten
Stars: ✭ 75 (+70.45%)
Mutual labels:  static-site-generator
tinystatic
A tiny static website generator which is flexible and easy to use
Stars: ✭ 36 (-18.18%)
Mutual labels:  static-site-generator

PRPL

PRPL is a modular static site generator built for longevity. It lets you interpolate content with a single HTML element.

Why?

All the static site generators I have tried have one or more of these problems:

  • Built on an underlying framework like React, Vue, etc.
  • Relies on complex build tools like Webpack, Babel, etc.
  • Depends on a massive tree of modules that force constant maintenance
  • Has interfaces, source code and documentation that cannot be understood in one sitting
  • Requires that your site source be organized in a way that looks nothing like your output
  • Forces a huge leap from hello world to a real world implementation

PRPL is my answer to these gripes.

Usage

PRPL transforms a directory of content into HTML via <prpl> tags:

Given this source HTML file:

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

and this content markdown file:

<!--
title: Hello world!
slug: /notes/my-first-note
-->

This is my first note

the output is:

<!DOCTYPE html>
<head>
  <title>Hello World!</title>
</head>
<body>
  <main>
    <h1>Hello World!</h1>
    <p>This is my first note</p>
  </main>
</body>
  • PRPL supports Node current and LTS versions
  • Run npx -y create-prpl@latest to clone the minimal starter and run it locally
  • See prpl.dev for full documentation, guides and design decisions

Features

  • HTML-based API compliant with web standards
  • Command line, CommonJS and ECMAScript module interfaces
  • Source code that is fully typed, explicitly commented and readable in one sitting
  • Library architecture for modular adoption
  • Minimally invasive, removable in seconds
  • Opt-out of client side JavaScript entirely
  • Define your own template syntax

Architecture

PRPL is structured as a library that consists of these modules:

Module Description
@prpl/core Core functions for content interpolation
@prpl/server Development server
@prpl/plugin-aws Plugin for working with AWS S3
@prpl/plugin-code-highlight Plugin for highlighting code blocks
@prpl/plugin-css-imports Plugin for resolving CSS imports
@prpl/plugin-html-imports Plugin for resolving HTML imports
@prpl/plugin-rss Plugin for generating RSS feeds
@prpl/plugin-sitemap Plugin for generating a sitemap
  • @prpl/core is the only required module for a site to interpolate content into HTML, others are optional
  • @prpl/server is easily replaced with other local development servers, you're not married to it if you use PRPL
  • Most modules have zero dependencies, and those that do have the fewest number practical

Development

Commands for developing PRPL modules.

In this repo root:

  • npm run bootstrap to install local module dependencies
  • npm run dev -- [PKG] to bundle a package in watch mode, e.g. npm run dev -- core to bundle core. One exception is client scripts in core, run npm run dev -- client instead

In your project root:

  • npm link @prpl/[PKG] from your project root to symlink to the globally linked module, e.g. npm link @prpl/core to link core
  • npm unlink -g @prpl/[PKG] to unlink when you're done

Testing

Tooling, CI and commands for testing PRPL modules.

  • All modules are tested with Cypress
  • Tests run in continuous integration via GitHub Actions when new PRs are opened or changes are made to the branch the PR is opened from
  • All modules are tested using both the CommonJS and ESM interfaces

To run tests locally:

  • Navigate to the tests/test-site directory
  • npm install to install dependencies for the test site
  • npm run dev:cjs or npm run dev:mjs to run the local development server
  • npm run test:open to open Cypress and select which test suites to run

Publishing

Tooling and commands for publishing PRPL modules.

This repo is a monorepo orchestrated with Lerna.

Before a new release is created with Lerna:

  • A newly created package must be published initially with npm publish --access public in the package root
  • All local changes must be committed first
  • The branch must be pushed to remote

To create a new release with Lerna:

  • npm run release:changed from the project root and follow the prompts
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].