{"id":13506719,"url":"https://github.com/GrabarzUndPartner/nuxt-page-generator-helper","last_synced_at":"2025-03-30T05:31:22.292Z","repository":{"id":37895684,"uuid":"237622187","full_name":"GrabarzUndPartner/nuxt-page-generator-helper","owner":"GrabarzUndPartner","description":"Generate your pages statically without using payload extractors.","archived":false,"fork":false,"pushed_at":"2024-04-11T15:31:45.000Z","size":18059,"stargazers_count":18,"open_issues_count":12,"forks_count":1,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-04-14T07:43:37.243Z","etag":null,"topics":["nuxt-module","nuxtjs","page","payload-extractor","routes","static-site-generator"],"latest_commit_sha":null,"homepage":"https://grabarzundpartner.github.io/nuxt-page-generator-helper/","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/GrabarzUndPartner.png","metadata":{"files":{"readme":"README-ADAPTER.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2020-02-01T13:55:00.000Z","updated_at":"2024-04-17T00:24:34.359Z","dependencies_parsed_at":"2024-02-25T12:28:25.436Z","dependency_job_id":"158b856d-17f5-437a-9039-21a90383deb8","html_url":"https://github.com/GrabarzUndPartner/nuxt-page-generator-helper","commit_stats":{"total_commits":257,"total_committers":4,"mean_commits":64.25,"dds":"0.44357976653696496","last_synced_commit":"b8ac43a57a9f0475f0f90b8f10208098ae43753e"},"previous_names":[],"tags_count":27,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GrabarzUndPartner%2Fnuxt-page-generator-helper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GrabarzUndPartner%2Fnuxt-page-generator-helper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GrabarzUndPartner%2Fnuxt-page-generator-helper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GrabarzUndPartner%2Fnuxt-page-generator-helper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/GrabarzUndPartner","download_url":"https://codeload.github.com/GrabarzUndPartner/nuxt-page-generator-helper/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245889023,"owners_count":20688904,"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":["nuxt-module","nuxtjs","page","payload-extractor","routes","static-site-generator"],"created_at":"2024-08-01T01:00:56.205Z","updated_at":"2025-03-30T05:31:19.729Z","avatar_url":"https://github.com/GrabarzUndPartner.png","language":"JavaScript","funding_links":[],"categories":["Uncategorized"],"sub_categories":["Uncategorized"],"readme":"\n# Adapter\n\n- [Adapter](#adapter)\n  - [Constants](#constants)\n    - [PATH](#path)\n  - [Functions](#functions)\n    - [_`async`_ getRoutes](#async-getroutes)\n    - [_`async`_ getRoute](#async-getroute)\n    - [_`async`_ getLayout](#async-getlayout)\n  - [Route](#route)\n\n## Constants\n\n### PATH\n\nType: `String`\n\nDefault: `__dirname`\n\n**Must be set (required)**\n\nThe `PATH` constant must be defined. Is needed for calling the adapter via the plugins.\n\n```javascript\nexport const PATH = __dirname;\n```\n\n## Functions\n\n### _`async`_ getRoutes\n\nGets all routes.\n\n**Arguments:**\n\n| Name           | Type            | Description                        |\n| -------------- | --------------- | ---------------------------------- |\n| locales        | `Array\u003cString\u003e` | Languages used (`['de', 'en', …]`) |\n| adapterOptions | `Object`        | Adapter-Options from `nuxt-config` |\n\n**Return:**\n\n```json\n[\n  {\n    \"path\": \"/index\",\n    \"data\" : {\n      \"de\": {…},\n      \"en\" : {…}\n    }\n  },\n  {\n    \"path\": \"/top-page\",\n    \"data\" : {\n      \"de\": {…},\n      \"en\" : {…}\n    }\n  },,\n  {\n    \"path\": \"/top-page/sub-page\",\n    \"data\" : {\n      \"de\": {…},\n      \"en\" : {…}\n    }\n  },\n  …\n]\n```\n\n### _`async`_ getRoute\n\nUsed by individual routes in development mode.\n\n**Arguments:**\n\n| Name           | Type            | Description                               |\n| -------------- | --------------- | ----------------------------------------- |\n| route          | `Object`        | Vue-Router Route                          |\n| path           | `String`        | Router Path without locale prefix (`/en`) |\n| defaultLocale  | `String`        | Default locale (`de`)                     |\n| locale         | `String`        | Current locale (`de`)                     |\n| locales        | `Array\u003cString\u003e` | Languages used (`['de', 'en', …]`)        |\n| adapterOptions | `Object`        | Adapter-Options from `nuxt-config`        |\n\n**Return:**\n\n```json\n{\n  \"path\": \"/index\",\n  \"data\" : {\n    \"de\": {},\n    \"en\" : {}\n  }\n}\n```\n\n### _`async`_ getLayout\n\nGets the layout data.\n\n\u003e Is used in the `nuxtServerInit` of the store to load layout specific data during the rendering \u003e process. (Example: Header, Footer or Cookie-Notification)\n\n**Arguments:**\n\n| Name           | Type            | Description                               |\n| -------------- | --------------- | ----------------------------------------- |\n| route          | `Object`        | Vue-Router Route                          |\n| path           | `String`        | Router Path without locale prefix (`/en`) |\n| defaultLocale  | `String`        | Default locale (`de`)                     |\n| locale         | `String`        | Current locale (`de`)                     |\n| locales        | `Array\u003cString\u003e` | Languages used (`['de', 'en', …]`)        |\n| adapterOptions | `Object`        | Adapter-Options from `nuxt-config`        |\n\n**Return:**\n\n```json\n{\n    \"de\": {},\n    \"en\" : {}\n}\n```\n\n---\n\n## Route\n\nThe route object describes a page that is rendered.\n\nA unique path describes the default path of the route, regardless of language variants.\n\n`data` contains the individual language blocks. These describe the respective interpretations of the page (url, title, content).\n\nAll described properties must be set.\n\n**Route**\n\n| Property | Description    |\n| -------- | -------------- |\n| `path`   | Route Name     |\n| `data`   | Language block |\n\n**Language block**\n\n| Property     | Description                                             |\n| ------------ | ------------------------------------------------------- |\n| `url`        | Route object for querying the `localPath` method (i18n) |\n| `title`      | Page title                                              |\n| `components` | Page components                                         |\n\n```json\n{\n  \"path\": \"/contact\",\n  \"data\": {\n    \"de\": {\n      \"url\": {\n        \"path\": \"/kontakt\"\n      },\n      \"title\": \"Kontakt\",\n      \"components\": [\n        {\n          \"component\": \"ComponentA\",\n          \"data\": {}\n        }\n      ]\n    },\n    \"en\": {\n      \"url\": {\n        \"path\": \"/contact\"\n      },\n      \"title\": \"Contact\",\n      \"components\": [\n        {\n          \"component\": \"ComponentB\",\n          \"data\": {}\n        }\n      ]\n    }\n  }\n}\n```\n\n**Component**\n\n| Property    | Description                                           |\n| ----------- | ----------------------------------------------------- |\n| `component` | Component name (relative to property `componentPath`) |\n| `data`      | Component Data (`props`)                              |\n\nExamples\n\n| Component Path                | Component Property Value |\n| ----------------------------- | ------------------------ |\n| `@component/ComponentA`       | `ComponentA`             |\n| `@component/sub/ComponentSub` | `sub/ComponentSub`       |\n\n```json\n{\n  \"components\": [\n    {\n      \"component\": \"ComponentA\",\n      \"data\": {}\n    }\n  ]\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FGrabarzUndPartner%2Fnuxt-page-generator-helper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FGrabarzUndPartner%2Fnuxt-page-generator-helper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FGrabarzUndPartner%2Fnuxt-page-generator-helper/lists"}