Plugin for revealing promo codes.
Project description
platzky-promocode
A platzky plugin that adds a click-to-reveal promo code button.
The promo code is never present as plain text in the page — it is base64-encoded and decoded client-side only on click.
Installation
pip install platzky_promocode
Configuration
Register the plugin in your platzky config:
{
"plugins": [
{
"name": "promocode",
"config": {
"text": "Reveal your discount",
"color": "#e63946"
}
}
]
}
| Field | Required | Default | Description |
|---|---|---|---|
text |
no | "Reveal Promo Code" |
Button label before reveal — a plain string, or a {locale: label} map for per-language labels |
color |
no | "#4caf50" |
Button background (any CSS color literal) |
Translated button labels
text can be a map of locale codes to labels instead of a single string. The label
matching the visitor's active locale is used, falling back to the first entry in the
map when there is no match:
{
"plugins": [
{
"name": "promocode",
"config": {
"text": {
"en": "Reveal Promo Code",
"pl": "Pokaż kod promocyjny",
"uk": "Показати промокод"
}
}
}
]
}
Usage in blog content
Embed the promo code directly in post content using the shortcode:
Get 20% off with code [promocode]SUMMER24[/promocode] — don't miss out!
An optional color attribute overrides the configured button colour:
Grab your [promocode color="#e91e63"]SAVE20[/promocode] before it expires!
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file platzky_promocode-0.3.3.tar.gz.
File metadata
- Download URL: platzky_promocode-0.3.3.tar.gz
- Upload date:
- Size: 11.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9f9602a2f0f97ebfbaa926a77a622667954b6a4c136663aec46c809778a9f973
|
|
| MD5 |
1428dbf07175256f2b947ad9fe7b70d5
|
|
| BLAKE2b-256 |
0aa0a2a228cbd75e65037849821b7864eec3d76fb788c9f64bb7333cf056a2d9
|
Provenance
The following attestation bundles were made for platzky_promocode-0.3.3.tar.gz:
Publisher:
release.yml on platzky/platzky-promocode
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
platzky_promocode-0.3.3.tar.gz -
Subject digest:
9f9602a2f0f97ebfbaa926a77a622667954b6a4c136663aec46c809778a9f973 - Sigstore transparency entry: 1754704188
- Sigstore integration time:
-
Permalink:
platzky/platzky-promocode@fca4c2aeffd4003dfcf74cfc3c75a97e5bf4456d -
Branch / Tag:
refs/heads/main - Owner: https://github.com/platzky
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@fca4c2aeffd4003dfcf74cfc3c75a97e5bf4456d -
Trigger Event:
push
-
Statement type:
File details
Details for the file platzky_promocode-0.3.3-py3-none-any.whl.
File metadata
- Download URL: platzky_promocode-0.3.3-py3-none-any.whl
- Upload date:
- Size: 15.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bcb572d2837689959e48e41b3e24405fb6b9fe25621d2cc1a180102faefc4f9f
|
|
| MD5 |
dc46271139f58d4f42fb3761ffab8764
|
|
| BLAKE2b-256 |
ad26cd7d74dc3b39fbc492ab7a42cbc0fa9a9c01b369625e1a072808abf6d3f6
|
Provenance
The following attestation bundles were made for platzky_promocode-0.3.3-py3-none-any.whl:
Publisher:
release.yml on platzky/platzky-promocode
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
platzky_promocode-0.3.3-py3-none-any.whl -
Subject digest:
bcb572d2837689959e48e41b3e24405fb6b9fe25621d2cc1a180102faefc4f9f - Sigstore transparency entry: 1754704209
- Sigstore integration time:
-
Permalink:
platzky/platzky-promocode@fca4c2aeffd4003dfcf74cfc3c75a97e5bf4456d -
Branch / Tag:
refs/heads/main - Owner: https://github.com/platzky
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@fca4c2aeffd4003dfcf74cfc3c75a97e5bf4456d -
Trigger Event:
push
-
Statement type: