{"id":18090810,"url":"https://github.com/apsislabs/jekyll-tidy","last_synced_at":"2025-04-13T05:43:30.226Z","repository":{"id":56878953,"uuid":"52558541","full_name":"apsislabs/jekyll-tidy","owner":"apsislabs","description":"A gem for tidying Jekyll HTML output","archived":false,"fork":false,"pushed_at":"2020-07-14T13:56:53.000Z","size":41,"stargazers_count":42,"open_issues_count":4,"forks_count":5,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-13T05:42:44.896Z","etag":null,"topics":["gem","jekyll","ruby"],"latest_commit_sha":null,"homepage":null,"language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/apsislabs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-02-25T21:36:23.000Z","updated_at":"2024-01-15T09:14:07.000Z","dependencies_parsed_at":"2022-08-20T22:31:23.469Z","dependency_job_id":null,"html_url":"https://github.com/apsislabs/jekyll-tidy","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apsislabs%2Fjekyll-tidy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apsislabs%2Fjekyll-tidy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apsislabs%2Fjekyll-tidy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apsislabs%2Fjekyll-tidy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/apsislabs","download_url":"https://codeload.github.com/apsislabs/jekyll-tidy/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248670520,"owners_count":21142901,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["gem","jekyll","ruby"],"created_at":"2024-10-31T18:07:38.486Z","updated_at":"2025-04-13T05:43:30.192Z","avatar_url":"https://github.com/apsislabs.png","language":"Ruby","readme":"# Jekyll::Tidy\n\n[![Build Status](https://travis-ci.org/apsislabs/jekyll-tidy.svg?branch=master)](https://travis-ci.org/apsislabs/jekyll-tidy) [![Gem Version](https://badge.fury.io/rb/jekyll-tidy.svg)](https://badge.fury.io/rb/jekyll-tidy)\n\n`jekyll-tidy` is a plugin for tidying the HTML output of your Jekyll website, using either [`HtmlBeautifier`](https://github.com/threedaymonk/htmlbeautifier) or [`HtmlCompressor`](https://github.com/paolochiodi/htmlcompressor).\n\n## Usage\n\nUsage is straightforward.\n\n### via Bundler\n\nIf you have the gem Bundler installed, simply include the gem in your `Gemfile` under the `:jekyll_plugins` group:\n\n```ruby\ngroup :jekyll_plugins do\n  gem \"jekyll-tidy\"\nend\n```\nRun `bundle install` to install the plugin and its dependencies.\u003cbr/\u003e\nThe plugin will be automatically loaded the next time you run `bundle exec jekyll build` or `bundle exec jekyll serve`\n\n### via config file\n\nThe plugin-gem can also be loaded via the `_config.yml`\u003cbr/\u003e\nSimply add this gem to the `gems:` list (or `plugins:` list, if you're on Jekyll v3.5 and above.)\n\n```yaml\ngems:\n  - jekyll-tidy\n```\n\n## Configuration\n\n`jekyll-tidy` takes three configuration settings:\n\n  * `exclude` \u0026mdash; an array of files to exclude from tidying.\n  * `ignore_env` \u0026mdash; a `JEKYLL_ENV` string on which to skip tidying entirely.\n  * `compress_html` \u0026mdash; a flag for whether or not to compress the HTML output\n\n```yaml\njekyll_tidy:\n  exclude: [\"index.html\"]\n  ignore_env: development\n  compress_html: true  # or false\n```\n\n### exclude (default: [])\n\n`exclude` is an array of relative file paths that will be ignored by `jekyll-tidy`. Exclude must be set as an array, or it will cause errors.\n\n```yaml\njekyll_tidy:\n  exclude: [\"index.html\"]  # excludes only index.html\n```\n\n`exclude` can also take a glob of file paths.\u003cbr/\u003e\n**Note:** File globs need to be wrapped with `\"\"` when defining the array with square brackets.\n\n```yaml\njekyll_tidy:\n  exclude: [\"_posts/*.md\"]  # excludes all markdown files directly within the _posts directory.\n```\n\n```yaml\njekyll_tidy:\n  exclude:\n    - _posts/*.md     # excludes all markdown files directly within the _posts directory.\n    - _posts/**/*.md  # excludes all markdown files anywhere within the _posts directory\n```\n\n### compress_html (default: false)\n\nIf `compress_html` is set to `true` then `HtmlCompressor` will be used to tidy the markup.\nWhen set to `false`, `HtmlBeautifier` will be used to tidy the markup.\n\n**Note**: if you set the `compress_html` option to `true` and your templates have inline CSS or javascript, it will not be minified.\n\n### ignore_env (default: nil)\n\nIf `ignore_env` is set to a string, we will check the `JEKYLL_ENV` environment variable and skip tidying if it matches.\n\nSetting `_config.yml` with:\n\n```yaml\nignore_env: development\n```\n\nand then running jekyll server with:\n\n```sh\n$ JEKYLL_ENV=development jekyll serve\n```\n\nwill skip all tidying.\n\n## Development\n\nAfter checking out the repo, run `bin/setup` to install dependencies. Then, run `rake test` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.\n\nTo install this gem onto your local machine, run `bundle exec rake install`.\n\n## Contributing\n\nBug reports and pull requests are welcome on GitHub at https://github.com/apsislabs/jekyll-tidy.\n\n## License\n\nThe gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).\n\n---\n\n# Built by Apsis\n\n[![apsis](https://s3-us-west-2.amazonaws.com/apsiscdn/apsis.png)](https://www.apsis.io)\n\n`jekyll-tidy` was built by Apsis Labs. We love sharing what we build! Check out our [other libraries on Github](https://github.com/apsislabs), and if you like our work you can [hire us](https://www.apsis.io/work-with-us/) to build your vision.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fapsislabs%2Fjekyll-tidy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fapsislabs%2Fjekyll-tidy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fapsislabs%2Fjekyll-tidy/lists"}