@zedtech/zedkit-seo 0.0.0-stage → 0.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +39 -2
  3. package/package.json +42 -3
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 zedtech-fr
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,40 @@
1
- # Temporary Holding Version
1
+ # @zedtech/zedkit-seo
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ Generic SEO bricks: robots, sitemaps, typed JSON-LD, page metadata,
4
+ llms.txt, slugs. Pure functions, options-driven, no brand, no CMS.
5
+ Original work by the same author.
6
+
7
+ ```sh
8
+ pnpm add @zedtech/zedkit-seo
9
+ ```
10
+
11
+ ```ts
12
+ import { buildRobots, buildSitemapEntries } from "@zedtech/zedkit-seo";
13
+
14
+ export async function GET() {
15
+ return Response.json(buildSitemapEntries({ siteUrl, locales, pages }));
16
+ }
17
+ export function robots() {
18
+ return buildRobots({ siteUrl });
19
+ }
20
+ ```
21
+
22
+ Return shapes follow the Next.js Metadata API (`MetadataRoute.Robots`,
23
+ `MetadataRoute.Sitemap`, `Metadata`) so builders drop straight into
24
+ `robots.ts`, `sitemap.ts`, and `generateMetadata`. JSON-LD builders
25
+ return `schema-dts` types. Map CMS docs to the plain `pages`/`videos`
26
+ inputs first — the package never talks to a CMS.
27
+
28
+ ## API
29
+
30
+ - `buildRobots({ siteUrl, extraSitemaps?, disallow?, allow? })`
31
+ - `buildSitemapEntries({ siteUrl, locales, pages })`
32
+ - `buildVideoSitemap({ videos })`, `escapeXml(value)`
33
+ - `buildOrganizationJsonLd`, `buildWebPageJsonLd`,
34
+ `buildBreadcrumbJsonLd`, `buildArticleJsonLd`
35
+ - `buildPageMetadata({ site, page, locale, pathname, ogImage?, robots? })`
36
+ - `llmsTextResponse({ body })`, `normalizeLlmsBody`, `buildLlmsFull`
37
+ - `truncateDescription`, `resolveDescription`, `resolveLocalizedField`
38
+ - `normalizeSlug`, `isDraftSlug`
39
+
40
+ See CATALOG.md for needs-first examples.
package/package.json CHANGED
@@ -1,6 +1,45 @@
1
1
  {
2
2
  "name": "@zedtech/zedkit-seo",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
3
+ "version": "0.0.0",
4
+ "publishConfig": {
5
+ "access": "public",
6
+ "registry": "https://registry.npmjs.org/"
7
+ },
8
+ "description": "Generic SEO bricks: robots, sitemaps, typed JSON-LD, metadata, llms.txt, slugs.",
9
+ "license": "MIT",
10
+ "repository": {
11
+ "type": "git",
12
+ "url": "https://github.com/zedtech-fr/zedkit",
13
+ "directory": "packages/seo"
14
+ },
15
+ "type": "module",
16
+ "sideEffects": false,
17
+ "imports": {
18
+ "#*": "./src/*"
19
+ },
20
+ "main": "./dist/index.js",
21
+ "types": "./dist/index.d.ts",
22
+ "exports": {
23
+ ".": {
24
+ "types": "./dist/index.d.ts",
25
+ "import": "./dist/index.js"
26
+ },
27
+ "./package.json": "./package.json"
28
+ },
29
+ "files": [
30
+ "dist"
31
+ ],
32
+ "dependencies": {
33
+ "schema-dts": "2.1.0"
34
+ },
35
+ "devDependencies": {
36
+ "typescript": "5.9.3",
37
+ "vitest": "2.1.9"
38
+ },
39
+ "scripts": {
40
+ "build": "tsc -p tsconfig.json",
41
+ "test": "vitest run",
42
+ "typecheck": "tsc --noEmit -p tsconfig.tests.json",
43
+ "lint": "eslint src tests"
44
+ }
6
45
  }