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

@banulakwin/inertia-seo-engine

v1.1.0

Published

Inertia + React `<Head>` helpers for banulakwin/laravel-seo-engine payloads.

Readme

@banulakwin/inertia-seo-engine

InertiaSeoHead component + InertiaSeoPayload type for banulakwin/laravel-seo-engine + Inertia.js <Head>.

Installation

npm install @banulakwin/inertia-seo-engine
pnpm add @banulakwin/inertia-seo-engine
yarn add @banulakwin/inertia-seo-engine

Peer Dependencies

  • react ^18.0.0 || ^19.0.0
  • @inertiajs/react ^2.0.0 || ^3.0.0

Quick Start

Place InertiaSeoHead in your root layout component. It reads SEO data automatically from Inertia's page context via usePage().

import { InertiaSeoHead } from '@banulakwin/inertia-seo-engine';

export default function AppLayout({ children }) {
    return (
        <>
            <InertiaSeoHead />
            {children}
        </>
    );
}

Laravel Backend

Your Laravel app should pass an seo prop matching InertiaSeoPayload, typically from:

  • inertia_seo($model)
  • inertia_seo_page('slug')
  • inertia_head_from_seo_engine_array()

Also pass appUrl (string base URL) and optionally name (site name for og:site_name) via Inertia shared props.

// In your controller
return inertia('Page', [
    // ...your data
], [
    'appUrl' => config('app.url'),
    'name' => config('app.name'),
]);

API Reference

Components

InertiaSeoHead

Zero-prop React component that renders <Head> meta tags from Inertia shared/page seo props.

import { InertiaSeoHead } from '@banulakwin/inertia-seo-engine';

<InertiaSeoHead />;

Types

InertiaSeoPayload

The SEO data payload from Laravel banulakwin/laravel-seo-engine.

type InertiaSeoPayload = {
    title?: string | null;
    description?: string | null;
    keywords?: string | string[] | null;
    image_path?: string | null;
    canonical_url?: string | null;
    is_index?: boolean;
    is_follow?: boolean;
    og_type?: string | null;
    og_title?: string | null;
    og_description?: string | null;
    og_image_path?: string | null;
    author?: string | null;
    twitter_card?: string | null;
    twitter_site?: string | null;
    twitter_creator?: string | null;
    twitter_title?: string | null;
    twitter_description?: string | null;
    twitter_image_path?: string | null;
    global_head_html?: string | null;
    page_head_html?: string | null;
    json_ld?: unknown | unknown[] | null;
};

InertiaSeoHeadPageProps

Expected Inertia page props shape.

type InertiaSeoHeadPageProps = {
    name?: string;
    appUrl?: string;
    seo?: InertiaSeoPayload | null;
};

Features

  • Title & Meta: <title>, description, keywords, robots, author, abstract
  • Canonical URL: Auto-derived from appUrl + current path, or explicit canonical_url
  • Open Graph: og:type, og:title, og:description, og:image, og:url, og:site_name
  • Twitter Cards: twitter:card, twitter:title, twitter:description, twitter:image, twitter:site, twitter:creator
  • JSON-LD: Structured data via <script type="application/ld+json">
  • Custom HTML: Site-wide and per-page HTML snippets parsed via DOMParser (with regex fallback for SSR)
  • URL Resolution: Relative image paths resolved against appUrl

Build

npm run build

License

MIT

See Also