{"id":13614807,"url":"https://github.com/next-theme/hexo-optimize","last_synced_at":"2025-06-29T13:04:04.238Z","repository":{"id":40790945,"uuid":"280636857","full_name":"next-theme/hexo-optimize","owner":"next-theme","description":"🚩 A Hexo plugin that optimize the pages loading speed, written in Rust","archived":false,"fork":false,"pushed_at":"2025-03-31T14:56:36.000Z","size":2056,"stargazers_count":16,"open_issues_count":2,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-04T10:56:51.969Z","etag":null,"topics":["hexo","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/next-theme.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2020-07-18T10:53:06.000Z","updated_at":"2025-03-31T14:56:39.000Z","dependencies_parsed_at":"2024-05-17T21:45:03.898Z","dependency_job_id":"33e7ef38-c9de-4b60-942f-1c6ea12f6c87","html_url":"https://github.com/next-theme/hexo-optimize","commit_stats":{"total_commits":129,"total_committers":8,"mean_commits":16.125,"dds":0.2945736434108527,"last_synced_commit":"4af6b49630e6e34586020e20d4b8e2672a1b5c78"},"previous_names":[],"tags_count":23,"template":false,"template_full_name":null,"purl":"pkg:github/next-theme/hexo-optimize","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/next-theme%2Fhexo-optimize","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/next-theme%2Fhexo-optimize/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/next-theme%2Fhexo-optimize/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/next-theme%2Fhexo-optimize/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/next-theme","download_url":"https://codeload.github.com/next-theme/hexo-optimize/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/next-theme%2Fhexo-optimize/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260684178,"owners_count":23046103,"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-plugin"],"created_at":"2024-08-01T20:01:05.839Z","updated_at":"2025-06-29T13:04:04.205Z","avatar_url":"https://github.com/next-theme.png","language":"JavaScript","funding_links":[],"categories":["Plugins"],"sub_categories":["Hexo Plugins"],"readme":"# hexo-optimize\n\n[![Build Status][github-image]][github-url]\n[![npm-image]][npm-url]\n[![lic-image]](LICENSE)\n\nA hexo plugin that optimize the pages loading speed. It will automatically filter your blog files and make optimizations. For example:\n\n- Minify CSS, JS and HTML files\n- Inline specific CSS files (like `main.css`) directly into the html page to improve First Contentful Paint performance\n- Add content hash to static resource filenames (versioning) for better cache control\n\nIt will help you get a higher score in the [Google PageSpeed Insights](https://pagespeed.web.dev).\n\n## Installation\n\n![size-image]\n[![dm-image]][npm-url]\n[![dt-image]][npm-url]\n\n```bash\nnpm install hexo-optimize\n```\n\n## Usage\n\nActivate the plugin in hexo's `_config.yml` like this:\n```yml\nfilter_optimize:\n  enable: true\n  # static resource versioning\n  versioning: false\n  css:\n    # minify all css files\n    minify: true\n    excludes:\n    # use preload to load css elements dynamically\n    delivery:\n      - '@fortawesome/fontawesome-free'\n      - 'fonts.googleapis.com'\n    # make specific css content inline into the html page\n    inlines:\n      # support full path only\n      - css/main.css\n  js:\n    # minify all js files\n    minify: true\n    excludes:\n    # remove the comments in each of the js files\n    remove_comments: false\n  html:\n    # minify all html files\n    minify: true\n    excludes:\n  # set the priority of this plugin,\n  # lower means it will be executed first, default of Hexo is 10\n  priority: 12\n```\n\nThis plugin can be disabled by `NODE_ENV` in development to boost `hexo generate`:\n```\nexport NODE_ENV=development\n```\n\n## Comparison\n\nHere is a result from [GTmetrix](https://gtmetrix.com) to show you the changes between before and after. (Same web server located in Tokyo, Japan, vultr.com)\n\n* **Remove query strings from static resources** - let all the proxies could cache resources well. (https://gtmetrix.com/remove-query-strings-from-static-resources.html)\n* **Make fewer HTTP requests** - through combined the loaded js files into the one.\n* **Prefer asynchronous resources** - change the css delivery method using a script block instead of link tag.\n* And TODOs ...\n\n![Comparison](https://user-images.githubusercontent.com/980449/35233293-a8229c72-ffd8-11e7-8a23-3b8bc10d40c3.png)\n\n[github-image]: https://img.shields.io/github/actions/workflow/status/next-theme/hexo-optimize/linter.yml?branch=main\u0026style=flat-square\n[npm-image]: https://img.shields.io/npm/v/hexo-optimize.svg?style=flat-square\n[lic-image]: https://img.shields.io/npm/l/hexo-optimize?style=flat-square\n\n[size-image]: https://img.shields.io/github/languages/code-size/next-theme/hexo-optimize?style=flat-square\n[dm-image]: https://img.shields.io/npm/dm/hexo-optimize?style=flat-square\n[dt-image]: https://img.shields.io/npm/dt/hexo-optimize?style=flat-square\n\n[github-url]: https://github.com/next-theme/hexo-optimize/actions?query=workflow%3ALinter\n[npm-url]: https://www.npmjs.com/package/hexo-optimize\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnext-theme%2Fhexo-optimize","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnext-theme%2Fhexo-optimize","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnext-theme%2Fhexo-optimize/lists"}