@geenius/seo 0.1.0 → 0.3.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.
- package/package.json +16 -3
- package/packages/convex/dist/index.d.ts +56 -0
- package/packages/convex/dist/index.js +133 -0
- package/packages/convex/dist/index.js.map +1 -0
- package/packages/react/README.md +1 -1
- package/packages/react/dist/index.d.ts +156 -0
- package/packages/react/dist/index.js +567 -0
- package/packages/react/dist/index.js.map +1 -0
- package/packages/react-css/README.md +1 -1
- package/packages/react-css/dist/index.cjs +571 -0
- package/packages/react-css/dist/index.cjs.map +1 -0
- package/packages/react-css/{src/seo.css → dist/index.css} +7 -153
- package/packages/react-css/dist/index.css.map +1 -0
- package/packages/react-css/dist/index.d.cts +53 -0
- package/packages/react-css/dist/index.d.ts +53 -0
- package/packages/react-css/dist/index.js +539 -0
- package/packages/react-css/dist/index.js.map +1 -0
- package/packages/shared/README.md +1 -1
- package/packages/shared/dist/index.d.ts +262 -0
- package/packages/shared/dist/index.js +381 -0
- package/packages/shared/dist/index.js.map +1 -0
- package/packages/solidjs/README.md +1 -1
- package/packages/solidjs/dist/index.d.ts +133 -0
- package/packages/solidjs/dist/index.js +416 -0
- package/packages/solidjs/dist/index.js.map +1 -0
- package/packages/solidjs-css/README.md +1 -1
- package/packages/solidjs-css/dist/index.cjs +399 -0
- package/packages/solidjs-css/dist/index.cjs.map +1 -0
- package/packages/solidjs-css/{src/seo.css → dist/index.css} +7 -153
- package/packages/solidjs-css/dist/index.css.map +1 -0
- package/packages/solidjs-css/dist/index.d.cts +53 -0
- package/packages/solidjs-css/dist/index.d.ts +53 -0
- package/packages/solidjs-css/dist/index.js +367 -0
- package/packages/solidjs-css/dist/index.js.map +1 -0
- package/.changeset/config.json +0 -11
- package/.github/CODEOWNERS +0 -1
- package/.github/ISSUE_TEMPLATE/bug_report.md +0 -16
- package/.github/ISSUE_TEMPLATE/feature_request.md +0 -11
- package/.github/PULL_REQUEST_TEMPLATE.md +0 -10
- package/.github/dependabot.yml +0 -11
- package/.github/workflows/ci.yml +0 -23
- package/.github/workflows/release.yml +0 -29
- package/.nvmrc +0 -1
- package/.project/ACCOUNT.yaml +0 -4
- package/.project/IDEAS.yaml +0 -7
- package/.project/PROJECT.yaml +0 -11
- package/.project/ROADMAP.yaml +0 -15
- package/CODE_OF_CONDUCT.md +0 -16
- package/CONTRIBUTING.md +0 -26
- package/SECURITY.md +0 -15
- package/SUPPORT.md +0 -8
- package/packages/convex/package.json +0 -42
- package/packages/convex/src/functions.ts +0 -5
- package/packages/convex/src/mutations.ts +0 -83
- package/packages/convex/src/queries.ts +0 -57
- package/packages/convex/src/schema.ts +0 -23
- package/packages/convex/tsconfig.json +0 -19
- package/packages/convex/tsup.config.ts +0 -18
- package/packages/react/package.json +0 -49
- package/packages/react/src/components/ArticleJsonLd.tsx +0 -42
- package/packages/react/src/components/BreadcrumbsJsonLd.tsx +0 -24
- package/packages/react/src/components/MetaEditor.tsx +0 -147
- package/packages/react/src/components/SEOHead.tsx +0 -107
- package/packages/react/src/components/SEOPreview.tsx +0 -42
- package/packages/react/src/components/SEOScoreCard.tsx +0 -51
- package/packages/react/src/components/SitemapViewer.tsx +0 -36
- package/packages/react/src/components/index.ts +0 -7
- package/packages/react/src/hooks/index.ts +0 -4
- package/packages/react/src/hooks/useSEO.ts +0 -27
- package/packages/react/src/hooks/useSEOAdmin.ts +0 -42
- package/packages/react/src/hooks/useSEOScore.ts +0 -7
- package/packages/react/src/hooks/useSitemap.ts +0 -8
- package/packages/react/src/index.ts +0 -51
- package/packages/react/src/index.tsx +0 -11
- package/packages/react/src/pages/SEOAdminPage.tsx +0 -101
- package/packages/react/src/pages/SEOAnalyticsPage.tsx +0 -96
- package/packages/react/src/pages/index.ts +0 -2
- package/packages/react/tsconfig.json +0 -19
- package/packages/react/tsup.config.ts +0 -12
- package/packages/react-css/package.json +0 -36
- package/packages/react-css/src/components/ArticleJsonLd.tsx +0 -42
- package/packages/react-css/src/components/BreadcrumbsJsonLd.tsx +0 -24
- package/packages/react-css/src/components/MetaEditor.tsx +0 -147
- package/packages/react-css/src/components/SEOHead.tsx +0 -95
- package/packages/react-css/src/components/SEOPreview.tsx +0 -42
- package/packages/react-css/src/components/SEOScoreCard.tsx +0 -42
- package/packages/react-css/src/components/SitemapViewer.tsx +0 -36
- package/packages/react-css/src/components/index.ts +0 -7
- package/packages/react-css/src/index.ts +0 -9
- package/packages/react-css/src/pages/SEOAdminPage.tsx +0 -88
- package/packages/react-css/src/pages/SEOAnalyticsPage.tsx +0 -82
- package/packages/react-css/src/pages/index.ts +0 -2
- package/packages/react-css/tsup.config.ts +0 -2
- package/packages/shared/package.json +0 -42
- package/packages/shared/src/__tests__/seo.test.ts +0 -70
- package/packages/shared/src/config.ts +0 -297
- package/packages/shared/src/index.ts +0 -207
- package/packages/shared/tsconfig.json +0 -18
- package/packages/shared/tsup.config.ts +0 -11
- package/packages/shared/vitest.config.ts +0 -4
- package/packages/solidjs/package.json +0 -45
- package/packages/solidjs/src/components/ArticleJsonLd.tsx +0 -35
- package/packages/solidjs/src/components/BreadcrumbsJsonLd.tsx +0 -24
- package/packages/solidjs/src/components/MetaEditor.tsx +0 -155
- package/packages/solidjs/src/components/SEOHead.tsx +0 -109
- package/packages/solidjs/src/components/SEOPreview.tsx +0 -42
- package/packages/solidjs/src/components/SEOScoreCard.tsx +0 -57
- package/packages/solidjs/src/components/SitemapViewer.tsx +0 -44
- package/packages/solidjs/src/components/index.ts +0 -7
- package/packages/solidjs/src/index.ts +0 -11
- package/packages/solidjs/src/pages/SEOAdminPage.tsx +0 -104
- package/packages/solidjs/src/pages/SEOAnalyticsPage.tsx +0 -102
- package/packages/solidjs/src/pages/index.ts +0 -2
- package/packages/solidjs/src/primitives/index.ts +0 -4
- package/packages/solidjs/src/primitives/useSEO.ts +0 -27
- package/packages/solidjs/src/primitives/useSEOAdmin.ts +0 -42
- package/packages/solidjs/src/primitives/useSEOScore.ts +0 -7
- package/packages/solidjs/src/primitives/useSitemap.ts +0 -8
- package/packages/solidjs/tsconfig.json +0 -20
- package/packages/solidjs/tsup.config.ts +0 -12
- package/packages/solidjs-css/package.json +0 -35
- package/packages/solidjs-css/src/index.ts +0 -5
- package/packages/solidjs-css/src/primitives/index.ts +0 -1
- package/packages/solidjs-css/tsup.config.ts +0 -2
- package/pnpm-workspace.yaml +0 -2
- package/tsconfig.json +0 -23
package/.github/workflows/ci.yml
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
name: CI
|
|
2
|
-
on:
|
|
3
|
-
pull_request:
|
|
4
|
-
branches: [main]
|
|
5
|
-
push:
|
|
6
|
-
branches: [main]
|
|
7
|
-
|
|
8
|
-
jobs:
|
|
9
|
-
check:
|
|
10
|
-
runs-on: ubuntu-latest
|
|
11
|
-
steps:
|
|
12
|
-
- uses: actions/checkout@v4
|
|
13
|
-
- uses: pnpm/action-setup@v4
|
|
14
|
-
with:
|
|
15
|
-
version: 10
|
|
16
|
-
- uses: actions/setup-node@v4
|
|
17
|
-
with:
|
|
18
|
-
node-version-file: '.nvmrc'
|
|
19
|
-
cache: 'pnpm'
|
|
20
|
-
- run: pnpm install --frozen-lockfile
|
|
21
|
-
- run: pnpm build
|
|
22
|
-
- run: pnpm lint
|
|
23
|
-
- run: pnpm test
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
name: Release
|
|
2
|
-
on:
|
|
3
|
-
push:
|
|
4
|
-
branches: [main]
|
|
5
|
-
|
|
6
|
-
concurrency: ${{ github.workflow }}-${{ github.ref }}
|
|
7
|
-
|
|
8
|
-
jobs:
|
|
9
|
-
release:
|
|
10
|
-
runs-on: ubuntu-latest
|
|
11
|
-
steps:
|
|
12
|
-
- uses: actions/checkout@v4
|
|
13
|
-
- uses: pnpm/action-setup@v4
|
|
14
|
-
with:
|
|
15
|
-
version: 10
|
|
16
|
-
- uses: actions/setup-node@v4
|
|
17
|
-
with:
|
|
18
|
-
node-version-file: '.nvmrc'
|
|
19
|
-
cache: 'pnpm'
|
|
20
|
-
registry-url: 'https://registry.npmjs.org'
|
|
21
|
-
- run: pnpm install --frozen-lockfile
|
|
22
|
-
- run: pnpm build
|
|
23
|
-
- uses: changesets/action@v1
|
|
24
|
-
with:
|
|
25
|
-
publish: pnpm changeset publish
|
|
26
|
-
version: pnpm changeset version
|
|
27
|
-
env:
|
|
28
|
-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
29
|
-
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
package/.nvmrc
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
22
|
package/.project/ACCOUNT.yaml
DELETED
package/.project/IDEAS.yaml
DELETED
package/.project/PROJECT.yaml
DELETED
package/.project/ROADMAP.yaml
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
version: "0.1"
|
|
2
|
-
milestones:
|
|
3
|
-
- name: "v0.1.0 — Initial Release"
|
|
4
|
-
status: in-progress
|
|
5
|
-
items:
|
|
6
|
-
- "Core shared types and logic"
|
|
7
|
-
- "React hooks and components"
|
|
8
|
-
- "SolidJS primitives"
|
|
9
|
-
- "npm publishing via Changesets"
|
|
10
|
-
- name: "v0.2.0 — Stability"
|
|
11
|
-
status: planned
|
|
12
|
-
items:
|
|
13
|
-
- "Test coverage ≥ 50%"
|
|
14
|
-
- "API documentation"
|
|
15
|
-
- "Convex adapter"
|
package/CODE_OF_CONDUCT.md
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
# Contributor Covenant Code of Conduct
|
|
2
|
-
|
|
3
|
-
## Our Pledge
|
|
4
|
-
|
|
5
|
-
We as members, contributors, and leaders pledge to make participation in our
|
|
6
|
-
community a harassment-free experience for everyone, regardless of age, body
|
|
7
|
-
size, disability, ethnicity, gender identity and expression, level of experience,
|
|
8
|
-
education, socio-economic status, nationality, personal appearance, race,
|
|
9
|
-
religion, or sexual identity and orientation.
|
|
10
|
-
|
|
11
|
-
## Enforcement
|
|
12
|
-
|
|
13
|
-
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
|
14
|
-
reported to the project team at conduct@geenius.app.
|
|
15
|
-
|
|
16
|
-
This Code of Conduct is adapted from the [Contributor Covenant](https://www.contributor-covenant.org), version 2.1.
|
package/CONTRIBUTING.md
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
# Contributing to @geenius-seo
|
|
2
|
-
|
|
3
|
-
Thank you for your interest in contributing!
|
|
4
|
-
|
|
5
|
-
## Development Setup
|
|
6
|
-
|
|
7
|
-
```bash
|
|
8
|
-
git clone https://github.com/mxn2020/geenius-seo.git
|
|
9
|
-
cd geenius-seo
|
|
10
|
-
pnpm install
|
|
11
|
-
pnpm build
|
|
12
|
-
pnpm test
|
|
13
|
-
```
|
|
14
|
-
|
|
15
|
-
## Pull Request Process
|
|
16
|
-
|
|
17
|
-
1. Fork the repo and create a feature branch from `main`
|
|
18
|
-
2. Add or update tests as appropriate
|
|
19
|
-
3. Run `pnpm changeset` to describe your changes for the changelog
|
|
20
|
-
4. Open a PR against `main`
|
|
21
|
-
|
|
22
|
-
## Code Style
|
|
23
|
-
|
|
24
|
-
- TypeScript strict mode
|
|
25
|
-
- ESLint + Prettier formatting
|
|
26
|
-
- Conventional commits preferred
|
package/SECURITY.md
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
# Security Policy
|
|
2
|
-
|
|
3
|
-
## Supported Versions
|
|
4
|
-
|
|
5
|
-
| Version | Supported |
|
|
6
|
-
| ------- | --------- |
|
|
7
|
-
| 0.x.x | ✅ |
|
|
8
|
-
|
|
9
|
-
## Reporting a Vulnerability
|
|
10
|
-
|
|
11
|
-
Please report security vulnerabilities by emailing **security@geenius.app**.
|
|
12
|
-
|
|
13
|
-
Do **not** open a public GitHub issue for security vulnerabilities.
|
|
14
|
-
|
|
15
|
-
We will acknowledge receipt within 48 hours and provide a detailed response within 5 business days.
|
package/SUPPORT.md
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
# Support
|
|
2
|
-
|
|
3
|
-
## Getting Help
|
|
4
|
-
|
|
5
|
-
- 📖 [Documentation](https://docs.geenius.app)
|
|
6
|
-
- 🐛 [Bug Reports](https://github.com/mxn2020/geenius-seo/issues/new?template=bug_report.md)
|
|
7
|
-
- 💡 [Feature Requests](https://github.com/mxn2020/geenius-seo/issues/new?template=feature_request.md)
|
|
8
|
-
- 📧 Email: support@geenius.app
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@geenius-seo/convex",
|
|
3
|
-
"version": "0.1.0",
|
|
4
|
-
"private": false,
|
|
5
|
-
"type": "module",
|
|
6
|
-
"description": "Convex backend functions and schema for the Geenius SEO system",
|
|
7
|
-
"author": "Antigravity HQ",
|
|
8
|
-
"license": "MIT",
|
|
9
|
-
"publishConfig": {
|
|
10
|
-
"access": "public"
|
|
11
|
-
},
|
|
12
|
-
"main": "./dist/index.js",
|
|
13
|
-
"module": "./dist/index.js",
|
|
14
|
-
"types": "./dist/index.d.ts",
|
|
15
|
-
"exports": {
|
|
16
|
-
".": {
|
|
17
|
-
"types": "./dist/index.d.ts",
|
|
18
|
-
"import": "./dist/index.js"
|
|
19
|
-
}
|
|
20
|
-
},
|
|
21
|
-
"files": [
|
|
22
|
-
"dist",
|
|
23
|
-
"src"
|
|
24
|
-
],
|
|
25
|
-
"scripts": {
|
|
26
|
-
"build": "tsup",
|
|
27
|
-
"clean": "rm -rf dist",
|
|
28
|
-
"type-check": "tsc --noEmit",
|
|
29
|
-
"prepublishOnly": "pnpm clean && pnpm build"
|
|
30
|
-
},
|
|
31
|
-
"peerDependencies": {
|
|
32
|
-
"convex": "^1.34.0"
|
|
33
|
-
},
|
|
34
|
-
"devDependencies": {
|
|
35
|
-
"convex": "^1.34.0",
|
|
36
|
-
"tsup": "^8.5.1",
|
|
37
|
-
"typescript": "~6.0.2"
|
|
38
|
-
},
|
|
39
|
-
"engines": {
|
|
40
|
-
"node": ">=20.0.0"
|
|
41
|
-
}
|
|
42
|
-
}
|
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
import { mutation } from './_generated/server'
|
|
2
|
-
import { v } from 'convex/values'
|
|
3
|
-
|
|
4
|
-
export const upsertSEOMeta = mutation({
|
|
5
|
-
args: {
|
|
6
|
-
path: v.string(),
|
|
7
|
-
meta: v.any(),
|
|
8
|
-
},
|
|
9
|
-
async handler(ctx, args) {
|
|
10
|
-
const existing = await ctx.db
|
|
11
|
-
.query('seo_pages')
|
|
12
|
-
.withIndex('by_path', (q) => q.eq('path', args.path))
|
|
13
|
-
.first()
|
|
14
|
-
|
|
15
|
-
const now = new Date().toISOString()
|
|
16
|
-
|
|
17
|
-
if (existing) {
|
|
18
|
-
await ctx.db.patch(existing._id, {
|
|
19
|
-
meta: args.meta,
|
|
20
|
-
lastModified: now,
|
|
21
|
-
})
|
|
22
|
-
return existing._id
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
return await ctx.db.insert('seo_pages', {
|
|
26
|
-
path: args.path,
|
|
27
|
-
meta: args.meta,
|
|
28
|
-
lastModified: now,
|
|
29
|
-
createdAt: now,
|
|
30
|
-
})
|
|
31
|
-
},
|
|
32
|
-
})
|
|
33
|
-
|
|
34
|
-
export const updateAnalytics = mutation({
|
|
35
|
-
args: {
|
|
36
|
-
path: v.string(),
|
|
37
|
-
views: v.number(),
|
|
38
|
-
avgTime: v.number(),
|
|
39
|
-
bounceRate: v.number(),
|
|
40
|
-
date: v.string(),
|
|
41
|
-
},
|
|
42
|
-
async handler(ctx, args) {
|
|
43
|
-
// Check if entry exists for this path and date
|
|
44
|
-
const existing = await ctx.db
|
|
45
|
-
.query('seo_analytics')
|
|
46
|
-
.withIndex('by_path', (q) => q.eq('path', args.path))
|
|
47
|
-
.filter((q) => q.eq(q.field('date'), args.date))
|
|
48
|
-
.first()
|
|
49
|
-
|
|
50
|
-
if (existing) {
|
|
51
|
-
await ctx.db.patch(existing._id, {
|
|
52
|
-
views: args.views,
|
|
53
|
-
avgTimeOnPage: args.avgTime,
|
|
54
|
-
bounceRate: args.bounceRate,
|
|
55
|
-
})
|
|
56
|
-
return existing._id
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
return await ctx.db.insert('seo_analytics', {
|
|
60
|
-
path: args.path,
|
|
61
|
-
views: args.views,
|
|
62
|
-
avgTimeOnPage: args.avgTime,
|
|
63
|
-
bounceRate: args.bounceRate,
|
|
64
|
-
date: args.date,
|
|
65
|
-
})
|
|
66
|
-
},
|
|
67
|
-
})
|
|
68
|
-
|
|
69
|
-
export const deleteSEOMeta = mutation({
|
|
70
|
-
args: { path: v.string() },
|
|
71
|
-
async handler(ctx, args) {
|
|
72
|
-
const entry = await ctx.db
|
|
73
|
-
.query('seo_pages')
|
|
74
|
-
.withIndex('by_path', (q) => q.eq('path', args.path))
|
|
75
|
-
.first()
|
|
76
|
-
|
|
77
|
-
if (entry) {
|
|
78
|
-
await ctx.db.delete(entry._id)
|
|
79
|
-
return true
|
|
80
|
-
}
|
|
81
|
-
return false
|
|
82
|
-
},
|
|
83
|
-
})
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
import { query } from './_generated/server'
|
|
2
|
-
import { v } from 'convex/values'
|
|
3
|
-
|
|
4
|
-
export const getSEOMeta = query({
|
|
5
|
-
args: { path: v.string() },
|
|
6
|
-
async handler(ctx, args) {
|
|
7
|
-
return await ctx.db
|
|
8
|
-
.query('seo_pages')
|
|
9
|
-
.withIndex('by_path', (q) => q.eq('path', args.path))
|
|
10
|
-
.first()
|
|
11
|
-
},
|
|
12
|
-
})
|
|
13
|
-
|
|
14
|
-
export const listPages = query({
|
|
15
|
-
args: { limit: v.optional(v.number()) },
|
|
16
|
-
async handler(ctx, args) {
|
|
17
|
-
return await ctx.db
|
|
18
|
-
.query('seo_pages')
|
|
19
|
-
.order('desc')
|
|
20
|
-
.take(args.limit ?? 100)
|
|
21
|
-
},
|
|
22
|
-
})
|
|
23
|
-
|
|
24
|
-
export const getPageAnalytics = query({
|
|
25
|
-
args: { path: v.string(), days: v.optional(v.number()) },
|
|
26
|
-
async handler(ctx, args) {
|
|
27
|
-
const daysAgo = args.days ?? 30
|
|
28
|
-
const cutoffDate = new Date()
|
|
29
|
-
cutoffDate.setDate(cutoffDate.getDate() - daysAgo)
|
|
30
|
-
const cutoffIso = cutoffDate.toISOString().split('T')[0]
|
|
31
|
-
|
|
32
|
-
return await ctx.db
|
|
33
|
-
.query('seo_analytics')
|
|
34
|
-
.withIndex('by_path', (q) => q.eq('path', args.path))
|
|
35
|
-
.filter((q) => q.gte(q.field('date'), cutoffIso))
|
|
36
|
-
.collect()
|
|
37
|
-
},
|
|
38
|
-
})
|
|
39
|
-
|
|
40
|
-
export const getTopPages = query({
|
|
41
|
-
args: { limit: v.optional(v.number()) },
|
|
42
|
-
async handler(ctx, args) {
|
|
43
|
-
const allAnalytics = await ctx.db.query('seo_analytics').collect()
|
|
44
|
-
|
|
45
|
-
// Group by path and sum views
|
|
46
|
-
const grouped: Record<string, number> = {}
|
|
47
|
-
allAnalytics.forEach((entry) => {
|
|
48
|
-
grouped[entry.path] = (grouped[entry.path] ?? 0) + entry.views
|
|
49
|
-
})
|
|
50
|
-
|
|
51
|
-
// Sort and take top N
|
|
52
|
-
return Object.entries(grouped)
|
|
53
|
-
.sort((a, b) => b[1] - a[1])
|
|
54
|
-
.slice(0, args.limit ?? 10)
|
|
55
|
-
.map(([path, views]) => ({ path, views }))
|
|
56
|
-
},
|
|
57
|
-
})
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { defineSchema, defineTable } from 'convex/server'
|
|
2
|
-
import { v } from 'convex/values'
|
|
3
|
-
|
|
4
|
-
export default defineSchema({
|
|
5
|
-
seo_pages: defineTable({
|
|
6
|
-
path: v.string(),
|
|
7
|
-
meta: v.any(),
|
|
8
|
-
lastModified: v.string(),
|
|
9
|
-
createdAt: v.string(),
|
|
10
|
-
})
|
|
11
|
-
.index('by_path', ['path'])
|
|
12
|
-
.index('by_modified', ['lastModified']),
|
|
13
|
-
|
|
14
|
-
seo_analytics: defineTable({
|
|
15
|
-
path: v.string(),
|
|
16
|
-
views: v.number(),
|
|
17
|
-
avgTimeOnPage: v.number(),
|
|
18
|
-
bounceRate: v.number(),
|
|
19
|
-
date: v.string(),
|
|
20
|
-
})
|
|
21
|
-
.index('by_path', ['path'])
|
|
22
|
-
.index('by_date', ['date']),
|
|
23
|
-
})
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"extends": "../../tsconfig.json",
|
|
3
|
-
"compilerOptions": {
|
|
4
|
-
"outDir": "dist",
|
|
5
|
-
"rootDir": "src",
|
|
6
|
-
"strict": true,
|
|
7
|
-
"skipLibCheck": true,
|
|
8
|
-
"forceConsistentCasingInFileNames": true,
|
|
9
|
-
"resolveJsonModule": true,
|
|
10
|
-
"isolatedModules": true,
|
|
11
|
-
"target": "ES2022",
|
|
12
|
-
"module": "ESNext",
|
|
13
|
-
"moduleResolution": "bundler"
|
|
14
|
-
},
|
|
15
|
-
"include": [
|
|
16
|
-
"src"
|
|
17
|
-
]
|
|
18
|
-
}
|
|
19
|
-
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { defineConfig } from 'tsup'
|
|
2
|
-
|
|
3
|
-
export default defineConfig({
|
|
4
|
-
entry: {
|
|
5
|
-
index: 'src/index.ts',
|
|
6
|
-
},
|
|
7
|
-
format: ['esm'],
|
|
8
|
-
dts: true,
|
|
9
|
-
clean: true,
|
|
10
|
-
sourcemap: true,
|
|
11
|
-
external: [
|
|
12
|
-
'convex',
|
|
13
|
-
'convex/server',
|
|
14
|
-
'convex/values',
|
|
15
|
-
'convex/react',
|
|
16
|
-
],
|
|
17
|
-
})
|
|
18
|
-
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@geenius-seo/react",
|
|
3
|
-
"version": "0.1.0",
|
|
4
|
-
"private": false,
|
|
5
|
-
"type": "module",
|
|
6
|
-
"description": "Geenius Seo — React components & hooks",
|
|
7
|
-
"author": "Antigravity HQ",
|
|
8
|
-
"license": "MIT",
|
|
9
|
-
"publishConfig": {
|
|
10
|
-
"access": "public"
|
|
11
|
-
},
|
|
12
|
-
"main": "./dist/index.js",
|
|
13
|
-
"module": "./dist/index.js",
|
|
14
|
-
"types": "./dist/index.d.ts",
|
|
15
|
-
"exports": {
|
|
16
|
-
".": {
|
|
17
|
-
"types": "./dist/index.d.ts",
|
|
18
|
-
"import": "./dist/index.js"
|
|
19
|
-
}
|
|
20
|
-
},
|
|
21
|
-
"files": [
|
|
22
|
-
"dist",
|
|
23
|
-
"src"
|
|
24
|
-
],
|
|
25
|
-
"scripts": {
|
|
26
|
-
"build": "tsup",
|
|
27
|
-
"clean": "rm -rf dist",
|
|
28
|
-
"type-check": "tsc --noEmit",
|
|
29
|
-
"prepublishOnly": "pnpm clean && pnpm build"
|
|
30
|
-
},
|
|
31
|
-
"dependencies": {
|
|
32
|
-
"@geenius-seo/shared": "workspace:*"
|
|
33
|
-
},
|
|
34
|
-
"devDependencies": {
|
|
35
|
-
"@types/react": "^19.0.0",
|
|
36
|
-
"@types/react-dom": "^19.0.0",
|
|
37
|
-
"react": "^19.2.4",
|
|
38
|
-
"react-dom": "^19.2.4",
|
|
39
|
-
"tsup": "^8.5.1",
|
|
40
|
-
"typescript": "~6.0.2"
|
|
41
|
-
},
|
|
42
|
-
"peerDependencies": {
|
|
43
|
-
"react": "^18.0.0 || ^19.0.0",
|
|
44
|
-
"react-dom": "^18.0.0 || ^19.0.0"
|
|
45
|
-
},
|
|
46
|
-
"engines": {
|
|
47
|
-
"node": ">=20.0.0"
|
|
48
|
-
}
|
|
49
|
-
}
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import { useEffect } from 'react'
|
|
2
|
-
import { articleSchema } from '@geenius-seo/shared'
|
|
3
|
-
|
|
4
|
-
interface ArticleJsonLdProps {
|
|
5
|
-
title: string
|
|
6
|
-
description: string
|
|
7
|
-
author: string
|
|
8
|
-
datePublished: string
|
|
9
|
-
url: string
|
|
10
|
-
image?: string
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
export function ArticleJsonLd({
|
|
14
|
-
title,
|
|
15
|
-
description,
|
|
16
|
-
author,
|
|
17
|
-
datePublished,
|
|
18
|
-
url,
|
|
19
|
-
image,
|
|
20
|
-
}: ArticleJsonLdProps) {
|
|
21
|
-
useEffect(() => {
|
|
22
|
-
const script = document.createElement('script')
|
|
23
|
-
script.type = 'application/ld+json'
|
|
24
|
-
script.textContent = JSON.stringify(
|
|
25
|
-
articleSchema({
|
|
26
|
-
title,
|
|
27
|
-
description,
|
|
28
|
-
author,
|
|
29
|
-
datePublished,
|
|
30
|
-
url,
|
|
31
|
-
image,
|
|
32
|
-
}),
|
|
33
|
-
)
|
|
34
|
-
document.head.appendChild(script)
|
|
35
|
-
|
|
36
|
-
return () => {
|
|
37
|
-
document.head.removeChild(script)
|
|
38
|
-
}
|
|
39
|
-
}, [title, description, author, datePublished, url, image])
|
|
40
|
-
|
|
41
|
-
return null
|
|
42
|
-
}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { useEffect } from 'react'
|
|
2
|
-
import { breadcrumbSchema } from '@geenius-seo/shared'
|
|
3
|
-
|
|
4
|
-
interface BreadcrumbsJsonLdProps {
|
|
5
|
-
items: {
|
|
6
|
-
name: string
|
|
7
|
-
url: string
|
|
8
|
-
}[]
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
export function BreadcrumbsJsonLd({ items }: BreadcrumbsJsonLdProps) {
|
|
12
|
-
useEffect(() => {
|
|
13
|
-
const script = document.createElement('script')
|
|
14
|
-
script.type = 'application/ld+json'
|
|
15
|
-
script.textContent = JSON.stringify(breadcrumbSchema(items))
|
|
16
|
-
document.head.appendChild(script)
|
|
17
|
-
|
|
18
|
-
return () => {
|
|
19
|
-
document.head.removeChild(script)
|
|
20
|
-
}
|
|
21
|
-
}, [items])
|
|
22
|
-
|
|
23
|
-
return null
|
|
24
|
-
}
|