Skip to content

Commit 7e35e30

Browse files
authored
Merge pull request #804 from CodingCatDev/dev
feat(sanity): promote Web Dev & AI Trend Radar pipeline to main
2 parents 275d24f + b4f9660 commit 7e35e30

6 files changed

Lines changed: 1491 additions & 31 deletions

File tree

‎.github/workflows/syndicate-post.yml‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,9 @@ jobs:
4242
elif [ "$TARGET_DOCUMENT_ID" = "enrich-aeo-seo" ]; then
4343
SANITY_STUDIO_DATASET=production node scripts/enrich-all-posts-aeo-seo-links.mjs
4444
SANITY_STUDIO_DATASET=dev node scripts/enrich-all-posts-aeo-seo-links.mjs
45+
elif [ "$TARGET_DOCUMENT_ID" = "trend-radar" ]; then
46+
SANITY_STUDIO_DATASET=production node scripts/run-trend-radar.mjs
47+
SANITY_STUDIO_DATASET=dev node scripts/run-trend-radar.mjs
4548
else
4649
node scripts/run-syndicate-post.mjs
4750
fi

‎apps/sanity/extract.json‎

Lines changed: 290 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -530,6 +530,296 @@
530530
"dereferencesTo": "podcast"
531531
}
532532
},
533+
{
534+
"name": "trendSignal",
535+
"type": "document",
536+
"attributes": {
537+
"_id": {
538+
"type": "objectAttribute",
539+
"value": {
540+
"type": "string"
541+
}
542+
},
543+
"_type": {
544+
"type": "objectAttribute",
545+
"value": {
546+
"type": "string",
547+
"value": "trendSignal"
548+
}
549+
},
550+
"_createdAt": {
551+
"type": "objectAttribute",
552+
"value": {
553+
"type": "string"
554+
}
555+
},
556+
"_updatedAt": {
557+
"type": "objectAttribute",
558+
"value": {
559+
"type": "string"
560+
}
561+
},
562+
"_rev": {
563+
"type": "objectAttribute",
564+
"value": {
565+
"type": "string"
566+
}
567+
},
568+
"title": {
569+
"type": "objectAttribute",
570+
"value": {
571+
"type": "string"
572+
},
573+
"optional": true
574+
},
575+
"slug": {
576+
"type": "objectAttribute",
577+
"value": {
578+
"type": "inline",
579+
"name": "slug"
580+
},
581+
"optional": true
582+
},
583+
"source": {
584+
"type": "objectAttribute",
585+
"value": {
586+
"type": "union",
587+
"of": [
588+
{
589+
"type": "string",
590+
"value": "google-trends"
591+
},
592+
{
593+
"type": "string",
594+
"value": "dailydev"
595+
},
596+
{
597+
"type": "string",
598+
"value": "hackernews"
599+
},
600+
{
601+
"type": "string",
602+
"value": "github-trending"
603+
},
604+
{
605+
"type": "string",
606+
"value": "reddit"
607+
}
608+
]
609+
},
610+
"optional": true
611+
},
612+
"sourceUrl": {
613+
"type": "objectAttribute",
614+
"value": {
615+
"type": "string"
616+
},
617+
"optional": true
618+
},
619+
"score": {
620+
"type": "objectAttribute",
621+
"value": {
622+
"type": "number"
623+
},
624+
"optional": true
625+
},
626+
"status": {
627+
"type": "objectAttribute",
628+
"value": {
629+
"type": "union",
630+
"of": [
631+
{
632+
"type": "string",
633+
"value": "discovered"
634+
},
635+
{
636+
"type": "string",
637+
"value": "drafted"
638+
},
639+
{
640+
"type": "string",
641+
"value": "scheduled"
642+
},
643+
{
644+
"type": "string",
645+
"value": "published"
646+
},
647+
{
648+
"type": "string",
649+
"value": "ignored"
650+
}
651+
]
652+
},
653+
"optional": true
654+
},
655+
"tags": {
656+
"type": "objectAttribute",
657+
"value": {
658+
"type": "array",
659+
"of": {
660+
"type": "object",
661+
"attributes": {
662+
"label": {
663+
"type": "objectAttribute",
664+
"value": {
665+
"type": "string"
666+
},
667+
"optional": true
668+
},
669+
"value": {
670+
"type": "objectAttribute",
671+
"value": {
672+
"type": "string"
673+
},
674+
"optional": true
675+
},
676+
"_type": {
677+
"type": "objectAttribute",
678+
"value": {
679+
"type": "string",
680+
"value": "tag"
681+
}
682+
}
683+
},
684+
"rest": {
685+
"type": "object",
686+
"attributes": {
687+
"_key": {
688+
"type": "objectAttribute",
689+
"value": {
690+
"type": "string"
691+
}
692+
}
693+
}
694+
}
695+
}
696+
},
697+
"optional": true
698+
},
699+
"summary": {
700+
"type": "objectAttribute",
701+
"value": {
702+
"type": "string"
703+
},
704+
"optional": true
705+
},
706+
"rawMetrics": {
707+
"type": "objectAttribute",
708+
"value": {
709+
"type": "string"
710+
},
711+
"optional": true
712+
},
713+
"matchedContent": {
714+
"type": "objectAttribute",
715+
"value": {
716+
"type": "array",
717+
"of": {
718+
"type": "union",
719+
"of": [
720+
{
721+
"type": "inline",
722+
"name": "post.reference"
723+
},
724+
{
725+
"type": "inline",
726+
"name": "podcast.reference"
727+
}
728+
]
729+
}
730+
},
731+
"optional": true
732+
},
733+
"draftPostId": {
734+
"type": "objectAttribute",
735+
"value": {
736+
"type": "string"
737+
},
738+
"optional": true
739+
},
740+
"socialDrafts": {
741+
"type": "objectAttribute",
742+
"value": {
743+
"type": "object",
744+
"attributes": {
745+
"x": {
746+
"type": "objectAttribute",
747+
"value": {
748+
"type": "string"
749+
},
750+
"optional": true
751+
},
752+
"linkedin": {
753+
"type": "objectAttribute",
754+
"value": {
755+
"type": "string"
756+
},
757+
"optional": true
758+
},
759+
"bluesky": {
760+
"type": "objectAttribute",
761+
"value": {
762+
"type": "string"
763+
},
764+
"optional": true
765+
},
766+
"reddit": {
767+
"type": "objectAttribute",
768+
"value": {
769+
"type": "string"
770+
},
771+
"optional": true
772+
}
773+
}
774+
},
775+
"optional": true
776+
},
777+
"discoveredAt": {
778+
"type": "objectAttribute",
779+
"value": {
780+
"type": "string"
781+
},
782+
"optional": true
783+
},
784+
"expiresAt": {
785+
"type": "objectAttribute",
786+
"value": {
787+
"type": "string"
788+
},
789+
"optional": true
790+
}
791+
}
792+
},
793+
{
794+
"name": "slug",
795+
"type": "type",
796+
"value": {
797+
"type": "object",
798+
"attributes": {
799+
"_type": {
800+
"type": "objectAttribute",
801+
"value": {
802+
"type": "string",
803+
"value": "slug"
804+
}
805+
},
806+
"current": {
807+
"type": "objectAttribute",
808+
"value": {
809+
"type": "string"
810+
},
811+
"optional": true
812+
},
813+
"source": {
814+
"type": "objectAttribute",
815+
"value": {
816+
"type": "string"
817+
},
818+
"optional": true
819+
}
820+
}
821+
}
822+
},
533823
{
534824
"name": "syndication",
535825
"type": "document",
@@ -9217,36 +9507,6 @@
92179507
}
92189508
}
92199509
},
9220-
{
9221-
"name": "slug",
9222-
"type": "type",
9223-
"value": {
9224-
"type": "object",
9225-
"attributes": {
9226-
"_type": {
9227-
"type": "objectAttribute",
9228-
"value": {
9229-
"type": "string",
9230-
"value": "slug"
9231-
}
9232-
},
9233-
"current": {
9234-
"type": "objectAttribute",
9235-
"value": {
9236-
"type": "string"
9237-
},
9238-
"optional": true
9239-
},
9240-
"source": {
9241-
"type": "objectAttribute",
9242-
"value": {
9243-
"type": "string"
9244-
},
9245-
"optional": true
9246-
}
9247-
}
9248-
}
9249-
},
92509510
{
92519511
"name": "sponsorConfig",
92529512
"type": "document",

‎apps/sanity/sanity.config.ts‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ import booking from "./schemas/documents/booking";
3939
import tableSchema, { rowType } from "./schemas/custom/table";
4040
import syndication from "./schemas/documents/syndication";
4141
import transcript from "./schemas/documents/transcript";
42+
import trendSignal from "./schemas/documents/trendSignal";
4243

4344
// ── Shared constants ─────────────────────────────────────────────────
4445
const projectId = process.env.SANITY_STUDIO_PROJECT_ID || "hfh83o0w";
@@ -94,6 +95,7 @@ const schemaTypes = [
9495
booking,
9596
syndication,
9697
transcript,
98+
trendSignal,
9799
];
98100

99101
// ── Build plugins for a given preview URL ────────────────────────────

0 commit comments

Comments
 (0)