-
Notifications
You must be signed in to change notification settings - Fork 509
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(glossary): various workflow fixes & latest content (#2664)
* fix: move statelessness.mdx to glossary * fix: frontmatter indentation & missing fields * feat: add `categories` & `takeaways` workflows * feat: add `categories` & `takeaways` from frontmatter * takeaways is required * feat: add seo optimized h1 * feat(glossary): Add API Security.mdx to glossary * fixing duplicate db row creation * refactor(glossary): align takeaways schema across apps - Create strongly-typed Zod schema for takeaways in both billing and www apps - Add documentation indicating billing as source of truth - Update YAML frontmatter generation to match schema structure - Ensure type safety from LLM generation through to content collection BREAKING CHANGE: Takeaways schema is now strictly typed and validated. Existing content may need to be updated to match the new schema structure. TODO: Extract schema into shared package to avoid duplication * updates to content workflow * content * content * sitemap * updated content * `pnpm fmt` * update trigger * - fix workflow to create new PRs if a previous one was closed - add slug to frontmatter * update content for SSO * no diff? * final updated content * [autofix.ci] apply automated fixes --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> Co-authored-by: chronark <[email protected]>
- Loading branch information
1 parent
e97c730
commit 4eef4a3
Showing
24 changed files
with
1,240 additions
and
345 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 36 additions & 0 deletions
36
apps/billing/src/lib/db-marketing/schemas/takeaways-schema.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
import { z } from "zod"; | ||
|
||
/** | ||
* @description Schema for glossary entry takeaways | ||
* @sourceOfTruth This is the source of truth for the takeaways schema as it's used for database storage | ||
* @todo Extract this schema into a shared package to avoid duplication with apps/www | ||
*/ | ||
export const takeawaysSchema = z.object({ | ||
tldr: z.string(), | ||
definitionAndStructure: z.array( | ||
z.object({ | ||
key: z.string(), | ||
value: z.string(), | ||
}), | ||
), | ||
historicalContext: z.array( | ||
z.object({ | ||
key: z.string(), | ||
value: z.string(), | ||
}), | ||
), | ||
usageInAPIs: z.object({ | ||
tags: z.array(z.string()), | ||
description: z.string(), | ||
}), | ||
bestPractices: z.array(z.string()), | ||
recommendedReading: z.array( | ||
z.object({ | ||
title: z.string(), | ||
url: z.string(), | ||
}), | ||
), | ||
didYouKnow: z.string(), | ||
}); | ||
|
||
export type Takeaways = z.infer<typeof takeawaysSchema>; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.