Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
486f782
Use green GetYourApiGameRight in case studies (per designers request)
hasparus Oct 22, 2025
5cede69
Grab Toast customer story draft from Notion
hasparus Oct 23, 2025
dc400c5
Add Toast logo
hasparus Oct 23, 2025
e3b2deb
Keep cards equal height in case studies list
hasparus Oct 23, 2025
a587972
Make GetYourAPIGameRight section in Case Studies readable in dark mode
hasparus Oct 23, 2025
c91c2fc
Apply hive prose colors to nested articles
hasparus Oct 23, 2025
bf9416d
Format
hasparus Oct 23, 2025
0671112
Add dates to case study frontmatters
hasparus Oct 23, 2025
e035396
Fix fill-rule
hasparus Oct 23, 2025
fc261ff
Add Uri's avatar to the repo to make it load faster
hasparus Oct 23, 2025
d32b20e
Use the column layout even on tablet screens
hasparus Oct 23, 2025
cf032c5
Optically balance the logos
hasparus Oct 23, 2025
8788ec9
Order the case studies by dates descending
hasparus Oct 23, 2025
a7ec765
Scroll to top when opening a blog post (weird default)
hasparus Oct 23, 2025
560df7f
Allow blog posts to inlne authors
hasparus Oct 23, 2025
8a1ef51
Show case studies in blog
hasparus Oct 23, 2025
170c988
Ensure correct text color in dark mode in UpsellBlock
hasparus Oct 23, 2025
6606179
Improve styles
hasparus Oct 23, 2025
c29958a
Repeat a height fix
hasparus Oct 23, 2025
f5267c6
Fix a missing alt (it was duplicate to text anyway)
hasparus Oct 23, 2025
6a33a65
Show [Other Case Studies] in prod finally
hasparus Oct 23, 2025
6f1c0c4
Apply changes from Notion
hasparus Oct 23, 2025
8d1583b
Merge branch 'main' into toast-study
hasparus Oct 23, 2025
6e1ebd9
improve styles
hasparus Oct 23, 2025
b49c8da
Add Scale Beyond card
hasparus Oct 24, 2025
8e9d51a
use bullets
hasparus Oct 24, 2025
c6f6775
Merge branch 'main' into toast-study
hasparus Oct 24, 2025
bd5f4a2
Merge branch 'main' into toast-study
hasparus Oct 27, 2025
6def96b
Mirror changes from Notion
hasparus Oct 27, 2025
f097b26
Add flowcharts
hasparus Oct 27, 2025
e4f9fc9
Simplify the flowchart
hasparus Oct 27, 2025
e4c07e0
Simplify the flowcharts
hasparus Oct 27, 2025
349e2d2
Merge branch 'main' into toast-study
hasparus Oct 27, 2025
f1a1c99
Update Mermaid charts
hasparus Oct 27, 2025
230e656
Add architecture diagram
hasparus Oct 28, 2025
5c03c4b
Use a larger architecture diagram
hasparus Oct 28, 2025
b60fbbb
Fix a typo
hasparus Oct 28, 2025
62e71e8
Copy prettier script so it can be launched from a nested dir
hasparus Oct 28, 2025
4807afb
Make the docs sidebar wider
hasparus Oct 28, 2025
2deffc4
Center blog again
hasparus Oct 28, 2025
c4536ad
Add @next/bundle-analyzer
hasparus Oct 28, 2025
32bb2d5
Fix prose styles
hasparus Oct 28, 2025
f3d74c8
Add the new diagrams to Toast case study
hasparus Oct 28, 2025
8cef61e
Merge branch 'main' into toast-study
hasparus Oct 28, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion packages/web/docs/next.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import withBundleAnalyzer from '@next/bundle-analyzer';
import { withGuildDocs } from '@theguild/components/next.config';

export default withGuildDocs({
let config = withGuildDocs({
output: 'export',
eslint: {
ignoreDuringBuilds: true,
Expand Down Expand Up @@ -334,3 +335,9 @@ export default withGuildDocs({
return config;
},
});

if (process.env.ANALYZE === 'true') {
config = withBundleAnalyzer({ enabled: true })(config);
}

export default config;
3 changes: 3 additions & 0 deletions packages/web/docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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 validate-mdx-links@1.1.0 --files 'src/**/*.mdx'"
},
"dependencies": {
Expand All @@ -32,6 +34,7 @@
},
"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",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ flowchart
id31["Load total post likes (Post.likeCount)"]
id32["Load comments for each post (Post.comments)"]
id4["Load author for each comments (Comment.author)"]
id5["Load author avataer for each comment author (User.avatar)"]
id5["Load author avatar for each comment author (User.avatar)"]

id1 --> id21
id1 --> id22
Expand All @@ -199,7 +199,7 @@ flowchart
id31["Load total post likes (Post.likeCount)"]
id32["Load comments for each post (Post.comments)"]
id4["Load author for each comments (Comment.author)"]
id5["Load author avataer for each comment author (User.avatar)"]
id5["Load author avatar for each comment author (User.avatar)"]

id1 --> id21
id1 --> id22
Expand Down
8 changes: 5 additions & 3 deletions packages/web/docs/src/app/blog/blog-types.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
import type { StaticImageData } from 'next/image';
import { AuthorId } from '../../authors';
import { MdxFile, PageMapItem } from '../../mdx-types';
import type { Author, AuthorId } from '../../authors';
import type { MdxFile, PageMapItem } from '../../mdx-types';

type OneOrMany<T> = T | T[];

export interface BlogFrontmatter {
authors: AuthorId | AuthorId[];
authors: OneOrMany<AuthorId | Author>;
title: string;
date: string;
tags: string | string[];
Expand Down
18 changes: 12 additions & 6 deletions packages/web/docs/src/app/blog/components/blog-card.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,15 @@ export function BlogCard({ post, className, variant, tag }: BlogCardProps) {
const { title, tags } = frontmatter;
const date = new Date(frontmatter.date);

const postAuthors: Author[] = (
typeof frontmatter.authors === 'string'
? [authors[frontmatter.authors as AuthorId]]
: frontmatter.authors.map(author => authors[author as AuthorId])
).filter(Boolean);
const authorsArray = Array.isArray(frontmatter.authors)
? frontmatter.authors
: [frontmatter.authors];

const postAuthors: Author[] = authorsArray
.map((authorId: AuthorId | Author) =>
typeof authorId === 'string' ? authors[authorId] : authorId,
)
.filter(Boolean);

if (postAuthors.length === 0) {
console.error('author not found', frontmatter);
Expand All @@ -44,6 +48,7 @@ export function BlogCard({ post, className, variant, tag }: BlogCardProps) {
className,
)}
href={post.route}
scroll
>
<article
className={cn(
Expand Down Expand Up @@ -74,7 +79,8 @@ export function BlogCard({ post, className, variant, tag }: BlogCardProps) {
<div className="relative size-6">
<Image
src={avatarSrc}
alt={firstAuthor.name}
alt=""
role="presentation"
width={24}
height={24}
className="rounded-full"
Expand Down
20 changes: 11 additions & 9 deletions packages/web/docs/src/app/blog/feed.xml/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,17 @@
import RSS from 'rss';
import { getPageMap } from '@theguild/components/server';
import { AuthorId, authors } from '../../../authors';
import { isBlogPost } from '../blog-types';
import { BlogFrontmatter, isBlogPost } from '../blog-types';

function getAuthor(name: string) {
const author = authors[name as AuthorId]?.name;
return author ?? name;
function getAuthor(frontmatterAuthors: BlogFrontmatter['authors']): string {
const first = Array.isArray(frontmatterAuthors) ? frontmatterAuthors[0] : frontmatterAuthors;

if (typeof first === 'string') {
const author = authors[first as AuthorId];
return author ? author.name : 'Unknown Author';
}

return first.name;
}

export async function GET() {
Expand All @@ -20,11 +26,7 @@ export async function GET() {
date: new Date(item.frontMatter.date),
url: `https://the-guild.dev/graphql/hive${item.route}`,
description: (item.frontMatter as any).description ?? '',
author: getAuthor(
typeof item.frontMatter.authors === 'string'
? item.frontMatter.authors
: item.frontMatter.authors.at(0)!,
),
author: getAuthor(item.frontMatter.authors),
categories: Array.isArray(item.frontMatter.tags)
? item.frontMatter.tags
: [item.frontMatter.tags],
Expand Down
28 changes: 26 additions & 2 deletions packages/web/docs/src/app/blog/page.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
import { getPageMap } from '@theguild/components/server';
import { isBlogPost } from './blog-types';
import type { Author } from '../../authors';
import { CaseStudyFile } from '../case-studies/case-study-types';
import { getCaseStudies } from '../case-studies/get-case-studies';
import { BlogFrontmatter, BlogPostFile, isBlogPost } from './blog-types';
import { NewsletterFormCard } from './components/newsletter-form-card';
import { PostsByTag } from './components/posts-by-tag';
// We can't move this page to `(index)` dir together with `tag` page because Nextra crashes for
Expand All @@ -13,7 +16,10 @@ export const metadata = {

export default async function BlogPage() {
const [_meta, _indexPage, ...pageMap] = await getPageMap('/blog');
const allPosts = pageMap.filter(isBlogPost);

const caseStudies = await getCaseStudies().then(coerceCaseStudiesToBlogs);

const allPosts = pageMap.filter(isBlogPost).concat(caseStudies);

return (
<BlogPageLayout>
Expand All @@ -23,3 +29,21 @@ export default async function BlogPage() {
</BlogPageLayout>
);
}

function coerceCaseStudiesToBlogs(caseStudies: CaseStudyFile[]): BlogPostFile[] {
return caseStudies.map(caseStudy => ({
...caseStudy,
frontMatter: {
...caseStudy.frontMatter,
tags: ['Case Study'],
authors: caseStudy.frontMatter.authors.map(
(author): Author => ({
name: author.name,
avatar: author.avatar,
link: '' as 'https://',
Copy link

Copilot AI Oct 26, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using an empty string cast to 'https://' type is misleading. Consider using a placeholder URL like 'https://example.com' or making the link field optional in the Author type if case study authors don't have links.

Suggested change
link: '' as 'https://',

Copilot uses AI. Check for mistakes.
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good bot, but allow me this little hack. I agree it's not neat... should probably make the link optional instead.

github: '',
}),
),
} satisfies BlogFrontmatter,
}));
}
7 changes: 3 additions & 4 deletions packages/web/docs/src/app/case-studies/(posts)/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { GetYourAPIGameWhite } from '#components/get-your-api-game-white';
import { cn, HiveLayoutConfig } from '@theguild/components';
import { cn, GetYourAPIGameRightSection, HiveLayoutConfig } from '@theguild/components';
import { CaseStudiesHeader } from '../case-studies-header';
import { MoreStoriesSection } from '../more-stories-section';
import '../../hive-prose-styles.css';
Expand All @@ -17,10 +16,10 @@ export default function CaseStudiesLayout({ children }: { children: React.ReactN
<CaseStudiesHeader className="mx-auto max-w-[--nextra-content-width] pl-6 sm:my-12 md:pl-12 lg:my-24" />
<div className={cn(MAIN_CONTENT, 'mx-auto flex [&>div:first-of-type>:first-child]:hidden')}>
{children}
<LookingToUseHiveUpsellBlock className="sticky right-2 top-[108px] mb-8 h-min max-lg:hidden lg:w-[320px] xl:w-[400px]" />
<LookingToUseHiveUpsellBlock className="sticky right-2 top-[108px] mb-8 h-min shrink-0 max-lg:hidden lg:w-[320px] xl:w-[400px]" />
</div>
<MoreStoriesSection className="mx-4 md:mx-6" />
<GetYourAPIGameWhite className="sm:my-24" />
<GetYourAPIGameRightSection className="light [&_h2]:text-green-1000 mx-4 sm:my-24 md:mx-6" />
</div>
);
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ excerpt:
'Sound.xyz is revolutionizing the music industry by addressing two critical challenges: the
concentration of streaming revenue among top artists and the inadequate compensation per stream.'
category: Music
date: 2025-01-27
authors:
- name: David Greenstein
position: Co-Founder
Expand Down
239 changes: 239 additions & 0 deletions packages/web/docs/src/app/case-studies/(posts)/toast/after-diagram.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading