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.
mkdocs-minify-plugin
Advanced tools
An MkDocs plugin to minify HTML, JS or CSS files prior to being written to disk
An MkDocs plugin to minify HTML, JS or CSS files prior to being written to disk.
HTML minification is done using htmlmin2.
JS minification is done using jsmin.
CSS minification is done using csscompressor.
Install the plugin using pip:
pip install mkdocs-minify-plugin
Activate the plugin in mkdocs.yml
:
plugins:
- search
- minify:
minify_html: true
minify_js: true
minify_css: true
htmlmin_opts:
remove_comments: true
cache_safe: true
js_files:
- my/javascript/dir/file1.js
- my/javascript/dir/file2.js
css_files:
- my/css/dir/file1.css
- my/css/dir/file2.css
Note: If you have no
plugins
entry in your config file yet, you'll likely also want to add thesearch
plugin. MkDocs enables it by default if there is noplugins
entry set, but now you have to enable it explicitly.
minify_html
:
False
.minify_js
:
False
.True
, you must specify the JS to be minified files using js_files
(see below).minify_css
:
False
.True
, you must specify the CSS to be minified files using css_files
(see below).htmlmin_opts
:
None
.cache_safe
:
False
.True
, you must specify the files using js_files
or css_files
(see below).js_files
:
None
..min.js
in the output directory.css_files
:
None
..min.css
in the output directory.Note: When using
minify_js
orminify_css
, you don't have to modify theextra_javascript
orextra_css
entries in yourmkdocs.yml
file. The plugins automatically takes care of that. Bothminify_js
andminify_css
support the use of globs (e.g.**/*.css
).
FAQs
An MkDocs plugin to minify HTML, JS or CSS files prior to being written to disk
We found that mkdocs-minify-plugin 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.