A MkDocs plugin transforming annexes files into images to be integrated in markdown pages
Project description
mkdocs-annexes-integration
This is a plugin that transforms annex files into images to be integrated in Markdown pages for MkDocs.
Setup
Before installing
Before installing this plugin you need to install poppler-utils
as it is used by pdf2image
that is required to use this plugin.
Install on Linux :
Note: It depend on your Linux OS
sudo apt-get install poppler-utils
sudo yum install poppler-utils
Install on MacOS :
brew install poppler
Install on Windows :
On Windows, you can download the latest binary release of Poppler from the official website and extract the files to a folder. Then, add the folder to the system's PATH environment variable.
Installing using pip:
pip install mkdocs-annexes-integrations
Config
You need to activate the plugin in mkdocs.yml
:
plugins:
- annexes-integrations:
- annexes: # Required (at least 1)
- Title of the annex A1: path/A/to/an/annex1.pdf # An path to an annex with it's title
- Title of the annex A2: path/A/to/an/annex2.pdf # Another path to an annex in same folder as the first
- Title of the annex B1: path/B/to/an/annex1.pdf # Another path to an annex but in different folder as the first two
- Title of the annex C1:
src: ../src/path/C/to/an/annex1.pdf
dest: dest/path/C/to/an/annex1.pdf
# ...
- temp_dir: "folder_name" # Optional --> Default : temp_annexes
As you can see, there are two possible ways to integrate an annex: using a simple path or a source path and a destination path. Both paths need to be relative to 'docs_dir', though.
Set at least on annex to use this plugin. If you don't have any annex don't add this plugin to the mkdocs plugins list in config file mkdocs.yml
annexes
- A list of all the annexes documents. The path from docs_dir to an annex file associated to it's titletemp_dir
- The temp directory used to generate markdown file for each annex before rendering to HTML. Only set this option if you already have a temp_annexes folder in the root directory (same as mkdocs.yml), which, you should not normally.
Usage
Using the command mkdocs build
or mkdocs serve
will trigger the plugin if it as been set correctly in config file.
This plugin is intended to be used with mkdocs-with-pdf
plugin but can be used as it is.
See Also
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
Hashes for mkdocs-annexes-integration-0.1.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | a1f34da06c212e34014c91e54df5f09b739d92f611216495b5389f52d70bfc83 |
|
MD5 | a6ca5e214774e305d1fa6f31dd848061 |
|
BLAKE2b-256 | 801275e3f3c64aafd26e39009fc3daf3d3f2e3cb83893e4667fc7bf29114762e |
Hashes for mkdocs_annexes_integration-0.1.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3e00af20fd8f72b9d16e598c8c023aba31a5ce6390c51a96ae33485fe39ba77a |
|
MD5 | 041e106bc899016c51d19bd69e054d4a |
|
BLAKE2b-256 | b70b5011d1d2b0f1424d533b0f1b9449b99d61550fb5990b0820962c28a87bd5 |