/programmatic-seo

This Node.js library is designed to empower developers with the tools needed to automate and enhance their SEO efforts programmatically.

Primary LanguageTypeScript

Programmatic SEO Library for Node.js

This Node.js library is designed to empower developers with the tools needed to automate and enhance their SEO efforts programmatically.

Installation

To install the programmatic SEO library, use npm:

npm install @ghom/programmatic-seo

Usage

Here's a quick example to get you started:

import { combination } from "@ghom/programmatic-seo"

const output = combination({
  pattern: "{verb} [{adjective}] approach of {noun}",
  data: {
    verb: ["learn", "explore"],
    adjective: ["exciting", "innovative"],
    noun: ["programming", "[web] development"]
  }
})

console.log(output)

// Output:
// [
//   "learn exciting approach of programming",
//   "learn exciting approach of development",
//   "learn exciting approach of web development",
//   "learn innovative approach of programming",
//   "learn innovative approach of development",
//   "learn innovative approach of web development",
//   "explore exciting approach of programming",
//   "explore exciting approach of development",
//   "explore exciting approach of web development",
//   "explore innovative approach of programming",
//   "explore innovative approach of development",
//   "explore innovative approach of web development"
// ]

API Documentation

combination(options: CombinationOptions): string[]

Generates a list of strings based on the provided pattern and data. CombinationOptions includes pattern and data.

combinationGenerator(options: CombinationOptions): Generator<string>

Gives a generator of strings based on the provided pattern and data. CombinationOptions includes pattern and data.

Contributing

We welcome contributions from the community! If you'd like to contribute to the project, make a PR 😉

License

This project is licensed under the MIT License - see the LICENSE file for details.