Integrate Keystatic to edit twenty.com content (#10709)

This PR introduces Keystatic to let us edit twenty.com's content with a
CMS. For now, we'll focus on creating release notes through Keystatic as
it uses quite simple Markdown. Other types of content will need some
refactoring to work with Keystatic.


https://github.com/user-attachments/assets/e9f85bbf-daff-4b41-bc97-d1baf63758b2

---------

Co-authored-by: Félix Malfait <felix@twenty.com>
This commit is contained in:
Baptiste Devessier
2025-03-07 07:59:06 +01:00
committed by GitHub
parent 6b4d3ed025
commit 2c465bd42e
52 changed files with 3059 additions and 63 deletions

View File

@ -1,6 +1,7 @@
import { format } from 'date-fns';
import { ImageResponse } from 'next/og';
import { getContributorActivity } from '@/app/(public)/contributors/utils/get-contributor-activity';
import {
backgroundImage,
container,
@ -16,7 +17,6 @@ import {
profileUsernameHeader,
styledContributorAvatar,
} from '@/app/api/contributors/[slug]/og.png/style';
import { getContributorActivity } from '@/app/contributors/utils/get-contributor-activity';
const GABARITO_FONT_CDN_URL =
'https://fonts.cdnfonts.com/s/105143/Gabarito-Medium-BF651cdf1f3f18e.woff';

View File

@ -1,4 +1,4 @@
import { getContributorActivity } from '@/app/contributors/utils/get-contributor-activity';
import { getContributorActivity } from '@/app/(public)/contributors/utils/get-contributor-activity';
import { executePartialSync } from '@/github/execute-partial-sync';
export const dynamic = 'force-dynamic';

View File

@ -0,0 +1,6 @@
import { makeRouteHandler } from '@keystatic/next/route-handler';
import config from '../../../../../keystatic.config';
export const { POST, GET } = makeRouteHandler({
config,
});

View File

@ -1,8 +1,8 @@
import { desc } from 'drizzle-orm';
import { getGithubReleaseDateFromReleaseNote } from '@/app/releases/utils/get-github-release-date-from-release-note';
import { getReleases } from '@/app/releases/utils/get-releases';
import { getVisibleReleases } from '@/app/releases/utils/get-visible-releases';
import { getGithubReleaseDateFromReleaseNote } from '@/app/(public)/releases/utils/get-github-release-date-from-release-note';
import { getReleases } from '@/app/(public)/releases/utils/get-releases';
import { getVisibleReleases } from '@/app/(public)/releases/utils/get-visible-releases';
import { findAll } from '@/database/database';
import { GithubReleases, githubReleasesModel } from '@/database/model';