{"id":15681011,"url":"https://github.com/brycerussell/astro-pages","last_synced_at":"2026-03-06T09:02:43.884Z","repository":{"id":221469787,"uuid":"754468787","full_name":"BryceRussell/astro-pages","owner":"BryceRussell","description":"Add custom file based routing directories in Astro","archived":false,"fork":false,"pushed_at":"2024-12-10T00:29:25.000Z","size":313,"stargazers_count":20,"open_issues_count":3,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-09-13T00:10:05.936Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/BryceRussell.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":"2024-02-08T05:38:37.000Z","updated_at":"2025-08-13T23:21:06.000Z","dependencies_parsed_at":"2025-05-07T10:17:04.303Z","dependency_job_id":null,"html_url":"https://github.com/BryceRussell/astro-pages","commit_stats":null,"previous_names":["brycerussell/astro-pages"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/BryceRussell/astro-pages","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BryceRussell%2Fastro-pages","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BryceRussell%2Fastro-pages/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BryceRussell%2Fastro-pages/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BryceRussell%2Fastro-pages/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BryceRussell","download_url":"https://codeload.github.com/BryceRussell/astro-pages/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BryceRussell%2Fastro-pages/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30168608,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-06T07:56:45.623Z","status":"ssl_error","status_checked_at":"2026-03-06T07:55:55.621Z","response_time":250,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":[],"created_at":"2024-10-03T16:48:02.346Z","updated_at":"2026-03-06T09:02:43.825Z","avatar_url":"https://github.com/BryceRussell.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# `astro-pages`\n\n[![npm version](https://img.shields.io/npm/v/astro-pages?labelColor=red\u0026color=grey)](https://www.npmjs.com/package/astro-pages)\n[![readme](https://img.shields.io/badge/README-blue)](https://www.npmjs.com/package/astro-pages)\n\nAdd custom file based routing directories in Astro\n\n### Examples\n\n#### Astro Integration\n\n```ts\n// astro.config.mjs\nimport { defineConfig } from 'astro/config';\nimport pages from 'astro-pages';\n\nexport default defineConfig({\n  // Inject pages inside 'src/routes'\n  integrations: [ pages('routes') ],\n});\n```\n\n#### Standalone Utility\n\n```ts\n// package/index.ts\nimport type { AstroIntegration } from 'astro';\nimport { addPageDir } from 'astro-pages';\n\nexport default function(options): AstroIntegration {  \n  return {\n    name: 'astro-pages',\n    hooks: {\n      'astro:config:setup': ({ config, logger, injectRoute }) =\u003e {\n\n        const pageConfig = {\n          cwd: import.meta.url,\n          dir: 'pages',\n          config,\n          logger\n        }\n\n        const { \n          pages,\n          injectPages \n        } = addPageDir(pageConfig)\n\n        // Injects pages inside 'package/pages'\n        injectPages(injectRoute)\n\n      }\n    }\n  }\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrycerussell%2Fastro-pages","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbrycerussell%2Fastro-pages","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrycerussell%2Fastro-pages/lists"}