记录一下 PostHtml 中的一些比较有用的插件

参考自PostHtml文档

posthtml-pug

将pug转化成html

posthtml-md

将md语法转化为html语法

posthtml-retext

根据规则转化自然语言(例如特定字符串转成emoji表情)

posthtml-head-elements

将JSON配置生成head元素内容

posthtml-include

引入html片段(实现html的模块化)

posthtml-modules

同上,而且她能实现vue中slot的效果

posthtml-inline-assets

将外部的css、js、图片等资源内联进html

posthtml-cache

在某标签的某属性值后增加随机查询参数,如

<script src="script.js"></script>
<!-- 处理后 -->
<script src="script.js?v=93ce_Ltuub"></script>

posthtml-spaceless

删除指定区域内标签之间的空格

posthtml-postcss

使用postcss处理html内的样式(style标签和内联样式)

posthtml-px2rem

在html内使用px2rem处理style标签和内联样式

posthtml-inline-css

可将外部样式或style标签内样式弄成内联样式

posthtml-collect-inline-styles

可将内联样式提取到style标签内

posthtml-style-to-file

可将内联样式和style标签内样式提取到独立文件内

posthtml-color-shorthand-hex-to-six-digit

将缩写的hex color转化成6个字符的格式

posthtml-minifier

压缩

htmlnano

同上

posthtml-remove-attributes

根据属性名或值去除指定属性

posthtml-remove-tags

去除指定名称的标签

Posthtml-remove-duplicates

根据标签名删除内容完全一样的标签

posthtml-transfomer

1.将标记的引用外部文件的script或link标签的内容,内联进html

2.将标记的标签删除

3.将标记的多个引用外部文件的script或link标签的内容,内联进html内的同一标签内

posthtml-tidy

整理html、清理无用的标签

最新文章

  1. TO BUY
  2. wamp下多域名配置问题
  3. Python爬虫爬取百度贴吧的帖子
  4. 笔记本win7共享WIFI
  5. 51Nod 1001 数组中和等于K的数对 Label:Water
  6. [java基础]循环结构2
  7. poj 1019
  8. cookie 暂时保存内容与恢复
  9. Swift构造器重载
  10. sea.js,spm学习
  11. win7系统64位安装oracle10g
  12. HDOJ 2689
  13. js中with、this的用法
  14. HDU 4882 ZCC Loves Codefires(贪心)
  15. poj 1948二维01背包
  16. 外观模式(Facade)
  17. IOS学习2——Xcode快捷键大全
  18. KeePass全网最详使用指南
  19. 报表嵌入到.net系统页面
  20. [HTML]js读取XML文件并解析

热门文章

  1. GRU-CTC中文语音识别
  2. JQuery+ajax数据加载..........
  3. Python3 Tkinter-Scrollbar
  4. Spring Boot(二)配置分析
  5. IIS7,IIS7.5 URL重写模块工具
  6. VS2012或VS2010 工具栏中无法显示DevExpress控件
  7. Swoole和Swoft的那些事 (Http/Rpc服务篇)
  8. 查询MySQL某字段相同值得重复数据
  9. query 获取本身的HTML
  10. 【Python】ORM框架SQLAlchemy的使用