A Sphinx extension that enables watermarks for HTML output.
Project description
sphinxmark is an extension for Sphinx that enables watermarks for HTML output.
Full documentation: https://kallimachos.github.io/sphinxmark/
Installation
Install sphinxmark using pip:
$ pip install sphinxmark
Usage
Add sphinxmark to the list of extensions in conf.py:
extensions = ['sphinxmark']
Specify a static directory in conf.py for your image files. If the path does not exist, the sphinxmark extension creates the directory and populates it with watermark.css and watermark-draft.png:
html_static_path = ['_static']
Configure sphinxmark in conf.py as required:
watermark_enable = True watermark_image = 'default' watermark_text = 'default' watermark_div = 'default' watermark_debug = False
Options
- watermark_enable (bool)
True enable watermarks
False disable watermarks
Default = False
Example:
watermark_enable = True
- watermark_image (string)
image file in _static directory to use as watermark
text selects the text-based watermark specified in watermark_text option
Default = watermark-draft.png (included DRAFT image)
Examples:
watermark_image = 'preview_mark.png'
watermark_image = 'text'
- watermark_text (string)
Text to use for watermark when text option is selected in watermark_image
Default = default
Example:
watermark_text = 'Preview'
- watermark_div (string)
CSS div where watermark is displayed
sphinxmark provides a template css file that uses the specified image as the watermark for any area defined as div.body by default. To use sphinxmark with themes that have the document body in a different div, specify the div using the watermark_div option.
Default = body (this works for default Sphinx theme)
Examples:
sphinx_rtd_theme -> watermark_div = 'document'
openstackdocstheme -> watermark_div = 'docs-body'
- watermark_debug (bool)
True enable debugging output during Sphinx build
False disable debugging output during Sphinx build
Default = False
Example:
watermark_debug = True
Project details
Release history Release notifications | RSS feed
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
Hashes for sphinxmark-0.1.3-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5af0344c0455aab68c3b4f76ceaa448cff95adde06ca4acab46d1173686c4ec2 |
|
MD5 | 386e3afbf47b6c7bbb123f5e2acfb85b |
|
BLAKE2b-256 | 89ac518b852efabe7ee6d443f343d53c09323c1c1178adfdb576a22b85dace52 |