Post-render hooks for cleaning up Jekyll outputs with prettier
. Really basic
— this README is longer than the plugin itself.
Written as an alternative to
jekyll-tidy, which uses
htmlbeautifier
under-the-hood. Key distinctions:
prettier
is more robust to various input HTML styles (for example, multi-line self-closing blocks)prettier
supports more languagesprettier
isn't a Ruby gem, so it needs to be installed manually
- If using Bundler (recommended); in Gemfile:
group :jekyll_plugins do
gem "jekyll-prettier"
end
- Alternatively, in
_config.yml
:
plugins:
- jekyll-prettier
Requires that prettier is installed and in the PATH.
Can be installed with npm:
npm install --global prettier
or with Yarn:
yarn global add prettier