Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
:bangbang: This is a fork of original comwes/mkpdfs-mkdocs-plugin
:exclamation: There could be many things that are not up-to-date, but at this moment (20.09.2023) this plugin should work.
It's a MkDocs plugin that export your documentation in a single PDF file
[][mkpdfsdoc]
The MkPDFs plugin will export yor documentation in your MkDocs repository as a PDF file using WeasyPrint.
Unlike other plugin where customizing the design of the generated PDF is complicated, this plugin brings the ability to completely control the design of the generated PDF.
What makes this plugin particular, is that:
The PDF version of the documentation will not be created if the used generated page content's is not enclosed in an <article>
tag or in a <div>
tag with property role="main"
.
Install the package with pip
:
pip3 install mkpdfs2-mkdocs
Enable the plugin in your mkdocs.yml
as folowing
plugins:
- search
- mkpdfs
or with options
plugins:
- search
- mkpdfs:
- company: The War Company Inc.
- author: Monsieur Silvestre
Note: If you enable this plugin and you don't have
plugins
entry in your MkDocs config file yet, you will need to explicitly enable thesearch
plugin. This plugin is enabled by default when noplugins
entry is set.
You can find further information about plugins in the MkDocs documentation.
When building or serving your documentation with mkdocs build
or mkdocs serve
, the following message will be displayed if everything wend smoothly:
The PDF version of the documentation has been generated.
This plugin supports following options to allow you better handle the customisation of the generated PDF.
Option | Description |
---|---|
author | The author of the document. This information will be printed on the cover page of the generated PDF. |
company | If this documentation is from a company, then you should provide this information. It will be displayed on the front page of the documentation, bellow the author information |
toc_title | The table of content title. The default value is Table of Contents |
toc_position | The position of the table of contents. This option supports 3 differents values: pre to put the toc at the beginning of the file but after the cover (the default value), post to put it at the end of the file or none to not generate it at all. |
output_path | The file name of the generated PDF, relative to the site_dir . By default this location is set to pdf/combined.pdf |
pdf_links | Create link to download the generated PDF to the top of each HTML page. By default this is enabled |
design | Relative to your MkDocs repository , this option is the location of the CSS file defining the layout of the generated PDF. If this option is not defined the default design will be used. Defining an non existing file will cause the build or serve failure. |
generate_html | Save the html from which the PDF is generated to be able to debug it in the browser. Default is False |
From reporting a bug to submitting a pull request, every contribution is appreciated and welcome. Report bugs, ask questions and request features using Github issues.
The idea of this plugin has raised while working on a project in the public sector. After many research I found some plugins that guided me to the current solution. They have inspired me a lot, so many thanks to:
FAQs
Allows the generation of the PDF version of your MkDocs documentation.
We found that mkpdfs2-mkdocs demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.