jekyll-prettier
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:
-
prettieris more robust to various input HTML styles (for example, multi-line self-closing blocks) -
prettiersupports more languages -
prettierisn't a Ruby gem, so it needs to be installed manually
Installation
- If using Bundler (recommended); in Gemfile:
group :jekyll_plugins do
gem "jekyll-prettier"
end- Alternatively, in
_config.yml:
plugins:
- jekyll-prettier
Dependencies
Requires that prettier is installed and in the PATH.
Can be installed with npm:
npm install --global prettieror with Yarn:
yarn global add prettier