Sphinx Watermark
sphinx-watermark is an extension for Sphinx that enables watermarks for HTML output.
Full documentation: https://jokneemo.github.io/sphinx-watermark
Why a Fork?
Forked from kallimachos/sphinxmark
This fork was created primarily to remove the dependency on bottle, and to support updates to Sphinx v7, Docutils, and Pillow.
Some themes perform differently in newer version of Docutils. The main issues faced are html elements are changed between div, section, article, etc.
Sphinxmark only supported div elements and the configuration changes I made to support it were too expansive for a simple pull request. See below for all of the enhancements added.
What’s Different?
Removed bottle dependency
HTML element selection
Static png name to support spaces in text
Collection of fonts
See the fonts directory.
Customizable border
Installation
Install sphinx-watermark using pip:
$ pip3 install sphinx-watermark
Usage
Add sphinx-watermark to the list of extensions in conf.py:
extensions = ['sphinx_watermark']Enable and configure sphinx-watermark in conf.py. You only have to include the values you want to change from default.
Below is the bare-minimum config for an Internal Draft watermark:
watermark = { 'enabled': False, 'text': 'Internal\nDraft' }Below are the defaults for all options: (Notice that watermarks are disabled by default.)
watermark = { 'enabled': False, 'selector': { 'type': 'div', 'class': 'body' }, 'position': { 'margin': None, 'repeat': True, 'fixed': False }, 'image': None, 'text': { 'content': None, 'align': 'center', 'font': 'RubikDistressed', 'color': (255, 0, 0), 'opacity': 40, 'size': 100, 'rotation': 0, 'width': 816, 'spacing': 400, 'border': { 'outline': (255, 0, 0), 'fill': None, 'width': 10, 'padding': 30, 'radius': 20, } } }Build your docs as normal. The defined watermark should appear behind the text.
Metadata
Release files for sphinx-watermark 2.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| sphinx-watermark-2.0.0.tar.gz | 987.5 kB | Without provenance | Details for sphinx-watermark-2.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| sphinx_watermark-2.0.0-py2.py3-none-any.whl | Python 3, Python 2 | none | any | Details for sphinx_watermark-2.0.0-py2.py3-none-any.whl |
Total release size: 2.0 MB
Release files / sphinx-watermark-2.0.0.tar.gz
| Download URL | sphinx-watermark-2.0.0.tar.gz |
|---|---|
| Size | 987.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e5bbe1e1d5b3afee6df86209131fe6966cbca254537c135130f186e25d29039d
|
|
BLAKE2b-256 checksum How to use checksums |
3ec9ca281b73ac90caf6fae2e473cb4dec7ea5f19c74b0b851fb8c92550076d7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.9.2
|
Release files / sphinx_watermark-2.0.0-py2.py3-none-any.whl
| Download URL | sphinx_watermark-2.0.0-py2.py3-none-any.whl |
|---|---|
| Size | 986.3 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
5ad45f4d0383b6c4e4e5a94238fc628504666b5a95eb7095d686b65043dd0225
|
|
BLAKE2b-256 checksum How to use checksums |
99605176fd1d4ed9ccbfe4cc741e93c396499d265a25e6d549c44e718c5d21cf
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.9.2
|
Security for sphinx-watermark 2.0.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.