npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@a1local/astro-adpages

v0.1.0

Published

Astro integration helpers for AdPages local SEO and landing-page QA.

Readme

@a1local/astro-adpages

Astro 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.

What is included

  • adpagesAstro() returns a minimal Astro integration-shaped object with a no-op setup hook.
  • buildLocalBusinessSchemaData() creates LocalBusiness JSON-LD data that can be rendered from an Astro component.
  • checkAstroPageMetadata() checks frontmatter-like objects for practical local SEO metadata.
  • buildServiceAreaPageMatrix() creates a service-by-area landing page matrix for local SEO planning.

Planned Astro wiring

When this package is ready to be connected to Astro directly, it can be used from astro.config.mjs:

import { defineConfig } from "astro/config";
import adpages from "@a1local/astro-adpages";

export default defineConfig({
  integrations: [
    adpages({
      business: {
        name: "Example Plumbing",
        businessType: "Plumber",
        telephone: "+61 8 0000 0000",
        areaServed: ["Perth", "Fremantle", "Joondalup"]
      }
    })
  ]
});

The 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.

LocalBusiness schema data

Use the helper to prepare data for an Astro component without coupling this package to .astro files:

import { buildLocalBusinessSchemaData } from "@a1local/astro-adpages";

const schemaData = buildLocalBusinessSchemaData(
  {
    name: "Example Plumbing",
    businessType: "Plumber",
    url: "https://example.com",
    telephone: "+61 8 0000 0000",
    areaServed: ["Perth"],
    services: ["Emergency plumbing", "Blocked drains"]
  },
  { pretty: true }
);

In Astro, that data can later be rendered with a small project component:

<script type={schemaData.script.type} set:html={schemaData.script.json}></script>

Metadata checklist

checkAstroPageMetadata() accepts plain objects shaped like Astro frontmatter:

import { checkAstroPageMetadata } from "@a1local/astro-adpages";

const result = checkAstroPageMetadata({
  title: "Emergency Plumber in Perth | Example Plumbing",
  description: "Fast emergency plumbing support for Perth homes and businesses.",
  canonical: "https://example.com/plumber/perth/",
  serviceArea: "Perth"
});

The result contains ok, score, missing, warnings, and per-check items that can be surfaced in a dev overlay, CLI report, or build log.

Service area matrix

Use buildServiceAreaPageMatrix() to plan landing pages before content generation:

import { buildServiceAreaPageMatrix } from "@a1local/astro-adpages";

const matrix = buildServiceAreaPageMatrix({
  basePath: "/services",
  services: ["Blocked drains", "Hot water repairs"],
  areas: ["Perth", "Fremantle"],
  pathPattern: "{service}/{area}",
  defaultStatus: "draft"
});

This returns normalized services, areas, URL paths, titles, descriptions, and grouped lookup maps.

Monetisation surface

The integration options reserve a monetization block for later product work:

adpages({
  monetization: {
    enabled: true,
    plan: "agency",
    auditUpsellUrl: "https://adpages.example/upgrade",
    leadCaptureUrl: "https://adpages.example/leads"
  }
});

Good 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.