Meteor Friendly Slugs

screenshot of Meteor Friendly Slugs

Meteor package to generate URL friendly slugs from a field with auto-incrementation to ensure unique URLs.

Overview

URL Friendly Slugs for Meteor is a powerful package designed to streamline the creation of easy-to-read, sanitized slugs for your documents. Whether you're building a new application or maintaining an existing one, the need for clean and unique URLs is essential for user experience and search engine optimization. This package simplifies the process by automatically generating slugs based on specified fields, ensuring that every item within your collection has a unique URL.

What truly sets this package apart is its ability to handle edge cases, such as duplicated fields or the necessity for auto-incrementing identifiers. With its efficient storage and querying mechanisms, URL Friendly Slugs offers a solution that saves both time and effort while enhancing the functionality of your Meteor applications.

Features

  • Automatic Slug Creation: Generates a URL-friendly slug based on specified fields, ensuring consistency and readability.
  • Sanitization Rules: Converts all characters to lowercase, replaces spaces with hyphens, and removes unwanted characters for a clean output.
  • Auto-Incrementing Index: Automatically appends a number to the slug if a conflict arises, such as creating a slug from the same field value as an existing item.
  • Multiple Field Support: Allows slugs to be created from one or several fields, accommodating complex naming needs.
  • Optional Auto-Incrementing: Gives developers the choice to create slugs without appending auto-incrementing indices, if preferred.
  • Dynamic Updates: Offers the ability to update slugs when the original field content changes, keeping URLs in sync with your data.
  • Efficient Storage: Stores base slugs and indices for quick queries, improving overall performance in data management tasks.