{"id":26398394,"url":"https://github.com/kristianbinau/nuxt-maintenance-mode","last_synced_at":"2025-09-08T11:15:33.288Z","repository":{"id":274877824,"uuid":"924362264","full_name":"kristianbinau/nuxt-maintenance-mode","owner":"kristianbinau","description":"Nuxt module, that allows you to put your site into maintenance mode.","archived":false,"fork":false,"pushed_at":"2025-04-07T20:24:58.000Z","size":422,"stargazers_count":16,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-09-01T00:49:53.991Z","etag":null,"topics":["maintenance","nuxt","nuxt-module","typescript"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/@kristianbinau/nuxt-maintenance-mode","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kristianbinau.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-01-29T21:32:25.000Z","updated_at":"2025-08-31T16:02:35.000Z","dependencies_parsed_at":"2025-03-31T19:31:18.193Z","dependency_job_id":"b82fb574-1d99-4833-9058-cfe08a877452","html_url":"https://github.com/kristianbinau/nuxt-maintenance-mode","commit_stats":null,"previous_names":["kristianbinau/nuxt-maintenance-mode"],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/kristianbinau/nuxt-maintenance-mode","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kristianbinau%2Fnuxt-maintenance-mode","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kristianbinau%2Fnuxt-maintenance-mode/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kristianbinau%2Fnuxt-maintenance-mode/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kristianbinau%2Fnuxt-maintenance-mode/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kristianbinau","download_url":"https://codeload.github.com/kristianbinau/nuxt-maintenance-mode/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kristianbinau%2Fnuxt-maintenance-mode/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274174271,"owners_count":25235203,"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-08T02:00:09.813Z","response_time":121,"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":["maintenance","nuxt","nuxt-module","typescript"],"created_at":"2025-03-17T12:30:11.956Z","updated_at":"2025-09-08T11:15:33.245Z","avatar_url":"https://github.com/kristianbinau.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Maintenance Mode\n\n[![npm version][npm-version-src]][npm-version-href]\n[![npm downloads][npm-downloads-src]][npm-downloads-href]\n[![License][license-src]][license-href]\n[![Nuxt][nuxt-src]][nuxt-href]\n\nNuxt module, that allows you to put your site into maintenance mode.\n\n- [✨ \u0026nbsp;Release Notes](/CHANGELOG.md)\n- [🏀 Online playground](https://stackblitz.com/github/kristianbinau/nuxt-maintenance-mode?file=playground%2Fapp.vue)\n\u003c!-- - [📖 \u0026nbsp;Documentation](https://example.com) --\u003e\n\n## Features\n\n\u003c!-- Highlight some of the features your module provide here --\u003e\n\n- 📝 \u0026nbsp;Customizable maintenance page, by handling the 503 status code\n- 🏷️ \u0026nbsp;Define pages to be included, with wildcard support\n- 🔖 \u0026nbsp;Define pages to be excluded, with wildcard support\n- 🔑 \u0026nbsp;Define a secret to bypass the maintenance mode\n- 📦 \u0026nbsp;Build-in Composables, enabling customizing page based on maintenance state.\n- 🎨 \u0026nbsp;RuntimeConfig support\n- 🚀 \u0026nbsp;Typescript ready!\n\n## Quick Setup\n\nInstall the module to your Nuxt application with one command:\n\n```bash\nnpx nuxi module add @kristianbinau/nuxt-maintenance-mode\n```\n\nThat's it! You can now use Maintenance Mode in your Nuxt app ✨\n\n## Usage\n\nAdd the following configuration to your `nuxt.config.ts`:\n\n\u003csmall\u003e\u003ccode\u003enuxt.config.ts\u003c/code\u003e\u003c/small\u003e\n```ts\n  maintenanceMode: {\n    enabled: true,\n  }\n```\n\n## Options\n\n### `enabled`\n\n- Type: `boolean`\n- Default: `false`\n\nEnable or disable the maintenance mode.\n\n### `bypassSecret`\n\n- Type: `string | null`\n- Default: `null`\n\nDefine a secret to bypass the maintenance mode.  \nNavigate to `/?bypass={value}` to bypass the maintenance mode.\t\n\n### `include`\n\n- Type: `string[] | null`\n- Default: `null`\n\nDefine pages to be included in the maintenance mode. Supports wildcard `*`.\n\n### `exclude`\n\n- Type: `string[] | null`\n- Default: `null`\n\nDefine pages to be excluded from the maintenance mode. Supports wildcard `*`.\n\n\u003csmall\u003eWhen both `exclude` and `include` are set, `include` will take precedence\u003c/small\u003e\n\n#### Setting options via runtimeConfig\n\nYou can also set the options via runtimeConfig:  \n\u003csmall\u003eRuntimeConfig will take precedence over the options set in `nuxt.config.ts`\u003c/small\u003e\n\n\u003csmall\u003e\u003ccode\u003enuxt.config.ts\u003c/code\u003e\u003c/small\u003e\n```ts\n  runtimeConfig: {\n\t\tpublic: {\n      maintenanceModeEnabled: process.env.NUXT_PUBLIC_MAINTENANCE_MODE_ENABLED,\n\t\t},\n\t},\n```\n\n#### Composables\n\nThe module provides a composable, that allows you to customize your page based on the maintenance state.\n\n```ts\nconst url = useRequestURL();\nconst { isUnderMaintenance } = useMaintenance(url.pathname);\n```\n\nIn the example above, `isUnderMaintenance` will be `true` if the current page is under maintenance.  \nYou can also pass a custom path to the `useMaintenance` composable.\n\n```ts\nconst { isUnderMaintenance } = useMaintenance('/blog');\n```\n\n## Contribution\n\n\u003cdetails\u003e\n  \u003csummary\u003eLocal development\u003c/summary\u003e\n  \n  ```bash\n  # Install dependencies\n  npm install\n  \n  # Generate type stubs\n  npm run dev:prepare\n  \n  # Develop with the playground\n  npm run dev\n  \n  # Build the playground\n  npm run dev:build\n  \n  # Run ESLint\n  npm run lint\n  \n  # Run Vitest\n  npm run test\n  npm run test:watch\n  \n  # Release new version\n  npm run release\n  ```\n\n\u003c/details\u003e\n\n\u003c!-- Badges --\u003e\n\n[npm-version-src]: https://img.shields.io/npm/v/@kristianbinau/nuxt-maintenance-mode/latest.svg?style=flat\u0026colorA=020420\u0026colorB=00DC82\n[npm-version-href]: https://npmjs.com/package/@kristianbinau/nuxt-maintenance-mode\n[npm-downloads-src]: https://img.shields.io/npm/dm/@kristianbinau/nuxt-maintenance-mode.svg?style=flat\u0026colorA=020420\u0026colorB=00DC82\n[npm-downloads-href]: https://npm.chart.dev/@kristianbinau/nuxt-maintenance-mode\n[license-src]: https://img.shields.io/npm/l/@kristianbinau/nuxt-maintenance-mode.svg?style=flat\u0026colorA=020420\u0026colorB=00DC82\n[license-href]: https://npmjs.com/package/@kristianbinau/nuxt-maintenance-mode\n[nuxt-src]: https://img.shields.io/badge/Nuxt-020420?logo=nuxt.js\n[nuxt-href]: https://nuxt.com\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkristianbinau%2Fnuxt-maintenance-mode","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkristianbinau%2Fnuxt-maintenance-mode","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkristianbinau%2Fnuxt-maintenance-mode/lists"}