Skip to main content

Store some information encrypted in the source code and decrypt when building the site

Project description

MkDocs Placeholder Plugin

PyPI version License Python versions

This plugin allows you to store sensitive information in encrypted form it the source code. When you build the site, it is decrypted using a key you pass as an enviroment variable. This means only people with the key or access to the deployed website can access the information. It also prevents code scanning tools from checking the data you store encrypted.

Installation and usage

Installation and usage is described in more detail in docs/usage.md.

The quick summary is:

  1. Install it with pip:
    mkdocs-encrypt-source-plugin
    
  2. Add encrypt-source to the plugins list in mkdocs.yml.
  3. Generate an encryption/decryption key:
    echo -n | mkdocs-encrypt-source-cli -e -k "" >/dev/null
    
    And export the generated key as environment variable:
    export MKDOCS_ENCRYPT_SOURCE_KEY='WCFY7FJ2TlpXIG0nEqpSltXTAYB9gO3Ob6tS-psY9-s='
    
  4. Encrypt all values you want to encrypt with:
    echo -n "Value to encrypt" | mkdocs-encrypt-source-cli -e
    
    and put the output in your Markdown source files.
  5. Build the page with mkdocs serve and check that all encrypted values are correctly decrypted.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mkdocs_encrypt_source_plugin-0.0.1.tar.gz (5.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mkdocs_encrypt_source_plugin-0.0.1-py3-none-any.whl (6.7 kB view details)

Uploaded Python 3

File details

Details for the file mkdocs_encrypt_source_plugin-0.0.1.tar.gz.

File metadata

File hashes

Hashes for mkdocs_encrypt_source_plugin-0.0.1.tar.gz
Algorithm Hash digest
SHA256 511e58e72a5501b0aadaa8f8246d4f207798093f77ab577a0d4077d3809936e9
MD5 9b62ba13057a65bfbabdd60ee91834e8
BLAKE2b-256 9a541fa3d9e15185a707456214181fee38817e1ab393dc9538661f92de48684c

See more details on using hashes here.

File details

Details for the file mkdocs_encrypt_source_plugin-0.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for mkdocs_encrypt_source_plugin-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 b27ee5878177481e1cd4ab4c6be6d5e038999631d9fb59516dbf9286d489f688
MD5 6d61f981fccc76450546bab63cb8d3d2
BLAKE2b-256 6f72777da7d1b1f0403b2e5ced22ac8159865c9872885690e80c1a5f91cd4396

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page