Record some of the more useful plugins in posthtml
Reference from posthtml documentation
Posthtml-pug
Convert Pug to HTML
Posthtml-md
Convert MD syntax to HTML syntax
Posthtml-retext
Convert natural languages according to rules (e.g. a specific string turns into a emoji expression)
Posthtml-head-elements
Generating the content of the head element with a JSON configuration
Posthtml-include
Introduction of HTML Fragments (for HTML modularity)
Posthtml-modules
Ditto, and she can achieve the effect of slots in Vue
Posthtml-inline-assets
The external CSS, JS, pictures, and other resources inline into the HTML
Posthtml-cache
Adds a random query parameter after a property value of a tag, such as
<script src="script.js"></script><!-- 处理后 --><script src="script.js?v=93ce_Ltuub"></script>
Posthtml-spaceless
Remove spaces between labels in a specified range
Posthtml-postcss
Use POSTCSS to manipulate styles within HTML (style labels and inline styles)
Posthtml-px2rem
Use Px2rem to handle style tags and inline styles within HTML
Posthtml-inline-css
You can make inline styles in an external or style label style
Posthtml-collect-inline-styles
Inline styles can be extracted to the style label
Posthtml-style-to-file
Inline styles and style label styles can be extracted into separate files
Posthtml-color-shorthand-hex-to-six-digit
Converts an abbreviated hex color to a 6-character format
Posthtml-minifier
Compression
Htmlnano
Ditto
Posthtml-remove-attributes
To remove a specified property based on a property name or value
Posthtml-remove-tags
Remove a label of the specified name
Posthtml-remove-duplicates
Delete exactly the same label based on the tag name
Posthtml-transfomer
1. Add tags to the contents of the script or link tag that references the external file, inline HTML
2. Remove tags from tags
3. Tag multiple references to the contents of the script or link tag of the external file, inline inside the same tag within the HTML
Posthtml-tidy
Tidy up HTML, clean up useless tags
Some of the useful plugins in posthtml