Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

posthtml

Package Overview
Dependencies
Maintainers
2
Versions
55
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

posthtml - npm Package Compare versions

Comparing version 0.16.5 to 0.16.6

10

package.json
{
"name": "posthtml",
"version": "0.16.5",
"version": "0.16.6",
"description": "HTML/XML processor",

@@ -26,8 +26,8 @@ "keywords": [

"dependencies": {
"posthtml-parser": "^0.10.0",
"posthtml-parser": "^0.11.0",
"posthtml-render": "^3.0.0"
},
"devDependencies": {
"@commitlint/cli": "^13.1.0",
"@commitlint/config-angular": "^13.1.0",
"@commitlint/cli": "^16.2.1",
"@commitlint/config-angular": "^16.2.1",
"c8": "^7.7.3",

@@ -40,3 +40,3 @@ "chai": "^4.3.4",

"jsdoc-to-markdown": "^7.0.1",
"lint-staged": "^11.1.1",
"lint-staged": "^12.3.4",
"mocha": "^9.0.3",

@@ -43,0 +43,0 @@ "standard": "^16.0.2"

@@ -351,477 +351,11 @@ [![NPM][npm]][npm-url]

## [Plugins](http://maltsev.github.io/posthtml-plugins)
## Plugins
In case you want to develop your own plugin, we recommend using [posthtml-plugin-starter][plugin] to get started.
- [posthtml-plugins](http://maltsev.github.io/posthtml-plugins)
- [awesome-posthtml](https://github.com/posthtml/awesome-posthtml)
[plugin]: https://github.com/posthtml/posthtml-plugin-starter
#### TEXT
| Name |Status|Description|
|:-----|:-----|:----------|
|[posthtml-md][md]|[![npm][md-badge]][md-npm]|Easily use context-sensitive markdown within HTML|
|[posthtml-toc][toc]|[![npm][toc-badge]][toc-npm]|Table of contents|
|[posthtml-lorem][lorem]|[![npm][lorem-badge]][lorem-npm]|Add lorem ipsum placeholder text to any document|
|[posthtml-retext][text]|[![npm][text-badge]][text-npm]|Extensible system for analysing and manipulating natural language|
|[prevent-widows][prevent-widows]|[![npm][prevent-widows-badge]][prevent-widows-npm]|Prevent widows from appearing at the end of paragraphs|
|[posthtml-richtypo][richtypo]|[![npm][richtypo-badge]][richtypo-npm]|Process HTML node text with Richtypo|
[md]: https://github.com/jonathantneal/posthtml-md
[md-badge]: https://img.shields.io/npm/v/posthtml-md.svg
[md-npm]: https://npmjs.com/package/posthtml-md
[toc]: https://github.com/posthtml/posthtml-toc
[toc-badge]: https://img.shields.io/npm/v/posthtml-toc.svg
[toc-npm]: https://npmjs.com/package/posthtml-toc
[text]: https://github.com/voischev/posthtml-retext
[text-badge]: https://img.shields.io/npm/v/posthtml-retext.svg
[text-npm]: https://npmjs.com/package/posthtml-retext
[lorem]: https://github.com/jonathantneal/posthtml-lorem
[lorem-badge]: https://img.shields.io/npm/v/posthtml-lorem.svg
[lorem-npm]: https://npmjs.com/package/posthtml-lorem
[prevent-widows]: https://github.com/bashaus/prevent-widows
[prevent-widows-badge]: https://img.shields.io/npm/v/prevent-widows.svg
[prevent-widows-npm]: https://npmjs.com/package/prevent-widows
[richtypo]: https://github.com/Grawl/posthtml-richtypo
[richtypo-badge]: https://img.shields.io/npm/v/posthtml-richtypo.svg
[richtypo-npm]: https://npmjs.com/package/posthtml-richtypo
#### HTML
|Name|Status|Description|
|:---|:----:|:----------|
|[posthtml-doctype][doctype]|[![npm][doctype-badge]][doctype-npm]|Set !DOCTYPE|
|[posthtml-head-elements][head]|[![npm][head-badge]][head-npm]|Include head elements from JSON file|
|[posthtml-include][include]|[![npm][include-badge]][include-npm]|Include HTML|
|[posthtml-modules][modules]|[![npm][modules-badge]][modules-npm]|Include and process HTML|
|[posthtml-extend][extend]|[![npm][extend-badge]][extend-npm]|Extend Layout (Pug-like)|
|[posthtml-extend-attrs][attrs]|[![npm][attrs-badge]][attrs-npm]|Extend Attrs|
|[posthtml-expressions][exp]|[![npm][exp-badge]][exp-npm]|Template Expressions|
|[posthtml-inline-assets][assets]|[![npm][assets-badge]][assets-npm]|Inline external scripts, styles, and images|
|[posthtml-static-react][react]|[![npm][react-badge]][react-npm]| Render custom elements as static React components|
|[posthtml-custom-elements][elem]|[![npm][elem-badge]][elem-npm]|Use custom elements|
|[posthtml-web-component][web]|[![npm][web-badge]][web-npm]|Web Component server-side rendering, Component as a Service (CaaS)|
|[posthtml-spaceless][spaceless]|[![npm][spaceless-badge]][spaceless-npm]|Remove whitespace between HTML tags|
|[posthtml-cache][cache]|[![npm][cache-badge]][cache-npm]|Add a nanoid to links in your tags|
|[posthtml-highlight][highlight]|[![npm][highlight-badge]][highlight-npm]|Syntax highlight code elements|
|[posthtml-pseudo][pseudo]|[![npm][pseudo-badge]][pseudo-npm]|Add pseudo selector class names to elements|
|[posthtml-noopener][noopener]|[![npm][noopener-badge]][noopener-npm]|Add rel="noopener noreferrer" to links that open in new tab|
|[posthtml-noscript][noscript]|[![npm][noscript-badge]][noscript-npm]|Insert noscript content when JavaScript is disabled|
|[posthtml-hash][hash]|[![npm][hash-badge]][hash-npm]|Hash static CSS/JS assets|
|[posthtml-insert-at][insert-at]|[![npm][insert-at-badge]][insert-at-npm]|Append/prepend HTML to a selector|
|[posthtml-plugin-remove-duplicates][plugin-remove-duplicates]|[![npm][plugin-remove-duplicates-badge]][plugin-remove-duplicates-npm]|Remove duplicated tags|
|[posthtml-plugin-link-preload][plugin-link-preload]|[![npm][plugin-link-preload-badge]][plugin-link-preload-npm]|Add preload/prefetch tags (or return equivalent headers)|
|[posthtml-prism][prism]|[![npm][prism-badge]][prism-npm]|Code syntax highlighting with Prism|
|[posthtml-url-parameters][url-parameters]|[![npm][url-parameters-badge]][url-parameters-npm]|Add parameters to URLs|
|[posthtml-safe-class-names][safe-class-names]|[![npm][safe-class-names-badge]][safe-class-names-npm]|Replace escaped characters in class names and CSS selectors|
|[posthtml-fetch][fetch]|[![npm][fetch-badge]][fetch-npm]|Fetch and render remote content|
|[posthtml-mso][mso]|[![npm][mso-badge]][mso-npm]|Makes it easy to write Outlook conditionals in HTML emails|
|[posthtml-postcss-merge-longhand][longhand]|[![npm][longhand-badge]][longhand-npm]|Merge longhand inline CSS into shorthand|
|[posthtml-markdownit][markdownit]|[![npm][markdownit-badge]][markdownit-npm]|Transform Markdown using markdown-it|
|[posthtml-extra-attributes][extra-attributes]|[![npm][extra-attributes-badge]][extra-attributes-npm]|Add new attributes to elements in your HTML|
|[posthtml-sri][sri]|[![npm][sri-badge]][sri-npm]|Adds subresource integrity (SRI) attributes.|
[cache]: https://github.com/posthtml/posthtml-cache
[cache-badge]: https://img.shields.io/npm/v/posthtml-cache.svg
[cache-npm]: https://npmjs.com/package/posthtml-cache
[spaceless]: https://github.com/posthtml/posthtml-spaceless
[spaceless-badge]: https://img.shields.io/npm/v/posthtml-spaceless.svg
[spaceless-npm]: https://npmjs.com/package/posthtml-spaceless
[doctype]: https://github.com/posthtml/posthtml-doctype
[doctype-badge]: https://img.shields.io/npm/v/posthtml-doctype.svg
[doctype-npm]: https://npmjs.com/package/posthtml-doctype
[head]: https://github.com/TCotton/posthtml-head-elements
[head-badge]: https://img.shields.io/npm/v/posthtml-head-elements.svg
[head-npm]: https://npmjs.com/package/posthtml-head-elements
[include]: https://github.com/posthtml/posthtml-include
[include-badge]: https://img.shields.io/npm/v/posthtml-include.svg
[include-npm]: https://npmjs.com/package/posthtml-include
[modules]: https://github.com/posthtml/posthtml-modules
[modules-badge]: https://img.shields.io/npm/v/posthtml-modules.svg
[modules-npm]: https://npmjs.com/package/posthtml-modules
[content]: https://github.com/posthtml/posthtml-content
[content-badge]: https://img.shields.io/npm/v/posthtml-content.svg
[content-npm]: https://npmjs.com/package/posthtml-content
[exp]: https://github.com/posthtml/posthtml-exp
[exp-badge]: https://img.shields.io/npm/v/posthtml-exp.svg
[exp-npm]: https://npmjs.com/package/posthtml-exp
[extend]: https://github.com/posthtml/posthtml-extend
[extend-badge]: https://img.shields.io/npm/v/posthtml-extend.svg
[extend-npm]: https://npmjs.com/package/posthtml-extend
[attrs]: https://github.com/theprotein/posthtml-extend-attrs
[attrs-badge]: https://img.shields.io/npm/v/posthtml-extend-attrs.svg
[attrs-npm]: https://npmjs.com/package/posthtml-extend-attrs
[assets]: https://github.com/jonathantneal/posthtml-inline-assets
[assets-badge]: https://img.shields.io/npm/v/posthtml-inline-assets.svg
[assets-npm]: https://npmjs.com/package/posthtml-inline-assets
[elem]: https://github.com/posthtml/posthtml-custom-elements
[elem-badge]: https://img.shields.io/npm/v/posthtml-custom-elements.svg
[elem-npm]: https://npmjs.com/package/posthtml-custom-elements
[web]: https://github.com/island205/posthtml-web-component
[web-badge]: https://img.shields.io/npm/v/posthtml-web-component.svg
[web-npm]: https://npmjs.com/package/posthtml-web-components
[prefix]: https://github.com/stevenbenisek/posthtml-prefix-class
[prefix-badge]: https://img.shields.io/npm/v/posthtml-prefix-class.svg
[prefix-npm]: https://npmjs.com/package/posthtml-prefix-class
[react]: https://github.com/rasmusfl0e/posthtml-static-react
[react-badge]: https://img.shields.io/npm/v/posthtml-static-react.svg
[react-npm]: https://npmjs.com/package/posthtml-static-react
[highlight]: https://github.com/caseyWebb/posthtml-highlight
[highlight-badge]: https://img.shields.io/npm/v/posthtml-highlight.svg
[highlight-npm]: https://npmjs.com/package/posthtml-highlight
[pseudo]: https://github.com/kevinkace/posthtml-pseudo
[pseudo-badge]: https://img.shields.io/npm/v/posthtml-pseudo.svg
[pseudo-npm]: https://npmjs.com/package/posthtml-pseudo
[noopener]: https://github.com/posthtml/posthtml-noopener
[noopener-badge]: https://img.shields.io/npm/v/posthtml-noopener.svg
[noopener-npm]: https://npmjs.com/package/posthtml-noopener
[noscript]: https://github.com/posthtml/posthtml-noscript
[noscript-badge]: https://img.shields.io/npm/v/posthtml-noscript.svg
[noscript-npm]: https://npmjs.com/package/posthtml-noscript
[hash]: https://github.com/posthtml/posthtml-hash
[hash-badge]: https://img.shields.io/npm/v/posthtml-hash.svg
[hash-npm]: https://npmjs.com/package/posthtml-hash
[insert-at]: https://github.com/posthtml/posthtml-insert-at
[insert-at-badge]: https://img.shields.io/npm/v/posthtml-insert-at.svg
[insert-at-npm]: https://npmjs.com/package/posthtml-insert-at
[plugin-remove-duplicates]: https://github.com/sithmel/posthtml-plugin-remove-duplicates
[plugin-remove-duplicates-badge]: https://img.shields.io/npm/v/posthtml-plugin-remove-duplicates.svg
[plugin-remove-duplicates-npm]: https://npmjs.com/package/posthtml-plugin-remove-duplicates
[plugin-link-preload]: https://github.com/sithmel/posthtml-plugin-link-preload
[plugin-link-preload-badge]: https://img.shields.io/npm/v/posthtml-plugin-link-preload.svg
[plugin-link-preload-npm]: https://npmjs.com/package/posthtml-plugin-link-preload
[prism]: https://github.com/posthtml/posthtml-prism
[prism-badge]: https://img.shields.io/npm/v/posthtml-prism.svg
[prism-npm]: https://npmjs.com/package/posthtml-prism
[url-parameters]: https://github.com/posthtml/posthtml-url-parameters
[url-parameters-badge]: https://img.shields.io/npm/v/posthtml-url-parameters.svg
[url-parameters-npm]: https://npmjs.com/package/posthtml-url-parameters
[safe-class-names]: https://github.com/posthtml/posthtml-safe-class-names
[safe-class-names-badge]: https://img.shields.io/npm/v/posthtml-safe-class-names.svg
[safe-class-names-npm]: https://npmjs.com/package/posthtml-safe-class-names
[fetch]: https://github.com/posthtml/posthtml-fetch
[fetch-badge]: https://img.shields.io/npm/v/posthtml-fetch.svg
[fetch-npm]: https://npmjs.com/package/posthtml-fetch
[mso]: https://github.com/posthtml/posthtml-mso
[mso-badge]: https://img.shields.io/npm/v/posthtml-mso.svg
[mso-npm]: https://npmjs.com/package/posthtml-mso
[longhand]: https://github.com/posthtml/posthtml-postcss-merge-longhand
[longhand-badge]: https://img.shields.io/npm/v/posthtml-postcss-merge-longhand.svg
[longhand-npm]: https://npmjs.com/package/posthtml-postcss-merge-longhand
[markdownit]: https://github.com/posthtml/posthtml-markdownit
[markdownit-badge]: https://img.shields.io/npm/v/posthtml-markdownit.svg
[markdownit-npm]: https://npmjs.com/package/posthtml-markdownit
[extra-attributes]: https://github.com/posthtml/posthtml-extra-attributes
[extra-attributes-badge]: https://img.shields.io/npm/v/posthtml-extra-attributes.svg
[extra-attributes-npm]: https://npmjs.com/package/posthtml-extra-attributes
[sri]: https://gitlab.com/abogical/posthtml-sri
[sri-badge]: https://img.shields.io/npm/v/posthtml-sri.svg
[sri-npm]: https://npmjs.com/package/posthtml-sri
#### CSS
|Name|Status|Description|
|:---|:-----|:----------|
|[posthtml-bem][bem]|[![npm][bem-badge]][bem-npm]|Support BEM naming in html structure|
|[posthtml-postcss][css]|[![npm][css-badge]][css-npm]|Use [PostCSS][css-gh] in HTML document|
|[posthtml-px2rem][px2rem]|[![npm][px2rem-badge]][px2rem-npm]|Change px to rem in Inline CSS|
|[posthtml-css-modules][css-modules]|[![npm][css-modules-badge]][css-modules-npm]|Use CSS modules in HTML|
|[posthtml-postcss-modules][postcss-modules]|[![npm][postcss-modules-badge]][postcss-modules-npm]|CSS Modules in html|
|[posthtml-classes][classes]|[![npm][classes-badge]][classes-npm]|Get a list of classes from HTML|
|[posthtml-prefix-class][prefix]|[![npm][prefix-badge]][prefix-npm]|Prefix class names
|[posthtml-modular-css][modular]|[![npm][modular-badge]][modular-npm]|Make CSS modular|
|[posthtml-inline-css][in]|[![npm][in-badge]][in-npm]|CSS Inliner|
|[posthtml-collect-styles][collect-styles]|[![npm][collect-styles-badge]][collect-styles-npm]|Collect styles from html and put it in the head|
|[posthtml-collect-inline-styles][collect]|[![npm][collect-badge]][collect-npm]|Collect inline styles and insert to head tag|
|[posthtml-style-expantion][style-expantion]|[![npm][style-expantion-badge]][style-expantion-npm]| PostHTML plugin expand link rel="stylesheet".|
|[posthtml-style-to-file][style]|[![npm][style-badge]][style-npm]| Save HTML style nodes and attributes to CSS file|
|[posthtml-color-shorthand-hex-to-six-digit][hex]|[![npm][hex-badge]][hex-npm]|Enforce all hex color codes to be 6-char long|
|[posthtml-minify-classnames][minify]|[![npm][minify-badge]][minify-npm]|Rewrites classnames and ids inside of html and css files to reduce file size.|
[bem]: https://github.com/rajdee/posthtml-bem
[bem-badge]: https://img.shields.io/npm/v/posthtml-bem.svg
[bem-npm]: https://npmjs.com/package/posthtml-bem
[css]: https://github.com/posthtml/posthtml-postcss
[css-badge]: https://img.shields.io/npm/v/posthtml-postcss.svg
[css-npm]: https://npmjs.com/package/posthtml-postcss
[css-gh]: https://github.com/postcss/postcss
[postcss-modules]: https://github.com/posthtml/posthtml-postcss-modules
[postcss-modules-badge]: https://img.shields.io/npm/v/posthtml-postcss-modules.svg
[postcss-modules-npm]: https://npmjs.com/package/posthtml-postcss-modules
[css-modules]: https://github.com/posthtml/posthtml-css-modules
[css-modules-badge]: https://img.shields.io/npm/v/posthtml-css-modules.svg
[css-modules-npm]: https://npmjs.com/package/posthtml-css-modules
[collect-styles]: https://github.com/posthtml/posthtml-collect-styles
[collect-styles-badge]: https://img.shields.io/npm/v/posthtml-collect-styles.svg
[collect-styles-npm]: https://npmjs.com/package/posthtml-collect-styles
[collect]: https://github.com/totora0155/posthtml-collect-inline-styles
[collect-badge]: https://img.shields.io/npm/v/posthtml-collect-inline-styles.svg
[collect-npm]: https://npmjs.com/package/posthtml-collect-inline-styles
[px2rem]: https://github.com/weixin/posthtml-px2rem
[px2rem-badge]: https://img.shields.io/npm/v/posthtml-px2rem.svg
[px2rem-npm]: https://npmjs.com/package/posthtml-px2rem
[classes]: https://github.com/rajdee/posthtml-classes
[classes-badge]: https://img.shields.io/npm/v/posthtml-classes.svg
[classes-npm]: https://npmjs.com/package/posthtml-classes
[prefix]: https://github.com/stevenbenisek/posthtml-prefix-class
[prefix-badge]: https://img.shields.io/npm/v/posthtml-prefix-class.svg
[prefix-npm]: https://npmjs.com/package/posthtml-prefix-class
[modular]: https://github.com/admdh/posthtml-modular-css
[modular-badge]: https://img.shields.io/npm/v/posthtml-modular-css.svg
[modular-npm]: https://npmjs.com/package/posthtml-modular-css
[in]: https://github.com/posthtml/posthtml-inline-css
[in-badge]: https://img.shields.io/npm/v/posthtml-inline-css.svg
[in-npm]: https://npmjs.com/package/posthtml-inline-css
[style-expantion]: https://github.com/renyamizuno/posthtml-style-expantion
[style-expantion-badge]: https://img.shields.io/npm/v/posthtml-style-expansion.svg
[style-expantion-npm]: https://npmjs.com/package/posthtml-style-expansion
[style]: https://github.com/posthtml/posthtml-style-to-file
[style-badge]: https://img.shields.io/npm/v/posthtml-style-to-file.svg
[style-npm]: https://npmjs.com/package/posthtml-style-to-file
[hex]: https://github.com/posthtml/posthtml-color-shorthand-hex-to-six-digit
[hex-badge]: https://img.shields.io/npm/v/posthtml-color-shorthand-hex-to-six-digit.svg
[hex-npm]: https://npmjs.com/package/posthtml-color-shorthand-hex-to-six-digit
[minify]: https://github.com/simonlc/posthtml-minify-classnames
[minify-badge]: https://img.shields.io/npm/v/posthtml-minify-classnames.svg
[minify-npm]: https://npmjs.com/package/posthtml-minify-classnames
#### IMG & SVG
|Name|Status|Description|
|:---|:-----|:----------|
|[posthtml-img-autosize][img]|[![npm][img-badge]][img-npm]|Auto setting the width and height of \<img\>|
|[posthtml-to-svg-tags][svg]|[![npm][svg-badge]][svg-npm]|Convert html tags to svg equivalents|
|[posthtml-webp][webp]|[![npm][webp-badge]][webp-npm]|Add WebP support for images|
|[posthtml-favicons][favicons]|[![npm][favicons-badge]][favicons-npm]|Generate Favicons and add related tags|
|[posthtml-inline-svg][inline-svg]|[![npm][inline-svg-badge]][inline-svg-npm]|Inline svg icons in HTML|
|[posthtml-inline-favicon][inline-favicon]|[![npm][inline-favicon-badge]][inline-svg-npm]|Inline favicons in HTML|
[img]: https://github.com/posthtml/posthtml-img-autosize
[img-badge]: https://img.shields.io/npm/v/posthtml-img-autosize.svg
[img-npm]: https://npmjs.com/package/posthtml-img-autosize
[svg]: https://github.com/theprotein/posthtml-to-svg-tags
[svg-badge]: https://img.shields.io/npm/v/posthtml-to-svg-tags.svg
[svg-npm]: https://npmjs.com/package/posthtml-to-svg-tags
[webp]: https://github.com/posthtml/posthtml-webp
[webp-badge]: https://img.shields.io/npm/v/posthtml-webp.svg
[webp-npm]: https://npmjs.com/package/posthtml-webp
[favicons]: https://github.com/mohsen1/posthtml-favicons
[favicons-badge]: https://img.shields.io/npm/v/posthtml-favicons.svg
[favicons-npm]: https://www.npmjs.com/package/posthtml-favicons
[inline-svg]: https://github.com/andrey-hohlov/posthtml-inline-svg
[inline-svg-badge]: https://img.shields.io/npm/v/posthtml-inline-svg.svg
[inline-svg-npm]: https://www.npmjs.com/package/posthtml-inline-svg
[inline-favicon]: https://github.com/posthtml/posthtml-inline-favicon
[inline-favicon-badge]: https://img.shields.io/npm/v/posthtml-inline-favicon.svg
[inline-favicon-npm]: https://www.npmjs.com/package/posthtml-inline-favicon
#### Accessibility
|Name|Status|Description|
|:---|:-----|:----------|
|[posthtml-aria-tabs][aria]|[![npm][aria-badge]][aria-npm]|Write accessible tabs with minimal markup|
|[posthtml-alt-always][alt]|[![npm][alt-badge]][alt-npm]|Always add alt attribute for images that don't have it|
|[posthtml-schemas][schemas]|[![npm][schemas-badge]][schemas-npm]| Add microdata to your HTML|
[alt]: https://github.com/ismamz/posthtml-alt-always
[alt-badge]: https://img.shields.io/npm/v/posthtml-alt-always.svg
[alt-npm]: https://npmjs.com/package/posthtml-alt-always
[aria]: https://github.com/jonathantneal/posthtml-aria-tabs
[aria-badge]: https://img.shields.io/npm/v/posthtml-aria-tabs.svg
[aria-npm]: https://npmjs.com/package/posthtml-aria-tabs
[schemas]: https://github.com/jonathantneal/posthtml-schemas
[schemas-badge]: https://img.shields.io/npm/v/posthtml-schemas.svg
[schemas-npm]: https://npmjs.com/package/posthtml-schemas
#### Optimization
|Name|Status|Description|
|:---|:-----|:----------|
|[posthtml-shorten][shorten]|[![npm][shorten-badge]][shorten-npm]|Shorten URLs in HTML|
|[posthtml-uglify][uglify]|[![npm][uglify-badge]][uglify-npm]|Shorten CSS in HTML|
|[posthtml-minifier][minifier]|[![npm][minifier-badge]][minifier-npm]|Minify HTML|
|[posthtml-remove-attributes][remove]|[![npm][remove-badge]][remove-npm]|Remove attributes unconditionally or with content match|
|[posthtml-remove-tags][remove-tags]|[![npm][remove-tags-badge]][remove-tags-npm]|Remove tags with content match|
|[posthtml-remove-duplicates][remove-duplicates]|[![npm][remove-duplicates-badge]][remove-duplicates-npm]|Remove duplicate elements from your html|
|[posthtml-transformer][transform]|[![npm][transform-badge]][transform-npm]|Process HTML by directives in node attrs, such as inline scripts and styles, remove useless tags, concat scripts and styles etc.|
|[htmlnano][nano]|[![npm][nano-badge]][nano-npm]|HTML Minifier|
|[posthtml-link-noreferrer][noreferrer]|[![npm][noreferrer-badge]][noreferrer-npm]|Add `rel="noopener"` and `rel="noreferrer"` to all links that contain the attribute `target="_blank"` |
|[posthtml-lazyload][lazyload]|[![npm][lazyload-badge]][lazyload-npm]|Add native lazyload attribute|
|[posthtml-postcss-treeshaker][posthtml-postcss-treeshaker]|[![npm][posthtml-postcss-treeshaker-badge]][posthtml-postcss-treeshaker-npm]|Tree shake styles for classes and ids in `style` tag|
|[posthtml-external-link][posthtml-external-link]|[![npm][posthtml-external-link-badge]][posthtml-external-link-npm]|Add `rel="external noopenner nofollow"` and `target="_blank"` to all external links|
[remove]: https://github.com/princed/posthtml-remove-attributes
[remove-badge]: https://img.shields.io/npm/v/posthtml-remove-attributes.svg
[remove-npm]: https://npmjs.com/package/posthtml-remove-attributes
[remove-tags]: https://github.com/posthtml/posthtml-remove-tags
[remove-tags-badge]: https://img.shields.io/npm/v/posthtml-remove-tags.svg
[remove-tags-npm]: https://npmjs.com/package/posthtml-remove-tags
[remove-duplicates]: https://github.com/canvaskisa/posthtml-remove-duplicates
[remove-duplicates-badge]: https://img.shields.io/npm/v/posthtml-remove-duplicates.svg
[remove-duplicates-npm]: https://npmjs.com/package/posthtml-remove-duplicates
[minifier]: https://github.com/Rebelmail/posthtml-minifier
[minifier-badge]: https://img.shields.io/npm/v/posthtml-minifier.svg
[minifier-npm]: https://npmjs.com/package/posthtml-minifier
[shorten]: https://github.com/Rebelmail/posthtml-shorten
[shorten-badge]: https://img.shields.io/npm/v/posthtml-shorten.svg
[shorten-npm]: https://npmjs.com/package/posthtml-shorten
[uglify]: https://github.com/Rebelmail/posthtml-uglify
[uglify-badge]: https://img.shields.io/npm/v/posthtml-uglify.svg
[uglify-npm]: https://npmjs.com/package/posthtml-uglify
[nano]: https://github.com/maltsev/htmlnano
[nano-badge]: https://img.shields.io/npm/v/htmlnano.svg
[nano-npm]: https://npmjs.com/package/htmlnano
[transform]: https://github.com/flashlizi/posthtml-transformer
[transform-badge]: https://img.shields.io/npm/v/posthtml-transformer.svg
[transform-npm]: https://npmjs.com/package/posthtml-transformer
[noreferrer]: https://github.com/webistomin/posthtml-link-noreferrer
[noreferrer-badge]: https://img.shields.io/npm/v/posthtml-link-noreferrer.svg
[noreferrer-npm]: https://www.npmjs.com/package/posthtml-link-noreferrer
[lazyload]: https://github.com/webistomin/posthtml-lazyload
[lazyload-badge]: https://img.shields.io/npm/v/posthtml-link-noreferrer.svg
[lazyload-npm]: https://www.npmjs.com/package/posthtml-lazyload
[posthtml-postcss-treeshaker]: https://github.com/anikethsaha/posthtml-postcss-treeshaker
[posthtml-postcss-treeshaker-badge]: https://img.shields.io/npm/v/posthtml-postcss-treeshaker.svg
[posthtml-postcss-treeshaker-npm]: https://img.shields.io/npm/v/posthtml-postcss-treeshaker.svg
[posthtml-external-link]: https://github.com/posthtml/posthtml-external-link
[posthtml-external-link-badge]: https://img.shields.io/npm/v/posthtml-external-link.svg
[posthtml-external-link-npm]: https://www.npmjs.com/package/posthtml-external-link
#### Workflow
|Name|Status|Description|
|:---|:-----|:----------|
|[posthtml-load-plugins][plugins]|[![npm][plugins-badge]][plugins-npm]|Autoload Plugins
|[posthtml-load-options][options]|[![npm][options-badge]][options-npm]|Autoload Options (Parser && Render)|
|[posthtml-load-config][config]|[![npm][config-badge]][config-npm]|Autoload Config (Plugins && Options)|
|[posthtml-w3c][w3c]|[![npm][w3c-badge]][w3c-npm]|Validate HTML with W3C Validation|
|[posthtml-hint][hint]|[![npm][hint-badge]][hint-npm]|Lint HTML with HTML Hint|
|[posthtml-tidy][tidy]|[![npm][tidy-badge]][tidy-npm]|Sanitize HTML with HTML Tidy|
[options]: https://github.com/posthtml/posthtml-load-options
[options-badge]: https://img.shields.io/npm/v/posthtml-load-options.svg
[options-npm]: https://npmjs.com/package/posthtml-load-options
[plugins]: https://github.com/posthtml/posthtml-load-plugins
[plugins-badge]: https://img.shields.io/npm/v/posthtml-load-plugins.svg
[plugins-npm]: https://npmjs.com/package/posthtml-load-plugins
[config]: https://github.com/posthtml/posthtml-load-config
[config-badge]: https://img.shields.io/npm/v/posthtml-load-config.svg
[config-npm]: https://npmjs.com/package/posthtml-load-config
[tidy]: https://github.com/michael-ciniawsky/posthtml-tidy
[tidy-badge]: https://img.shields.io/npm/v/posthtml-tidy.svg
[tidy-npm]: https://npmjs.com/package/posthtml-tidy
[hint]: https://github.com/posthtml/posthtml-hint
[hint-badge]: https://img.shields.io/npm/v/posthtml-hint.svg
[hint-npm]: https://npmjs.com/package/posthtml-hint
[w3c]: https://github.com/posthtml/posthtml-w3c
[w3c-badge]: https://img.shields.io/npm/v/posthtml-w3c.svg
[w3c-npm]: https://npmjs.com/package/posthtml-w3c
## Middleware
|Name|Status|Description|
|:---|:-----|:----------|
|[koa-posthtml][koa]|[![npm][koa-badge]][koa-npm]|Koa Middleware|
|[hapi-posthtml][hapi]|[![npm][hapi-badge]][hapi-npm]|Hapi Plugin|
|[express-posthtml][express]|[![npm][express-badge]][express-npm]|Express Middleware|
|[electron-posthtml][electron]|[![npm][electron-badge]][electron-npm]|Electron Plugin|
|[metalsmith-posthtml][metalsmith]|[![npm][metalsmith-badge]][metalsmith-npm]|Metalsmith Plugin|
[koa]: https://github.com/posthtml/koa-posthtml
[koa-badge]: https://img.shields.io/npm/v/koa-posthtml.svg
[koa-npm]: https://npmjs.com/package/koa-posthtml
[hapi]: https://github.com/posthtml/hapi-posthtml
[hapi-badge]: https://img.shields.io/npm/v/hapi-posthtml.svg
[hapi-npm]: https://npmjs.com/package/hapi-posthtml
[express]: https://github.com/posthtml/express-posthtml
[express-badge]: https://img.shields.io/npm/v/express-posthtml.svg
[express-npm]: https://npmjs.com/package/express-posthtml
[electron]: https://github.com/posthtml/electron-posthtml
[electron-badge]: https://img.shields.io/npm/v/electron-posthtml.svg
[electron-npm]: https://npmjs.com/package/electron-posthtml
[metalsmith]: https://github.com/posthtml/metalsmith-posthtml
[metalsmith-badge]: https://img.shields.io/npm/v/metalsmith-posthtml.svg
[metalsmith-npm]: https://npmjs.com/package/metalsmith-posthtml
## Maintainers

@@ -848,6 +382,2 @@

## Contributing
See [PostHTML Guidelines](plugins/guide.md) and [CONTRIBUTING](CONTRIBUTING.md).
## Contributors

@@ -863,7 +393,3 @@

## LICENSE
[MIT](LICENSE)
[npm]: https://img.shields.io/npm/v/posthtml.svg

@@ -870,0 +396,0 @@ [npm-url]: https://npmjs.com/package/posthtml

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc