Permalinks

screenshot of Permalinks
metalsmith

A Metalsmith plugin for permalinks.

Overview

@metalsmith/permalinks is an innovative plugin designed to enhance the functionality of static sites by enabling custom permalink patterns. With its ability to rename files in a way that maintains proper nesting structure—such as converting about.html into about/index.html—it greatly improves the organization and accessibility of web content. This tool is particularly beneficial for developers looking to streamline their workflow and ensure a consistent URL structure across their projects.

The plugin not only simplifies the process of file management but also delivers flexibility in how links are structured and presented. By allowing customization through various options, @metalsmith/permalinks empowers users to take control over their permalink formats, making it a valuable addition to any Metalsmith setup.

Features

  • Custom Permalink Patterns: Define your own permalink structure, giving you complete control over how your URLs are formulated.
  • File Renaming: Automatically converts and renames files from :dirname/:basename to :dirname/:basename/index.html for better organization.
  • Flexible Metadata: Allows for customization of the permalink property based on file metadata, giving each file unique attributes.
  • Match Option: Supports glob patterns or key-value pairs to specify which files should receive permalinks, providing targeted control.
  • Linksets: Enables the definition of additional linksets with distinct options, allowing for advanced linking strategies beyond the default configuration.
  • Placeholder Substitution: Offers a mechanism for substituting values in permalinks using file metadata, enhancing dynamic linking capabilities.
  • Fixed Permalinks: Permalinks can be fixed and declared in file front-matter to ensure specific URLs remain constant regardless of changes.
  • Duplicate Handling: Features options for managing files with identical target destinations, ensuring unique URIs within the site structure.
metalsmith
Metalsmith

Metalsmith is a flexible and modular Static Site Generator (SSG) built on Node.js. It operates on a simple plugin-based architecture, allowing developers to easily customize and transform content to generate static websites with diverse functionalities.

eslint
Eslint

ESLint is a linter for JavaScript that analyzes code to detect and report on potential problems and errors, as well as enforce consistent code style and best practices, helping developers to write cleaner, more maintainable code.