-
Notifications
You must be signed in to change notification settings - Fork 123
Show case studies and product updates in feed #7192
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
hasparus
wants to merge
23
commits into
main
Choose a base branch
from
hacky-product-updates-in-feed
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 16 commits
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
8ee063b
Add `@next/bundle-analyzer` and `pnpm prettier` script to docs
hasparus a804bd1
Install zod in docs (same version as elsewhere)
hasparus 2e59252
Add dates to case studies
hasparus b43dd3f
Unify case study card height
hasparus 912be44
Start showing MoreStoriesSection in prod
hasparus 591724e
Overlap product updates and blog frontmatter types
hasparus 0656f2f
Show case studies and product updates in blog
hasparus 48daade
Expose case studies and product updates in RSS feed
hasparus 2e5e40a
Add zod schemas to author types
hasparus f4bf439
Add zod schema to blog mdx types
hasparus 9baa925
Add zod schemas to case studies
hasparus a28f187
Use zod schema in `isCaseStudy`
hasparus bdff7e5
Use zod to parse blog frontmatter
hasparus 3c8bb4d
Remove old console.log
hasparus 5b6857c
Parse, don't validate
hasparus fa775e6
Move @types/rss to dependencies to silence ESLint
hasparus 7743f6a
Accept single author as before
hasparus cac1fb1
Update packages/web/docs/src/app/blog/page.tsx
hasparus 6761aab
Remove unused imports
hasparus 6a0ec30
Add a tag to product updates
hasparus 49bd062
Handle empty author properly
hasparus c4c6495
Make the author optional in blog card (needed to render for Wealthsim…
hasparus fd8f2da
Merge branch 'main' into hacky-product-updates-in-feed
hasparus File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 |
|---|---|---|
|
|
@@ -7,8 +7,10 @@ | |
| }, | ||
| "scripts": { | ||
| "build": "next build && next-sitemap", | ||
| "build:analyze": "ANALYZE=true next build", | ||
| "dev": "next --turbopack", | ||
| "postbuild": "pagefind --site .next/server/app --output-path out/_pagefind", | ||
| "prettier": "prettier --cache --write --list-different --ignore-unknown src", | ||
| "validate-mdx-links": "pnpx [email protected] --files 'src/**/*.mdx'" | ||
| }, | ||
| "dependencies": { | ||
|
|
@@ -17,6 +19,7 @@ | |
| "@radix-ui/react-tabs": "1.1.2", | ||
| "@radix-ui/react-tooltip": "1.1.6", | ||
| "@theguild/components": "9.11.0", | ||
| "@types/rss": "^0.0.32", | ||
| "class-variance-authority": "0.7.1", | ||
| "clsx": "2.1.1", | ||
| "date-fns": "4.1.0", | ||
|
|
@@ -28,14 +31,15 @@ | |
| "react-dom": "19.0.0", | ||
| "react-icons": "5.4.0", | ||
| "rehype-frontmatter-mdx-imports": "0.1.1", | ||
| "tailwind-merge": "2.6.0" | ||
| "tailwind-merge": "2.6.0", | ||
| "zod": "3.25.76" | ||
| }, | ||
| "devDependencies": { | ||
| "@mdx-js/typescript-plugin": "^0.0.8", | ||
| "@next/bundle-analyzer": "^16.0.0", | ||
| "@tailwindcss/typography": "0.5.16", | ||
| "@theguild/tailwind-config": "0.6.3", | ||
| "@types/react": "18.3.18", | ||
| "@types/rss": "^0.0.32", | ||
| "next-sitemap": "4.2.3", | ||
| "pagefind": "^1.2.0", | ||
| "postcss": "8.4.49", | ||
|
|
||
This file contains hidden or 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
4 changes: 2 additions & 2 deletions
4
...ages/web/docs/src/app/blog/(posts)/schema-design-best-practices-part-1/page.mdx
This file contains hidden or 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 hidden or 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 |
|---|---|---|
| @@ -1,21 +1,26 @@ | ||
| import type { StaticImageData } from 'next/image'; | ||
| import { AuthorId } from '../../authors'; | ||
| import { z } from 'zod'; | ||
| import { AuthorOrId, staticImageDataSchema } from '../../authors'; | ||
| import { parseSchema } from '../../lib/parse-schema'; | ||
hasparus marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| import { MdxFile, PageMapItem } from '../../mdx-types'; | ||
|
|
||
| export interface BlogFrontmatter { | ||
| authors: AuthorId | AuthorId[]; | ||
| title: string; | ||
| date: string; | ||
| tags: string | string[]; | ||
| featured?: boolean; | ||
| image?: VideoPath | StaticImageData; | ||
| thumbnail?: StaticImageData; | ||
| } | ||
| export const VideoPath = z | ||
| .string() | ||
| .regex(/^.+\.(webm|mp4)$/) as z.ZodType<`${string}.${'webm' | 'mp4'}`>; | ||
|
|
||
| type VideoPath = `${string}.${'webm' | 'mp4'}`; | ||
| export type VideoPath = z.infer<typeof VideoPath>; | ||
|
|
||
| export type BlogPostFile = Required<MdxFile<BlogFrontmatter>>; | ||
| export const BlogFrontmatter = z.object({ | ||
| authors: z.array(AuthorOrId), | ||
| title: z.string(), | ||
| date: z.string(), | ||
| tags: z.union([z.string(), z.array(z.string())]), | ||
| featured: z.boolean().optional(), | ||
| image: z.union([VideoPath, staticImageDataSchema]).optional(), | ||
| thumbnail: staticImageDataSchema.optional(), | ||
| description: z.string().optional(), | ||
| }); | ||
|
|
||
| export function isBlogPost(item: PageMapItem): item is BlogPostFile { | ||
| return item && 'route' in item && 'name' in item && 'frontMatter' in item && !!item.frontMatter; | ||
| } | ||
| export type BlogFrontmatter = z.infer<typeof BlogFrontmatter>; | ||
|
|
||
| export const BlogPostFile = MdxFile(BlogFrontmatter); | ||
| export type BlogPostFile = z.infer<typeof BlogPostFile>; | ||
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.