Include this gem in your site’s Gemfile under the jekyll_plugins
group:
group :jekyll_plugins do
gem "jekyll-tidy-json"
end
Visit Jekyll documentation for a detailed description or more installation options.
This plugin’s behaviour is steered by "tidy_json" entry in site’s _config.yml
.
For example, following enables JSON prettifying:
tidy_json:
pretty: true
Available configuration options:
Option name | Description | Default setting |
---|---|---|
|
If set to |
|
|
Can be used to disable the plugin entirely by setting it to |
|
|
If set to |
|
This plugin is fairly complete. However, some enhancements would be welcome:
-
more options for pretty formatting
-
options for including/excluding JSON files
-
JSON sanitizing features, perhaps by integrating json-sanitizer by OWASP
-
support for some improved JSON syntax like JSON5 or Relaxed JSON if any of them gets popular enough
Bug reports and pull requests are welcome on GitHub at https://github.com/geolexica/jekyll-tidy-json.
This gem is developed, maintained and funded by Ribose Inc.