Package: mkdocs-annexes-integration
mkdocs-annexes-integrationThis is a plugin that transforms annex files into images or code blocks to be integrated in Markdown pages for MkDocs.SetupBefore installingBefore installing this plugin you need to installpoppler-utilsas it is used bypdf2imagethat is required to use this plugin.Install on Linux :Note:It depend on your Linux OSsudoapt-getinstallpoppler-utilssudoyuminstallpoppler-utilsInstall on MacOS :brewinstallpopplerInstall 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-integrationConfigYou need to activate the plugin inmkdocs.yml:plugins:-annexes-integration:annexes:# Required (at least 1)-Title of the annex A1:path/A/to/an/annex1.pdf# A 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 code file annex:src:../src/path/to/a/code/file.pydest:dest/path/to/a/code/file.py-Title of the code directory annex:src:../src/path/to/a/code/directorydest:dest/path/to/a/code/directory# others annexes...temp_dir:"folder_name"# Optional --> Default : temp_annexesenabled_if_env:ENABLE_ANNEXES_INTEGRATION# OptionalAs 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 todocs_dir, though.Set at least one 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.ymlannexes- A list of all the annexes documents. The path fromdocs_dirto an annex file or directory associated to it's title. Each file in a directory will integrated in subsection of the same document with a heading 2 containing the relative path of the file from the given directory.temp_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.enabled_if_env- Setting this option will enable the build only if there is an environment variable set to 1. Integrations of PDF can slow down build process and it's pretty useful to be fast when doing modification to mkdocs files when doing mkdocs serve.UsageUsing the commandmkdocs buildormkdocs servewill trigger the plugin if it as been set correctly in config file.This plugin is intended to be used withmkdocs-with-pdfplugin but can be used as it is.SupportThis plugin currently support two type of files :PDF files: The plugin will convert each page of the PDF into images to be integrated on a pageCode files: The plugin will put the content of the code file into a codeblock to be integrated on a pageCurrently supported code files are :CSharp (.cs)CSS (.css)Dart (.dart)HTML (.html)Javascript (.js)JSON (.json)PHP (.php)Python (.py)LicenseThis project is under MIT license see:licensefile for more detail.See Alsogitlab repomkdocs websitemkdocs with-pdf plugin