JSPM

@markangeloujamandre/schema

0.0.1
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 2
  • Score
    100M100P100Q23104F
  • License MIT

AI-powered Schema.org JSON-LD generator using Google Gemini

Package Exports

  • @markangeloujamandre/schema
  • @markangeloujamandre/schema/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@markangeloujamandre/schema) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Schema Generator AI

AI-powered Schema.org JSON-LD generator using Google Gemini for automatic SEO markup generation.

Installation

npm install @yourusername/schema-generator-ai

Usage

Basic Usage

import {
  generateSchemaFile,
  getSchemaUrl,
} from "@yourusername/schema-generator-ai";

// Generate schema for a page
const schemaUrl = await generateSchemaFile(page, blocks, route);

// Get public URL for existing schema
const url = getSchemaUrl("/rooms/deluxe-room");

Environment Setup

Set your Gemini API key:

GEMINI_API_KEY=your_api_key_here

API

generateSchemaFile(page, blocks, route)

Generates Schema.org JSON-LD markup for a page.

Parameters:

  • page (Object): Page data containing content, metadata, and taxonomy
  • blocks (Array): Optional array of content blocks
  • route (String): Page route (e.g., '/rooms/deluxe')

Returns: Promise - URL to generated schema file

getSchemaUrl(route)

Gets the public URL for a schema file.

Parameters:

  • route (String): Page route

Returns: String - Schema file URL

getSchemaFilePath(route)

Gets the file system path for a schema file (server-side only).

Parameters:

  • route (String): Page route

Returns: String - File system path

Supported Schema Types

  • Hotel/Resort
  • HotelRoom/Accommodation
  • Restaurant
  • BlogPosting/Article
  • Offer
  • SportsActivityLocation
  • HealthAndBeautyBusiness

Requirements

  • Node.js >= 14.0.0
  • Google Gemini API key
  • Server-side environment (Next.js, Express, etc.)

License

MIT