{"_id":"@a1local/astro-adpages","name":"@a1local/astro-adpages","dist-tags":{"latest":"0.1.0"},"versions":{"0.1.0":{"name":"@a1local/astro-adpages","version":"0.1.0","description":"Astro integration helpers for AdPages local SEO and landing-page QA.","type":"module","license":"MIT","author":{"name":"A1 Local","url":"https://a1local.com.au/"},"homepage":"https://github.com/a1local/astro-adpages#readme","repository":{"type":"git","url":"git+https://github.com/a1local/astro-adpages.git"},"bugs":{"url":"https://github.com/a1local/astro-adpages/issues"},"funding":{"type":"custom","url":"https://a1local.com.au/extensions/"},"publishConfig":{"access":"public"},"sideEffects":false,"main":"./dist/index.js","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"}},"scripts":{"build":"tsc -p tsconfig.json","lint":"tsc --noEmit -p tsconfig.json","prepublishOnly":"npm run build"},"keywords":["astro","astro-integration","local-seo","landing-pages","schema-org"],"devDependencies":{"typescript":"^5.9.3"},"gitHead":"0051b08e303680b1f851a3980ab4207b2b954405","_id":"@a1local/astro-adpages@0.1.0","_nodeVersion":"25.9.0","_npmVersion":"11.12.1","dist":{"integrity":"sha512-UG4t4e2RUFUEeBQtasbsGOdr/sudzaNtBLlZcr5JU02yDt2SffPKHgaIBFmdvlxKKNG30LiBp0dC6Y/THhZ5cQ==","shasum":"8ef2c596709c1fb8ca473fec09dd289266b7de71","tarball":"https://registry.npmjs.org/@a1local/astro-adpages/-/astro-adpages-0.1.0.tgz","fileCount":11,"unpackedSize":39292,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQCTfDSP2u2cYGyPJjOpV59zDMn+Hib16jIUuPJDb66ZjwIgXx/hA0ocfz12Jp4XhqwRN4iF6nhQxmXGtOUvGcI78sI="}]},"_npmUser":{"name":"a1local","email":"extensions@a1local.com.au"},"directories":{},"maintainers":[{"name":"a1local","email":"extensions@a1local.com.au"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/astro-adpages_0.1.0_1779689338928_0.09998554937196769"},"_hasShrinkwrap":false}},"time":{"created":"2026-05-25T06:08:58.754Z","0.1.0":"2026-05-25T06:08:59.084Z","modified":"2026-05-25T06:08:59.247Z"},"maintainers":[{"name":"a1local","email":"extensions@a1local.com.au"}],"description":"Astro integration helpers for AdPages local SEO and landing-page QA.","homepage":"https://github.com/a1local/astro-adpages#readme","keywords":["astro","astro-integration","local-seo","landing-pages","schema-org"],"repository":{"type":"git","url":"git+https://github.com/a1local/astro-adpages.git"},"author":{"name":"A1 Local","url":"https://a1local.com.au/"},"bugs":{"url":"https://github.com/a1local/astro-adpages/issues"},"license":"MIT","readme":"# @a1local/astro-adpages\n\nAstro integration scaffold for AdPages local SEO and landing-page QA. This package is intentionally dependency-free for now: it does not import Astro types, does not depend on `@a1local/adpages-audit-core`, and can be checked by the root TypeScript lint before the workspace is wired together.\n\n## What is included\n\n- `adpagesAstro()` returns a minimal Astro integration-shaped object with a no-op setup hook.\n- `buildLocalBusinessSchemaData()` creates LocalBusiness JSON-LD data that can be rendered from an Astro component.\n- `checkAstroPageMetadata()` checks frontmatter-like objects for practical local SEO metadata.\n- `buildServiceAreaPageMatrix()` creates a service-by-area landing page matrix for local SEO planning.\n\n## Planned Astro wiring\n\nWhen this package is ready to be connected to Astro directly, it can be used from `astro.config.mjs`:\n\n```js\nimport { defineConfig } from \"astro/config\";\nimport adpages from \"@a1local/astro-adpages\";\n\nexport default defineConfig({\n  integrations: [\n    adpages({\n      business: {\n        name: \"Example Plumbing\",\n        businessType: \"Plumber\",\n        telephone: \"+61 8 0000 0000\",\n        areaServed: [\"Perth\", \"Fremantle\", \"Joondalup\"]\n      }\n    })\n  ]\n});\n```\n\nThe current factory avoids Astro imports so it can compile in this repository before the Astro dependency and package workspace are added. Later hook work can generate virtual modules, validate content collections, or run `@a1local/adpages-audit-core` checks during `astro:build:done`.\n\n## LocalBusiness schema data\n\nUse the helper to prepare data for an Astro component without coupling this package to `.astro` files:\n\n```ts\nimport { buildLocalBusinessSchemaData } from \"@a1local/astro-adpages\";\n\nconst schemaData = buildLocalBusinessSchemaData(\n  {\n    name: \"Example Plumbing\",\n    businessType: \"Plumber\",\n    url: \"https://example.com\",\n    telephone: \"+61 8 0000 0000\",\n    areaServed: [\"Perth\"],\n    services: [\"Emergency plumbing\", \"Blocked drains\"]\n  },\n  { pretty: true }\n);\n```\n\nIn Astro, that data can later be rendered with a small project component:\n\n```astro\n<script type={schemaData.script.type} set:html={schemaData.script.json}></script>\n```\n\n## Metadata checklist\n\n`checkAstroPageMetadata()` accepts plain objects shaped like Astro frontmatter:\n\n```ts\nimport { checkAstroPageMetadata } from \"@a1local/astro-adpages\";\n\nconst result = checkAstroPageMetadata({\n  title: \"Emergency Plumber in Perth | Example Plumbing\",\n  description: \"Fast emergency plumbing support for Perth homes and businesses.\",\n  canonical: \"https://example.com/plumber/perth/\",\n  serviceArea: \"Perth\"\n});\n```\n\nThe result contains `ok`, `score`, `missing`, `warnings`, and per-check items that can be surfaced in a dev overlay, CLI report, or build log.\n\n## Service area matrix\n\nUse `buildServiceAreaPageMatrix()` to plan landing pages before content generation:\n\n```ts\nimport { buildServiceAreaPageMatrix } from \"@a1local/astro-adpages\";\n\nconst matrix = buildServiceAreaPageMatrix({\n  basePath: \"/services\",\n  services: [\"Blocked drains\", \"Hot water repairs\"],\n  areas: [\"Perth\", \"Fremantle\"],\n  pathPattern: \"{service}/{area}\",\n  defaultStatus: \"draft\"\n});\n```\n\nThis returns normalized services, areas, URL paths, titles, descriptions, and grouped lookup maps.\n\n## Monetisation surface\n\nThe integration options reserve a `monetization` block for later product work:\n\n```ts\nadpages({\n  monetization: {\n    enabled: true,\n    plan: \"agency\",\n    auditUpsellUrl: \"https://adpages.example/upgrade\",\n    leadCaptureUrl: \"https://adpages.example/leads\"\n  }\n});\n```\n\nGood places for monetisation are the hosted audit report, gated export formats, agency-level service-area matrix generation, white-label schema components, and lead capture from failed QA checks. The package should keep these decisions in integration options or generated UI modules rather than hard-coding billing logic into pure helpers.\n","readmeFilename":"README.md","_rev":"1-a31e1beffdc8fc7d269b993315396228"}