GithubHelp home page GithubHelp logo

mindcruzer / pelican-encrypt-content Goto Github PK

View Code? Open in Web Editor NEW
28.0 4.0 11.0 52 KB

a pelican plugin to password protect content

License: MIT License

Python 64.10% HTML 35.90%
pelican pelican-plugins security

pelican-encrypt-content's Introduction

Encrypt Pelican Content

This plugin allows you to have password protected articles and pages in Pelican. The content is encrypted with AES-256 in Python using PyCryptodome, and decrypted in the browser with Crypto-JS.

Installation

Refer to How to use plugins in the Pelican docs.

Quick summary

Pelican 4.5 switched to namespace packages for plugins. Run python setup.py install and Pelican will auto-detect the plugin.

Verify installation by running pelican-plugins. You should see something like:

-> Plugins found:
  | pelican.plugins.encrypt_content

Alternative method

Copy the pelican/plugins folder from this repository into the top level of your pelican project, then add the following to pelicanconf.py:

PLUGIN_PATHS = ['plugins']
PLUGINS = ['encrypt_content']

Settings

You can set a summary, as well as a title prefix to use for all encrypted articles. The default for both is a blank string.

In pelicanconf.py file:

ENCRYPT_CONTENT = {
    'title_prefix': '[Encrypted]',
    'summary': 'This content is encrypted.'
}

Usage

Inside your source file, just add the password of your choosing:

ex.

reStructuredText
That one time I robbed a bank 
###############################

:date: 1983-04-22
:tags: crime, banks, imabadass
:password: correcthorsebatterystaple
Markdown
Title: That one time I robbed a bank
Date: 1983-04-22
Tags: crime, banks, imabadass
Password: correcthorsebatterystaple

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.