{"id":19669079,"url":"https://github.com/aispin/hexo-filter-cleanup","last_synced_at":"2025-04-29T00:30:52.635Z","repository":{"id":46200995,"uuid":"63479067","full_name":"mamboer/hexo-filter-cleanup","owner":"mamboer","description":"All in one. Minifier \u0026 Optimization plugin for Hexo","archived":false,"fork":false,"pushed_at":"2021-11-18T15:58:58.000Z","size":244,"stargazers_count":23,"open_issues_count":4,"forks_count":4,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-04-14T23:27:25.497Z","etag":null,"topics":["hexo","hexo-filter-cleanup","hexo-plugin"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/mamboer.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-07-16T11:04:05.000Z","updated_at":"2022-12-01T04:39:04.000Z","dependencies_parsed_at":"2022-09-26T17:01:34.309Z","dependency_job_id":null,"html_url":"https://github.com/mamboer/hexo-filter-cleanup","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mamboer%2Fhexo-filter-cleanup","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mamboer%2Fhexo-filter-cleanup/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mamboer%2Fhexo-filter-cleanup/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mamboer%2Fhexo-filter-cleanup/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mamboer","download_url":"https://codeload.github.com/mamboer/hexo-filter-cleanup/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224140547,"owners_count":17262690,"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":["hexo","hexo-filter-cleanup","hexo-plugin"],"created_at":"2024-11-11T16:38:53.192Z","updated_at":"2025-04-29T00:30:47.332Z","avatar_url":"https://github.com/mamboer.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Hexo-filter-cleanup\n\n[![npm version][npm-version-image]][download-url]\n[![NPM Dependencies][npm-dep-image]][npm-dep-url]\n[![NPM DevDependencies][npm-devdep-image]][npm-devdep-url]\n[![npm download][download-image]][download-url]\n\n[npm-version-image]: https://badge.fury.io/js/hexo-filter-cleanup.svg\n[npm-dep-image]: https://david-dm.org/mamboer/hexo-filter-cleanup.svg\n[npm-dep-url]: https://david-dm.org/mamboer/hexo-filter-cleanup\n[npm-devdep-image]: https://david-dm.org/mamboer/hexo-filter-cleanup/dev-status.svg\n[npm-devdep-url]: https://david-dm.org/mamboer/hexo-filter-cleanup?type=dev\n[download-image]: https://img.shields.io/npm/dm/hexo-filter-cleanup.svg?style=flat-square\n[download-url]: https://www.npmjs.com/package/hexo-filter-cleanup\n\n\u003e This project is inspired by [hexo-all-minifier](https://github.com/unhealthy/hexo-all-minifier).\n\nI completely re-wrote this hexo filter plugin because `hexo-all-minifier` has certain issues as below which sucks my hexo project on mac osx platform. Besides that i have added some other cool features like `useref` and `performance` improvements.\n\n- [submodule bug](https://github.com/unhealthy/hexo-all-minifier/issues/12)\n\nAll in one. Minifier \u0026 Optimization plugin for [Hexo](https://hexo.io).\n\n## Installation\n\n``` bash\n$ npm install hexo-filter-cleanup --save\n```\n\nor with yarn,\n\n```bash\nyarn add hexo-filter-cleanup\n```\n\n## Features\n\nIntegrate all the official minifier plugins of HEXO and some other optimization plugins:\n\n- [hexo-html-minifier](https://github.com/hexojs/hexo-html-minifier), which is based on [HTMLMinifier](https://github.com/kangax/html-minifier)\n- [hexo-clean-css](https://github.com/hexojs/hexo-clean-css), which is based on [clean-css](https://github.com/jakubpawlowicz/clean-css)\n- [hexo-uglify](https://github.com/hexojs/hexo-uglify), which is based on [UglifyJS](http://lisperator.net/uglifyjs/)\n- [hexo-imagemin](https://github.com/vseventer/hexo-imagemin), which is based on [imagemin](https://github.com/imagemin/imagemin)\n- [useref](https://www.npmjs.com/package/useref), let hexo parse build blocks in html files.\n- [favicons](https://github.com/haydenbleasel/favicons), generate favicons on the fly.\n\nThanks for their works.\n\n## Options\n\n``` yaml\nhfc_useref:\n  enable: true\n  concat: true\n  exclude: \n```\n- **enable** - Enable the plugin. Defaults to `true`.\n- **exclude**: Exclude files\n- **concat**: concat the referenced files automatically.\n\n----------\n\n``` yaml\nhfc_html:\n  enable: true\n  exclude: \n```\n- **enable** - Enable the plugin. Defaults to `true`.\n- **exclude**: Exclude files\n\n----------\n\n``` yaml\nhfc_css:\n  enable: true\n  exclude: \n    - '*.min.css'\n```\n- **enable** - Enable the plugin. Defaults to `true`.\n- **exclude**: Exclude files\n\n----------\n\n``` yaml\nhfc_js:\n  enable: true\n  mangle: true\n  compress:\n  exclude: \n    - '*.min.js'\n```\n- **enable** - Enable the plugin. Defaults to `true`.\n- **mangle**: Mangle file names\n- **compress**: Compress [options](https://www.npmjs.com/package/uglify-js#compress-options)\n- **exclude**: Exclude files\n\n----------\n\n```yaml\nhfc_img:\n  enable: true\n  interlaced: false\n  multipass: false\n  optimizationLevel: 2\n  pngquant: false\n  progressive: false\n  webp: true\n  webpQuality: 75\n  gifslice: true\n  jpegtran: true\n  jpegrecompress: false\n  jpegrecompressQuality: 'medium'\n  optipng: true\n  svgo: true\n```\n- **enable** - Enable the plugin. Defaults to `true`.\n- **interlaced** - Interlace gif for progressive rendering. Defaults to `false`.\n- **multipass** - Optimize svg multiple times until it’s fully optimized. Defaults to `false`.\n- **optimizationLevel** - Select an optimization level between 0 and 7. Defaults to `2`.\n- **pngquant** - Enable [imagemin-pngquant](https://github.com/imagemin/imagemin-pngquant) plugin. Defaults to `false`.\n- **progressive** - Lossless conversion to progressive. Defaults to `false`.\n\n```yaml\nhfc_favicons:\n  enable: true\n  src: img/logo.png\n  target: img/\n  html: true\n  opts: false\n  icons:\n    android: true\n    appleIcon: true\n    appleStartup: false\n    coast: false\n    favicons: true\n    firefox: false\n    opengraph: false\n    windows: true\n    yandex: false\n```\n- **enable** - Enable the plugin. Defaults to `true`.\n- **src** - Favicon file path.\n- **target** - Where we put the generated files. Defaults to `img` folder.\n- **html** - Whether generate the html data in the `_data` folder for further usage. Defaults to `true`. See [an example](https://github.com/o2team/o2team.github.io/tree/v2/themes/lattice/layout/_partial/common/favicons.swig).\n- **opts** - Extra [favicons configurations](https://github.com/itgalaxy/favicons). Defaults to `false`\n- **icons** - Icons configurations.\n\n## Debug Mode\n\nThe debug mode will disable all the optimizations.\n\nYou can active the debug mode by using hexo's `--debug` switch as below.\n\n```\nhexo s --watch --debug\n```\n\nTodo: Tests\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faispin%2Fhexo-filter-cleanup","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faispin%2Fhexo-filter-cleanup","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faispin%2Fhexo-filter-cleanup/lists"}