@lacspace/site-verify
v1.1.1
Published
Search-engine site verification — meta tags, Next.js verification metadata and file tokens for Google Search Console, Bing, Yandex, Baidu, Pinterest, Ahrefs, Facebook & more. Zero-dependency, isomorphic.
Maintainers
Readme
@lacspace/site-verify
Search-engine site verification — meta tags & file tokens for GSC, Bing, Yandex & more.
One typed input → verification
<meta>tags, a Next.jsverificationmetadata object, or the file-based verification content — for Google Search Console, Bing Webmaster, Yandex, Baidu, Pinterest, Ahrefs, Facebook and any custom provider. Stop hunting for the right metaname.
- 🏷️
verificationMeta()/verificationMetaHtml() - ▲
toNextVerification()formetadata.verification - 📄
verificationFile()for file-upload verification (Google, Bing, Yandex) - ⚡ Zero dependencies · 🌍 isomorphic · 📦 ESM + CJS · fully typed
Install
npm install @lacspace/site-verify # or pnpm add / yarn add / bun addMeta tags (any framework)
import { verificationMeta, verificationMetaHtml } from "@lacspace/site-verify";
verificationMeta({ google: "abc123", bing: "XYZ789", pinterest: "pin456" });
// [{ name: "google-site-verification", content: "abc123" },
// { name: "msvalidate.01", content: "XYZ789" },
// { name: "p:domain_verify", content: "pin456" }]
verificationMetaHtml({ google: "abc123" });
// <meta name="google-site-verification" content="abc123" />Next.js
// app/layout.tsx
import { toNextVerification } from "@lacspace/site-verify";
export const metadata = {
verification: toNextVerification({ google: "abc123", bing: "XYZ789", yandex: "y1" }),
// → { google: "abc123", yandex: "y1", other: { "msvalidate.01": "XYZ789" } }
};File-based verification
import { verificationFile } from "@lacspace/site-verify";
verificationFile("google", "abc123");
// { path: "/googleabc123.html", content: "google-site-verification: googleabc123.html", contentType: "text/html" }
verificationFile("bing", "TOKEN"); // → /BingSiteAuth.xml
verificationFile("yandex", "TOKEN"); // → /yandex_TOKEN.htmlSupported providers (meta)
google · bing · yandex · baidu · pinterest · ahrefs · facebook · norton · plus any via other: { "meta-name": "token" }.
The Lacspace SEO Kit
| Package | For |
| --- | --- |
| @lacspace/seo | Metadata & JSON-LD |
| @lacspace/sitemap | sitemap.xml |
| @lacspace/robots | robots.txt |
| @lacspace/llms-txt | llms.txt / llms-full.txt |
| @lacspace/site-verify | Search-engine verification (this package) |
| @lacspace/rss | RSS / Atom / JSON feeds |
| @lacspace/slugify | SEO URL slugs |
New in 1.1 — Response helper
import { verificationFileResponse } from "@lacspace/site-verify";
// app/googleXXXX.html/route.ts — serve the verification file
export function GET() {
return verificationFileResponse("google", "googleXXXX.html");
}Licensing
This package is free under the Lacspace Free Licence — MIT-equivalent freedoms. Use it in personal and commercial projects at no cost; just keep the notice.
Not every Lacspace package is free. We also offer Commercial (paid), Client-specific, and Private (proprietary) packages under separate terms. See the full Lacspace Licence Centre.
Part of the Lacspace ecosystem — 35 zero-dependency, isomorphic TypeScript packages.
