@blanklever/pnutbutter-eleventy
v0.1.0
Published
11ty plugin for pNutButter privacy layer.
Downloads
13
Readme
@pnutbutter/eleventy
A privacy layer plugin for Eleventy (11ty) static sites. Easily separate public and private content, with support for password-protected private output and seamless integration with the pNutButter ecosystem.
Features
- Classify content as
publicorprivateusing frontmatter - Outputs public content to
/posts/and private content to/private/ - Works with Netlify password protection
- Simple integration with any 11ty project
- Part of the pNutButter privacy monorepo (see docs)
Installation
npm install @pnutbutter/eleventyUsage
Edit your .eleventy.js:
const pNutButter = require('@pnutbutter/eleventy');
module.exports = function(eleventyConfig) {
eleventyConfig.addPlugin(pNutButter);
// ...existing config...
};Add privacy: 'private' to the frontmatter of any markdown file you want to protect:
---
title: My Secret Post
privacy: 'private'
---
This is private content.Output
- Public content →
/posts/ - Private content →
/private/(password protected with Netlify)
More
For questions or feedback, see the User Feedback section in the main docs.
