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 🙏

© 2026 – Pkg Stats / Ryan Hefner

@symbo.ls/helmet

v3.14.665

Published

SEO metadata plugin for Symbols apps. Shared between runtime (browser) and SSR (brender).

Readme

@symbo.ls/helmet

SEO metadata plugin for Symbols apps. Shared between runtime (browser) and SSR (brender).

Usage

On pages and app

Define metadata on your app or any page/component. It's registered as a global define, so it works on any element:

// app.js — app-level defaults
export default {
  metadata: {
    title: 'My App',
    description: 'Built with Symbols',
    'og:image': '/social.png'
  }
}

// pages/about.js — page-level (overrides app-level)
export const about = {
  metadata: {
    title: 'About Us',
    description: 'Learn more about us'
  }
}

Dynamic metadata

Both the metadata object and individual properties can be functions receiving (element, state):

// Whole object as function
export const product = {
  metadata: (el, s) => ({
    title: s.product.name,
    description: s.product.description,
    'og:image': s.product.image
  })
}

// Individual properties as functions
export const profile = {
  metadata: {
    title: (el, s) => `${s.user.name} — My App`,
    description: (el, s) => s.user.bio,
    'og:image': '/default-avatar.png'
  }
}

Helmet component

For explicit use without the global define, extend the Helmet component:

import { Helmet } from '@symbo.ls/helmet'

export const MyPage = {
  extends: Helmet,
  metadata: { title: 'My Page' }
}

How it works

Runtime (browser)

When metadata is set on an element, the define handler:

  1. Resolves any function values via resolveMetadata()
  2. Finds or creates <title>, <meta>, and <link> tags in <head> via applyMetadata()
  3. Updates their content/attributes

SSR (brender)

Brender calls extractMetadata(data, route) which:

  1. Merges metadata from data.integrations.seo (lowest priority)
  2. Merges data.app.metadata (medium priority)
  3. Merges page.metadata or page.helmet (highest priority)
  4. Falls back to page.state.title / page.state.description if not set
  5. Resolves bare filenames against data.files

Then generateHeadHtml(metadata) produces the <head> HTML string.

API

resolveMetadata(metadata, element, state)

Resolves metadata values. If metadata is a function, executes it with (element, state). Then executes any function values in the resulting object.

applyMetadata(metadata, doc)

Applies a resolved metadata object to the live DOM. Creates or updates <title>, <meta>, and <link> tags.

extractMetadata(data, route, element?, state?)

Extracts and merges metadata from project data for a given route. When element and state are provided, function values are resolved.

generateHeadHtml(metadata)

Generates an HTML <head> string from a flat metadata object. Used by brender for SSR.

Helmet

DOMQL component with a define.metadata handler. Use when you need the define on a specific component rather than globally.

Supported keys

Standard keys with shorthand support:

| Key | Tag | |-----|-----| | title | <title> | | description | <meta name="description"> | | keywords | <meta name="keywords"> | | robots | <meta name="robots"> | | author | <meta name="author"> | | canonical | <link rel="canonical"> | | image | <meta property="og:image"> | | url | <meta property="og:url"> | | siteName | <meta property="og:site_name"> | | type | <meta property="og:type"> | | locale | <meta property="og:locale"> | | theme-color | <meta name="theme-color"> |

Any og:* or twitter:* key is also supported directly:

metadata: {
  'og:title': 'Social Title',
  'og:description': 'Social description',
  'twitter:card': 'summary_large_image',
  'twitter:site': '@myapp'
}

The generateHeadHtml() function also handles article:*, product:*, fb:*, DC:*, http-equiv:*, itemprop:*, alternate, and favicon/favicons keys.

domql plugin

Helmet works out of the box via the define system (context.define or element.define). It can also be used as a domql plugin to hook into the element lifecycle:

import { helmetPlugin } from '@symbo.ls/helmet'

context.plugins = [helmetPlugin]

This registers helmet as a lifecycle plugin alongside other plugins like funcqlPlugin or shorthandPlugin:

context.plugins = [funcqlPlugin, helmetPlugin]

Plugin interface

{
  name: 'helmet',
  render (element) { ... }  // applies metadata on render
}