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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@directus-labs/seo-plugin

v1.0.1

Published

SEO plugin for Directus

Downloads

555

Readme

SEO Plugin

SEO Interface thumbnail

A powerful SEO management extension that helps you optimize your content for search engines and social media sharing, right within Directus. It includes a comprehensive interface for managing metadata and a display component for monitoring SEO status.

Key Features 🔑

  • Title and meta description (with template support)
  • Visual search result previews
  • Social media image
  • Sitemap configuration
  • Search engine indexing controls
  • Custom SEO fields support (like canonical URLs, custom meta tags, JSON-LD, etc.)
  • SEO status monitoring with hover preview from the layout view

Interface (shown in the item view)

SEO Interface

Display (shown in the layout view)

SEO Display

SEO Data 📝

  • Title: The most crucial SEO element. Should be compelling and include your main keyword (recommended length: 45-60 characters)
  • Meta Description: Your page's summary in search results. Make it engaging to improve click-through rates (recommended length: 130-160 characters)

Social Media

  • OG Image: The image that appears when your page is shared on social media. Crucial for increasing social engagement.

Search Engine Controls

  • No Index: Tells search engines not to show this page in search results
  • No Follow: Prevents search engines from following links on the page

Sitemap Settings

  • Change Frequency: How often the page is updated (options: always, hourly, daily, weekly, monthly, yearly, never)
  • Priority: Page importance relative to other pages (0.0 to 1.0, default: 0.5)

Additional Fields

  • Additional Fields: Custom SEO fields for specific needs (like canonical URLs, custom meta tags, JSON-LD, etc.)

Data Structure 📦

SEO data is stored as JSON for simplicity and flexibility.

OG Image stores the UUID of the uploaded image. You'll want to make sure your frontend is configured to display the image correctly.

{
	"title": "This is the Directus SEO Plugin.",
	"meta_description": "A powerful SEO management extension that helps you optimize your content for search engines and social media sharing, right within Directus. It includes a comprehensive interface for managing metadata and a display component for monitoring SEO status.",
	"og_image": "f5d20d13-e86a-4aaa-ab1c-241925b89ea3",
	"additional_fields": {
		"canonical_url": "https://directus.io/",
		"custom_meta_tag": "This is a custom meta tag"
	},
	"sitemap": {
		"change_frequency": "monthly",
		"priority": "0.5"
	},
	"no_index": false,
	"no_follow": false
}

Usage

The SEO plugin consists of two components:

1. SEO Interface

The interface provides a comprehensive form for managing SEO metadata:

  • Title field with character count and optimal length validation (45-60 characters)
  • Meta description with validation (130-160 characters)
  • Optional social media image upload and preview
  • Sitemap configuration options
  • Search engine visibility controls
  • Custom additional fields

SEO Interface Progress Bar

The title and meta description fields show a progress bar to help you keep track of the character count and optimal length according to the SEO best practices.

To populate the title or meta description fields, with the template, use the Apply Template button to apply the template to the field.

SEO Interface Template

2. SEO Display

A compact status indicator that shows:

  • Overall SEO health status
  • Quick overview of missing or invalid fields
  • Search preview on hover (optional)
  • Status of required and optional fields

SEO Display Layout

SEO Display Ideal

SEO Display Hidden

Explanation of Icons:

  • Green checkmark: All configured fields are valid.
  • Yellow warning: Some of the configured fields are invalid.
  • Red error: At least one required fields is missing (this includes additonal fields that are marked as required.)
  • Gray eye with slash icon: No index field is enabled for this item hiding it from search engines

Configuration 🔧

To use the SEO plugin, add a new field to any (and all) collections you want to manage the SEO (for example posts, articles, or pages). The field type should be json. The recommended key for the field is simply seo but you can use any key you want.

Interface Options

SEO Interface Configuration

  • Type: json
  • Group: standard
  • Options: Configurable templates, OG image, sitemap settings, and custom fields

The interface can be configured with the following options:

  1. Title Template

    • Configures the pattern for SEO titles so you can use fields from the item to generate the title
    • Supports dynamic field values using {{fieldName}} syntax
  2. Description Template

    • Configures the pattern for meta descriptions so you can use fields from the item to generate the description
    • Supports dynamic field values using {{fieldName}} syntax
  3. Enable Social Media Image

    • Toggle to enable/disable social media image upload. Stores
    • Disabled by default
  4. Enable Search Engine Controls

    • Toggle to show/hide noindex/nofollow options
    • Disabled by default
  5. Enable Sitemap Controls

    • Toggle to enable/disable sitemap configuration
    • When enabled, includes:
      • Default change frequency (preset to 'weekly')
      • Default priority (preset to '0.5')
    • Disabled by default
  6. Additional Fields

    • Toggle to enable/disable additional fields
    • Disabled by default

Display Options

SEO Display Configuration

  • Type: json
  • Icon: search
  • Options: Search preview toggle

The display component can be configured with:

  1. Show Search Preview
    • Toggle to enable/disable search result preview on hover
    • Shows how the page might appear in search results
    • Disabled by default

Installation

Install the extension from the Directus Marketplace. See the Official Guide for more information.

or if you prefer to install manually:

npm install @directus-labs/seo-plugin

Roadmap 🗺️

Planned:

  • Support for translating the title and meta description fields
  • Field label and description translations

Maybe:

  • Add support for relational fields in the template

Contributing 🤝

Contributions are welcome! Please add an issue describing the feature you'd like to add before submitting a PR.