From 65e78b8f495cb22d8f125effce415c9797308f4c Mon Sep 17 00:00:00 2001 From: Jennie Robinson Faber Date: Sat, 15 Nov 2025 13:43:21 +0000 Subject: [PATCH] Make all articles public --- app/server/models/Article.ts | 166 +++++++++--------- content/articles/actionable-steam-metrics.md | 2 +- content/articles/business-planning.md | 2 +- content/articles/canada-council-funding.md | 2 +- content/articles/cmf-quick-tips.md | 2 +- content/articles/expo-tips.md | 2 +- content/articles/game-discovery-toolkit.md | 2 +- content/articles/market-analysis.md | 2 +- content/articles/pitching-to-publishers.md | 2 +- content/articles/publisher-contract-review.md | 2 +- content/articles/schedule.md | 2 +- content/articles/self-assessment.md | 2 +- .../articles/stages-of-coop-development.md | 2 +- content/articles/structures-for-impact.md | 2 +- content/articles/tiktok-meeting-notes.md | 2 +- 15 files changed, 100 insertions(+), 94 deletions(-) diff --git a/app/server/models/Article.ts b/app/server/models/Article.ts index 91bd708..77cd80f 100644 --- a/app/server/models/Article.ts +++ b/app/server/models/Article.ts @@ -1,111 +1,117 @@ -import { Schema, model, Document, Types } from 'mongoose' +import { Schema, model, Document, Types } from "mongoose"; export interface IRevision { - content: string - author: Types.ObjectId - message: string - createdAt: Date + content: string; + author: Types.ObjectId; + message: string; + createdAt: Date; } export interface IComment { - author: Types.ObjectId - content: string - parentComment?: Types.ObjectId - createdAt: Date - updatedAt: Date - resolved: boolean + author: Types.ObjectId; + content: string; + parentComment?: Types.ObjectId; + createdAt: Date; + updatedAt: Date; + resolved: boolean; } export interface IArticle extends Document { - slug: string - title: string - description: string - content: string // Current content in markdown - category: string - tags: string[] + slug: string; + title: string; + description: string; + content: string; // Current content in markdown + category: string; + tags: string[]; // Access control - accessLevel: 'public' | 'member' | 'cohort' | 'admin' - cohorts?: string[] // Specific cohorts if accessLevel is 'cohort' + accessLevel: "public" | "member" | "cohort" | "admin"; + cohorts?: string[]; // Specific cohorts if accessLevel is 'cohort' // Metadata - author: Types.ObjectId - contributors: Types.ObjectId[] - views: number - likes: number + author: Types.ObjectId; + contributors: Types.ObjectId[]; + views: number; + likes: number; // Editing - status: 'draft' | 'published' | 'archived' - lockedBy?: Types.ObjectId // If someone is currently editing - lockedAt?: Date + status: "draft" | "published" | "archived"; + lockedBy?: Types.ObjectId; // If someone is currently editing + lockedAt?: Date; // History - revisions: IRevision[] - comments: IComment[] + revisions: IRevision[]; + comments: IComment[]; // Timestamps - createdAt: Date - updatedAt: Date - publishedAt?: Date + createdAt: Date; + updatedAt: Date; + publishedAt?: Date; } const revisionSchema = new Schema({ content: { type: String, required: true }, - author: { type: Schema.Types.ObjectId, ref: 'User', required: true }, + author: { type: Schema.Types.ObjectId, ref: "User", required: true }, message: { type: String, required: true }, - createdAt: { type: Date, default: Date.now } -}) + createdAt: { type: Date, default: Date.now }, +}); -const commentSchema = new Schema({ - author: { type: Schema.Types.ObjectId, ref: 'User', required: true }, - content: { type: String, required: true }, - parentComment: { type: Schema.Types.ObjectId, ref: 'Comment' }, - resolved: { type: Boolean, default: false } -}, { - timestamps: true -}) - -const articleSchema = new Schema({ - slug: { type: String, required: true, unique: true }, - title: { type: String, required: true }, - description: { type: String, required: true }, - content: { type: String, required: true }, - category: { type: String, required: true }, - tags: [{ type: String }], - - accessLevel: { - type: String, - enum: ['public', 'member', 'cohort', 'admin'], - default: 'member' +const commentSchema = new Schema( + { + author: { type: Schema.Types.ObjectId, ref: "User", required: true }, + content: { type: String, required: true }, + parentComment: { type: Schema.Types.ObjectId, ref: "Comment" }, + resolved: { type: Boolean, default: false }, }, - cohorts: [{ type: String }], - - author: { type: Schema.Types.ObjectId, ref: 'User', required: true }, - contributors: [{ type: Schema.Types.ObjectId, ref: 'User' }], - views: { type: Number, default: 0 }, - likes: { type: Number, default: 0 }, - - status: { - type: String, - enum: ['draft', 'published', 'archived'], - default: 'draft' + { + timestamps: true, }, - lockedBy: { type: Schema.Types.ObjectId, ref: 'User' }, - lockedAt: Date, +); - revisions: [revisionSchema], - comments: [commentSchema], +const articleSchema = new Schema( + { + slug: { type: String, required: true, unique: true }, + title: { type: String, required: true }, + description: { type: String, required: true }, + content: { type: String, required: true }, + category: { type: String, required: true }, + tags: [{ type: String }], - publishedAt: Date -}, { - timestamps: true -}) + accessLevel: { + type: String, + enum: ["public", "member", "cohort", "admin"], + default: "public", + }, + cohorts: [{ type: String }], + + author: { type: Schema.Types.ObjectId, ref: "User", required: true }, + contributors: [{ type: Schema.Types.ObjectId, ref: "User" }], + views: { type: Number, default: 0 }, + likes: { type: Number, default: 0 }, + + status: { + type: String, + enum: ["draft", "published", "archived"], + default: "draft", + }, + lockedBy: { type: Schema.Types.ObjectId, ref: "User" }, + lockedAt: Date, + + revisions: [revisionSchema], + comments: [commentSchema], + + publishedAt: Date, + }, + { + timestamps: true, + }, +); // Indexes for better query performance -articleSchema.index({ slug: 1 }) -articleSchema.index({ accessLevel: 1, status: 1 }) -articleSchema.index({ tags: 1 }) -articleSchema.index({ category: 1 }) -articleSchema.index({ author: 1 }) +articleSchema.index({ slug: 1 }); +articleSchema.index({ accessLevel: 1, status: 1 }); +articleSchema.index({ tags: 1 }); +articleSchema.index({ category: 1 }); +articleSchema.index({ author: 1 }); -export const Article = model('Article', articleSchema) \ No newline at end of file +export const Article = model("Article", articleSchema); diff --git a/content/articles/actionable-steam-metrics.md b/content/articles/actionable-steam-metrics.md index d969dc9..652da0d 100644 --- a/content/articles/actionable-steam-metrics.md +++ b/content/articles/actionable-steam-metrics.md @@ -4,7 +4,7 @@ description: '' category: strategy tags: [] accessLevel: member -author: Baby Ghosts Team +author: Baby Ghosts publishedAt: '2025-11-10T10:42:09.227Z' --- # Actionable Steam metrics diff --git a/content/articles/business-planning.md b/content/articles/business-planning.md index be020c3..d587980 100644 --- a/content/articles/business-planning.md +++ b/content/articles/business-planning.md @@ -4,7 +4,7 @@ description: A business plan is a critical document for impact-oriented studios. category: strategy tags: [] accessLevel: member -author: Baby Ghosts Team +author: Baby Ghosts publishedAt: '2025-11-10T10:42:09.221Z' --- # Business planning for impact diff --git a/content/articles/canada-council-funding.md b/content/articles/canada-council-funding.md index 08729aa..6baf9e9 100644 --- a/content/articles/canada-council-funding.md +++ b/content/articles/canada-council-funding.md @@ -4,7 +4,7 @@ description: '' category: strategy tags: [] accessLevel: member -author: Baby Ghosts Team +author: Baby Ghosts publishedAt: '2025-11-10T10:42:09.229Z' --- # Fund your game with Canada Council diff --git a/content/articles/cmf-quick-tips.md b/content/articles/cmf-quick-tips.md index 55cac8b..085f7e3 100644 --- a/content/articles/cmf-quick-tips.md +++ b/content/articles/cmf-quick-tips.md @@ -4,7 +4,7 @@ description: '' category: strategy tags: [] accessLevel: member -author: Baby Ghosts Team +author: Baby Ghosts publishedAt: '2025-11-10T10:42:09.229Z' --- # CMF Application Tips & Info diff --git a/content/articles/expo-tips.md b/content/articles/expo-tips.md index f34b677..b0030c9 100644 --- a/content/articles/expo-tips.md +++ b/content/articles/expo-tips.md @@ -4,7 +4,7 @@ description: '' category: strategy tags: [] accessLevel: member -author: Baby Ghosts Team +author: Baby Ghosts publishedAt: '2025-11-10T10:42:09.230Z' --- # Rocket Adrift Tips for In-Person Expositions diff --git a/content/articles/game-discovery-toolkit.md b/content/articles/game-discovery-toolkit.md index aa7a25f..eadbcda 100644 --- a/content/articles/game-discovery-toolkit.md +++ b/content/articles/game-discovery-toolkit.md @@ -4,7 +4,7 @@ description: '' category: strategy tags: [] accessLevel: member -author: Baby Ghosts Team +author: Baby Ghosts publishedAt: '2025-11-10T10:42:09.227Z' --- # Summary: The Complete Game Discovery Toolkit diff --git a/content/articles/market-analysis.md b/content/articles/market-analysis.md index 5201d95..8cde411 100644 --- a/content/articles/market-analysis.md +++ b/content/articles/market-analysis.md @@ -4,7 +4,7 @@ description: Market Analysis category: strategy tags: [] accessLevel: member -author: Baby Ghosts Team +author: Baby Ghosts publishedAt: '2025-11-10T10:42:09.226Z' --- # Market Analysis diff --git a/content/articles/pitching-to-publishers.md b/content/articles/pitching-to-publishers.md index b9eb734..6b1fed8 100644 --- a/content/articles/pitching-to-publishers.md +++ b/content/articles/pitching-to-publishers.md @@ -4,7 +4,7 @@ description: Pitching to Publishers category: strategy tags: [] accessLevel: member -author: Baby Ghosts Team +author: Baby Ghosts publishedAt: '2025-11-10T10:42:09.228Z' --- # Pitching to Publishers diff --git a/content/articles/publisher-contract-review.md b/content/articles/publisher-contract-review.md index c542716..1aa4e73 100644 --- a/content/articles/publisher-contract-review.md +++ b/content/articles/publisher-contract-review.md @@ -4,7 +4,7 @@ description: '' category: strategy tags: [] accessLevel: member -author: Baby Ghosts Team +author: Baby Ghosts publishedAt: '2025-11-10T10:42:09.229Z' --- # Whitethorn Games Contract Review diff --git a/content/articles/schedule.md b/content/articles/schedule.md index 94b5752..adf6e8b 100644 --- a/content/articles/schedule.md +++ b/content/articles/schedule.md @@ -4,7 +4,7 @@ description: '' category: programs tags: [] accessLevel: member -author: Baby Ghosts Team +author: Baby Ghosts publishedAt: '2025-11-10T10:42:09.231Z' --- # Program Schedule diff --git a/content/articles/self-assessment.md b/content/articles/self-assessment.md index b5b9358..22ec22c 100644 --- a/content/articles/self-assessment.md +++ b/content/articles/self-assessment.md @@ -4,7 +4,7 @@ description: '' category: programs tags: [] accessLevel: member -author: Baby Ghosts Team +author: Baby Ghosts publishedAt: '2025-11-10T10:42:09.231Z' --- [Self-Assessment Document](https://docs.google.com/document/d/15og3YqFdMO3o3zr-fbYgwPHgbQnevbxZ7SVCcbjRhc8/edit?usp=drive_link) - go to the File menu and select _Make a Copy_. diff --git a/content/articles/stages-of-coop-development.md b/content/articles/stages-of-coop-development.md index 6f0aaff..ebac146 100644 --- a/content/articles/stages-of-coop-development.md +++ b/content/articles/stages-of-coop-development.md @@ -4,7 +4,7 @@ description: '' category: programs tags: [] accessLevel: member -author: Baby Ghosts Team +author: Baby Ghosts publishedAt: '2025-11-10T10:42:09.232Z' --- # Stages of Cooperative Development diff --git a/content/articles/structures-for-impact.md b/content/articles/structures-for-impact.md index 3668595..cc8ef99 100644 --- a/content/articles/structures-for-impact.md +++ b/content/articles/structures-for-impact.md @@ -4,7 +4,7 @@ description: '' category: strategy tags: [] accessLevel: member -author: Baby Ghosts Team +author: Baby Ghosts publishedAt: '2025-11-10T10:42:09.223Z' --- # Choosing an impactful business structure diff --git a/content/articles/tiktok-meeting-notes.md b/content/articles/tiktok-meeting-notes.md index b8ab0b6..8a121af 100644 --- a/content/articles/tiktok-meeting-notes.md +++ b/content/articles/tiktok-meeting-notes.md @@ -4,7 +4,7 @@ description: 'TikTok Marketing Meeting: July 3, 2023' category: strategy tags: [] accessLevel: member -author: Baby Ghosts Team +author: Baby Ghosts publishedAt: '2025-11-10T10:42:09.230Z' --- # TikTok Marketing Meeting: July 3, 2023