PostHTML hfill
PostHTML hfill lets you use contextual headings in HTML, like the proposed <h>
element.
<!-- before --> HeadingContent... Heading Content... X Heading Content... Heading Content... <!-- after --> HeadingContent... Heading Content... X Heading Content... Heading Content...
The default <x-h>
element is used to prevent stomping on the native namespace. This plugin is intended to produce contextual headings in JavaScript-free experiences, and may improve seach engine crawling. For dynamic usage, see hfill. For a CSS preprocessing option, see postcss-hfill.
Options
tag
Type: String
Default: "x-h"
The tag used by contextual headings.
Usage
Add PostHTML hfill to your build tool:
npm install posthtml-hfill --save-dev
Node
Use PostHTML hfill to process your HTML:
;
PostHTML
Add PostHTML to your build tool:
npm install posthtml --save-dev
Use PostHTML hfill as a plugin:
;
Gulp
Add Gulp PostHTML to your build tool:
npm install gulp-posthtml --save-dev
Use PostHTML hfill in your Gulpfile:
var posthtml = ; gulp;
Grunt
Add Grunt PostHTML to your build tool:
npm install grunt-posthtml --save-dev
Use PostHTML hfill in your Gruntfile:
grunt; grunt;