Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/workflows/syndicate-post.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ jobs:
elif [ "$TARGET_DOCUMENT_ID" = "enrich-aeo-seo" ]; then
SANITY_STUDIO_DATASET=production node scripts/enrich-all-posts-aeo-seo-links.mjs
SANITY_STUDIO_DATASET=dev node scripts/enrich-all-posts-aeo-seo-links.mjs
elif [ "$TARGET_DOCUMENT_ID" = "trend-radar" ]; then
SANITY_STUDIO_DATASET=production node scripts/run-trend-radar.mjs
SANITY_STUDIO_DATASET=dev node scripts/run-trend-radar.mjs
else
node scripts/run-syndicate-post.mjs
fi
Expand Down
320 changes: 290 additions & 30 deletions apps/sanity/extract.json
Original file line number Diff line number Diff line change
Expand Up @@ -530,6 +530,296 @@
"dereferencesTo": "podcast"
}
},
{
"name": "trendSignal",
"type": "document",
"attributes": {
"_id": {
"type": "objectAttribute",
"value": {
"type": "string"
}
},
"_type": {
"type": "objectAttribute",
"value": {
"type": "string",
"value": "trendSignal"
}
},
"_createdAt": {
"type": "objectAttribute",
"value": {
"type": "string"
}
},
"_updatedAt": {
"type": "objectAttribute",
"value": {
"type": "string"
}
},
"_rev": {
"type": "objectAttribute",
"value": {
"type": "string"
}
},
"title": {
"type": "objectAttribute",
"value": {
"type": "string"
},
"optional": true
},
"slug": {
"type": "objectAttribute",
"value": {
"type": "inline",
"name": "slug"
},
"optional": true
},
"source": {
"type": "objectAttribute",
"value": {
"type": "union",
"of": [
{
"type": "string",
"value": "google-trends"
},
{
"type": "string",
"value": "dailydev"
},
{
"type": "string",
"value": "hackernews"
},
{
"type": "string",
"value": "github-trending"
},
{
"type": "string",
"value": "reddit"
}
]
},
"optional": true
},
"sourceUrl": {
"type": "objectAttribute",
"value": {
"type": "string"
},
"optional": true
},
"score": {
"type": "objectAttribute",
"value": {
"type": "number"
},
"optional": true
},
"status": {
"type": "objectAttribute",
"value": {
"type": "union",
"of": [
{
"type": "string",
"value": "discovered"
},
{
"type": "string",
"value": "drafted"
},
{
"type": "string",
"value": "scheduled"
},
{
"type": "string",
"value": "published"
},
{
"type": "string",
"value": "ignored"
}
]
},
"optional": true
},
"tags": {
"type": "objectAttribute",
"value": {
"type": "array",
"of": {
"type": "object",
"attributes": {
"label": {
"type": "objectAttribute",
"value": {
"type": "string"
},
"optional": true
},
"value": {
"type": "objectAttribute",
"value": {
"type": "string"
},
"optional": true
},
"_type": {
"type": "objectAttribute",
"value": {
"type": "string",
"value": "tag"
}
}
},
"rest": {
"type": "object",
"attributes": {
"_key": {
"type": "objectAttribute",
"value": {
"type": "string"
}
}
}
}
}
},
"optional": true
},
"summary": {
"type": "objectAttribute",
"value": {
"type": "string"
},
"optional": true
},
"rawMetrics": {
"type": "objectAttribute",
"value": {
"type": "string"
},
"optional": true
},
"matchedContent": {
"type": "objectAttribute",
"value": {
"type": "array",
"of": {
"type": "union",
"of": [
{
"type": "inline",
"name": "post.reference"
},
{
"type": "inline",
"name": "podcast.reference"
}
]
}
},
"optional": true
},
"draftPostId": {
"type": "objectAttribute",
"value": {
"type": "string"
},
"optional": true
},
"socialDrafts": {
"type": "objectAttribute",
"value": {
"type": "object",
"attributes": {
"x": {
"type": "objectAttribute",
"value": {
"type": "string"
},
"optional": true
},
"linkedin": {
"type": "objectAttribute",
"value": {
"type": "string"
},
"optional": true
},
"bluesky": {
"type": "objectAttribute",
"value": {
"type": "string"
},
"optional": true
},
"reddit": {
"type": "objectAttribute",
"value": {
"type": "string"
},
"optional": true
}
}
},
"optional": true
},
"discoveredAt": {
"type": "objectAttribute",
"value": {
"type": "string"
},
"optional": true
},
"expiresAt": {
"type": "objectAttribute",
"value": {
"type": "string"
},
"optional": true
}
}
},
{
"name": "slug",
"type": "type",
"value": {
"type": "object",
"attributes": {
"_type": {
"type": "objectAttribute",
"value": {
"type": "string",
"value": "slug"
}
},
"current": {
"type": "objectAttribute",
"value": {
"type": "string"
},
"optional": true
},
"source": {
"type": "objectAttribute",
"value": {
"type": "string"
},
"optional": true
}
}
}
},
{
"name": "syndication",
"type": "document",
Expand Down Expand Up @@ -9217,36 +9507,6 @@
}
}
},
{
"name": "slug",
"type": "type",
"value": {
"type": "object",
"attributes": {
"_type": {
"type": "objectAttribute",
"value": {
"type": "string",
"value": "slug"
}
},
"current": {
"type": "objectAttribute",
"value": {
"type": "string"
},
"optional": true
},
"source": {
"type": "objectAttribute",
"value": {
"type": "string"
},
"optional": true
}
}
}
},
{
"name": "sponsorConfig",
"type": "document",
Expand Down
2 changes: 2 additions & 0 deletions apps/sanity/sanity.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ import booking from "./schemas/documents/booking";
import tableSchema, { rowType } from "./schemas/custom/table";
import syndication from "./schemas/documents/syndication";
import transcript from "./schemas/documents/transcript";
import trendSignal from "./schemas/documents/trendSignal";

// ── Shared constants ─────────────────────────────────────────────────
const projectId = process.env.SANITY_STUDIO_PROJECT_ID || "hfh83o0w";
Expand Down Expand Up @@ -94,6 +95,7 @@ const schemaTypes = [
booking,
syndication,
transcript,
trendSignal,
];

// ── Build plugins for a given preview URL ────────────────────────────
Expand Down
Loading
Loading