{"id":18388340,"url":"https://github.com/cecilapp/theme-pwa","last_synced_at":"2025-09-12T08:45:28.292Z","repository":{"id":41863282,"uuid":"510386616","full_name":"Cecilapp/theme-pwa","owner":"Cecilapp","description":"The PWA component theme for Cecil provides helpers to implement a Web manifest and a service worker to turn a website into a Progressive Web App.","archived":false,"fork":false,"pushed_at":"2025-08-06T15:16:22.000Z","size":334,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-08-19T06:40:21.456Z","etag":null,"topics":["cecil","cecil-theme-component","pwa","service-worker"],"latest_commit_sha":null,"homepage":"https://cecil.app/themes/components/","language":"Twig","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"Cecilapp/theme-serviceworker","license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Cecilapp.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},"funding":{"github":"ArnaudLigny","open_collective":"cecil"}},"created_at":"2022-07-04T14:14:52.000Z","updated_at":"2025-08-06T15:16:11.000Z","dependencies_parsed_at":null,"dependency_job_id":"dd4b1f37-f95b-4e14-846b-f820268c72e7","html_url":"https://github.com/Cecilapp/theme-pwa","commit_stats":{"total_commits":157,"total_committers":2,"mean_commits":78.5,"dds":"0.16560509554140124","last_synced_commit":"31c7e01bd4aa170f3fa418499f9e7b966e9b01de"},"previous_names":[],"tags_count":120,"template":false,"template_full_name":null,"purl":"pkg:github/Cecilapp/theme-pwa","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Cecilapp%2Ftheme-pwa","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Cecilapp%2Ftheme-pwa/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Cecilapp%2Ftheme-pwa/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Cecilapp%2Ftheme-pwa/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Cecilapp","download_url":"https://codeload.github.com/Cecilapp/theme-pwa/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Cecilapp%2Ftheme-pwa/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274783808,"owners_count":25349085,"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","status":"online","status_checked_at":"2025-09-12T02:00:09.324Z","response_time":60,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["cecil","cecil-theme-component","pwa","service-worker"],"created_at":"2024-11-06T01:33:47.910Z","updated_at":"2025-09-12T08:45:28.278Z","avatar_url":"https://github.com/Cecilapp.png","language":"Twig","funding_links":["https://github.com/sponsors/ArnaudLigny","https://opencollective.com/cecil"],"categories":[],"sub_categories":[],"readme":"# PWA component theme\n\nThe _PWA_ component theme for [Cecil](https://cecil.app) provides helpers to implement a [Web manifest](https://developer.mozilla.org/docs/Web/Manifest) and a [service worker](https://developer.mozilla.org/docs/Web/API/Service_Worker_API) to turn a website into a [Progressive Web App](https://web.dev/explore/progressive-web-apps).\n\n## Features\n\n- Generated and configurable **Web manifest**\n- Generated and configurable **service worker**\n- **Automatic caching** of visited resources\n- **No dependencies**, vanilla JavaScript\n- **Precaching** of assets and published pages\n- **Offline support** and image placeholder\n- Custom **install button** support instead of browser prompt\n\n## Prerequisites\n\n- A [Cecil](https://cecil.app) website\n- A [supported browser](https://caniuse.com/serviceworkers)\n- HTTPS\n\n## Installation\n\n```bash\ncomposer require cecil/theme-pwa\n```\n\n\u003e Or [download the latest archive](https://github.com/Cecilapp/theme-pwa/releases/latest/) and uncompress its content in `themes/pwa`.\n\n## Usage\n\nAdd `pwa` in the `theme` section of the `config.yml`:\n\n```yaml\ntheme:\n  - pwa\n```\n\nAdd the following line in the HTML `\u003cheader\u003e` of the main template:\n\n```twig\n{{ include('partials/pwa.html.twig', {site}, with_context = false) }}\n```\n\n### Web manifest\n\nConfigure [web manifest](https://developer.mozilla.org/docs/Web/Manifest) options:\n\n```yaml\nmanifest:\n  background_color: '#FFFFFF'\n  theme_color: '#202020'\n  icons:\n    - icon-192x192.png\n    - icon-512x512.png\n    - src: icon-192x192-maskable.png\n      purpose: maskable\n    - src: icon-512x512-maskable.png\n      purpose: maskable\n```\n\n\u003e [!NOTE]\n\u003e The `icons` section is optional. If not provided, the theme will generate a default set of icons based on the `icon.png` file in the _assets_ directory of your website.\n\n\u003e [!TIP]\n\u003e Create your own [maskable icons](https://web.dev/articles/maskable-icon) with [Maskable.app](https://maskable.app/editor).\n\n#### Web manifest Optional\n\nAdd [shortcuts](https://developer.mozilla.org/docs/Web/Manifest/shortcuts) from the `main` menu entries:\n\n```yaml\nmanifest:\n  shortcuts: true\n```\n\nProvide [installer screenshots](https://developer.mozilla.org/docs/Web/Manifest/screenshots):\n\n```yaml\nmanifest:\n  screenshots:\n    - screenshots/desktop.png\n    - screenshots/mobile.png\n```\n\n### Service worker\n\nEnable the service worker:\n\n```yaml\nserviceworker:\n  enabled: true\n```\n\n#### Service worker Optional\n\nDisable browser install prompt, and use custom install button:\n\n```yaml\nserviceworker:\n  install:\n    prompt: false\n    button: '#install-button' # query selector\n```\n\n```html\n\u003cbutton id=\"install-button\" hidden\u003eInstall App\u003c/button\u003e\n```\n\nIcons are precached by default. To disable this behavior:\n\n```yaml\nserviceworker:\n  install:\n    precache:\n      icons: false\n```\n\nBy default all published pages are precached. To limit this number:\n\n```yaml\nserviceworker:\n  install:\n    precache:\n      pages:\n        limit: 10\n```\n\nSet list of precached assets:\n\n```yaml\nserviceworker:\n  install:\n    precache:\n      assets:\n        - logo.png\n```\n\nDisplay a snackbar on update and connection lost:\n\n```yaml\nserviceworker:\n  update:\n    snackbar: true\n  offline:\n    snackbar: true\n```\n\nDefine ignored paths:\n\n```yaml\nserviceworker:\n  ignore:\n    - name: 'cms'\n      path: '/admin'\n```\n\nDo not precache a specific page (through its front matter):\n\n```yaml\n---\nserviceworker:\n  precache: false\n---\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcecilapp%2Ftheme-pwa","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcecilapp%2Ftheme-pwa","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcecilapp%2Ftheme-pwa/lists"}