/kommunity-content

Repository of content for the kompanion kommunity ✨

Primary LanguageJavaScript

kompanion kommunity - curated content 🥑

This repo is used solely for storing and revisioning content for the kompanion kommunity.

// Content's type definition in Typescript 

// These types below (ex: TExpertiseLevels) are basically describing which strings are accepted for
// each property of the content model (expertiseLevel, category, format).

// "format?:" -> the question mark (?) means it's an optional property

type TExpertiseLevels = "beginner" | "intermediate" | "advanced" | "allLevels";
type TCategories = "CMS" | "GraphQL" | "Business" | "Themes" | "Workflow" | "CSS" | "SEO" | "React" | "PWA" | "DevOps" | "Design";
type TFormats = "video" | "article" | "audio" | "tutorial" | "course" | "book" | "tool";

interface IRecommendation {
  comment: string; // why is it important - max. 140char
  user: string; // the handle of the user in GitHub
}

interface IContent {
  title: string;
  url: string;
  recommendations: IRecommendation;
  category: TCategories;
  expertiseLevel?: TExpertiseLevels; // who is it for?
  format?: TFormats;
}

File names will come in the shape slugified-url.json.

Importing from Notion

Super useful if you're constantly saving content from the web with Notion's webclipper. (More to write about this later)

  1. Export your table as .csv;
  2. Use CSV to JSON Converter to create a huge JSON array;
  3. Find and replace in VS Code:
  4. find: ("importance": "[^"]*")
  5. replace: "suggestions": [{ "user": "YOUR_GH_HANDLE_HERE", $1}]