{"id":13563388,"url":"https://github.com/lavas-project/hexo-pwa","last_synced_at":"2025-09-12T08:37:56.904Z","repository":{"id":39673744,"uuid":"109655839","full_name":"lavas-project/hexo-pwa","owner":"lavas-project","description":"Hexo PWA plugin","archived":false,"fork":false,"pushed_at":"2021-06-14T09:54:50.000Z","size":36,"stargazers_count":135,"open_issues_count":6,"forks_count":17,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-12T04:13:43.336Z","etag":null,"topics":["hexo","hexo-plugin","pwa","service-worker"],"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/lavas-project.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":"2017-11-06T06:23:18.000Z","updated_at":"2025-04-05T05:09:57.000Z","dependencies_parsed_at":"2022-09-20T07:23:59.253Z","dependency_job_id":null,"html_url":"https://github.com/lavas-project/hexo-pwa","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lavas-project%2Fhexo-pwa","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lavas-project%2Fhexo-pwa/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lavas-project%2Fhexo-pwa/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lavas-project%2Fhexo-pwa/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lavas-project","download_url":"https://codeload.github.com/lavas-project/hexo-pwa/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248514201,"owners_count":21116903,"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","pwa","service-worker"],"created_at":"2024-08-01T13:01:18.688Z","updated_at":"2025-04-12T04:13:46.884Z","avatar_url":"https://github.com/lavas-project.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"# hexo-pwa\n\n[![NPM version](https://badge.fury.io/js/hexo-pwa.svg)](http://badge.fury.io/js/hexo-pwa) [![NPM Downloads](https://img.shields.io/npm/dm/hexo-pwa.svg?maxAge=3600)](https://www.npmjs.com/package/hexo-pwa)\n\n\nProgressive Web Apps (PWA) plugin for [Hexo](https://hexo.io/).\n\n`hexo-pwa` let Hexo sites have these two  capabilities.\n\n- [Web App Manifest](https://developer.mozilla.org/en-US/docs/Web/Manifest) - Users can add your site to mobile home screen\n- [Service Worker](https://developers.google.com/web/fundamentals/primers/service-workers/) - Make your site available offline\n\n## Installation\n\n```shell\n$ npm install --save hexo-pwa\n```\n\n## Options\n\nYou can configure this plugin in `_config.yml`.\n\n```yaml\npwa:\n  manifest:\n    path: /manifest.json\n    body:\n      name: hexo\n      short_name: hexo\n      icons:\n        - src: /images/android-chrome-192x192.png\n          sizes: 192x192\n          type: image/png\n        - src: /images/android-chrome-512x512.png\n          sizes: 512x512\n          type: image/png\n      start_url: /index.html\n      theme_color: '#ffffff'\n      background_color: '#ffffff'\n      display: standalone\n  serviceWorker:\n    path: /sw.js\n    preload:\n      urls:\n        - /\n      posts: 5\n    opts:\n      networkTimeoutSeconds: 5\n    routes:\n      - pattern: !!js/regexp /hm.baidu.com/\n        strategy: networkOnly\n      - pattern: !!js/regexp /.*\\.(js|css|jpg|jpeg|png|gif)$/\n        strategy: cacheFirst\n      - pattern: !!js/regexp /\\//\n        strategy: networkFirst\n  priority: 5\n```\n\n- manifest - manifest configuration\n\t- path - the path of `manifest.json`, eg: `/manifest.json`\n\t- body - the content of `manifest.json`,  [manifest.json example](https://developer.mozilla.org/en-US/docs/Web/Manifest). `body` can be null, if not null, `hexo-pwa` will generate `manifest.json` with `JSON.stringify(body)`\n- serviceWorker - service worker configuration\n\t- path: the path of `sw.js`, eg: `/sw.js`, you shouldn't put sw.js in subdirectory because of the [service worker scope](https://developers.google.com/web/ilt/pwa/introduction-to-service-worker#registration_and_scope)\n\t- preload - urls or posts that you want to preload\n\t\t- urls: an array of the preload urls\n\t\t- posts: the count of preload posts\n    - opts: the options for [sw-toolbox](https://googlechromelabs.github.io/sw-toolbox/api.html#options)\n\t- routes - request routes and strategies, based on [sw-toolbox](https://googlechromelabs.github.io/sw-toolbox/#main). **The routes order does matter**.\n\t\t- pattern: url pattern, this config can be express-style or RegExp\n\t\t- strategy: the strategy you want to choose. [All strategies](https://googlechromelabs.github.io/sw-toolbox/api.html#options): `cacheFirst`, `networkFirst`, `cacheOnly`, `networkOnly`, `fastest`. Caution: Log requests should use `networkOnly` strategy.\n- priority - [plugin priority](https://hexo.io/api/filter.html) (default value is 10)\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flavas-project%2Fhexo-pwa","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flavas-project%2Fhexo-pwa","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flavas-project%2Fhexo-pwa/lists"}