Files
twenty/packages/twenty-website/keystatic.config.ts
T
Abdul RahmanandGitHub 9f97be67b1 Migrate documentation to Mintlify and configure 301 redirects (#15502)
## Summary
Completes the migration of all documentation from twenty-website to a
new Mintlify-powered documentation site at docs.twenty.com.

## Changes Made

### New Package: `twenty-docs`
-  Created new Mintlify documentation package
-  Migrated 95 content pages (user-guide, developers, twenty-ui)
-  Migrated 81 images
-  Converted all custom components to Mintlify native components
-  Configured navigation with 2 tabs and 94 pages
-  Added Helper AI Agent with searchArticles tool for docs search

### Updated: `twenty-website`
-  Added 11 redirect rules (301 permanent) in next.config.js
-  Removed all documentation content (111 files)
-  Removed documentation routes (user-guide, developers, twenty-ui)
-  Removed documentation components (9 files)
-  Updated keystatic.config.ts
-  Preserved all marketing/release pages

### Updated: Core Files
-  Updated README.md - docs links point to docs.twenty.com
-  Updated CONTRIBUTING.md - code quality link updated
-  Updated SupportDropdown.tsx - user guide link updated
-  Updated Footer.tsx - user guide link updated
2025-10-31 17:44:14 +01:00

59 lines
1.5 KiB
TypeScript

import { collection, config, fields } from '@keystatic/core';
export default config({
storage: {
kind: 'github',
repo: {
owner: 'twentyhq',
name: 'twenty',
},
pathPrefix: 'packages/twenty-website',
},
collections: {
releases: collection({
label: 'Releases',
slugField: 'release',
path: 'src/content/releases/*',
format: { contentField: 'content' },
schema: {
release: fields.slug({
name: {
label: 'Release',
validation: {
pattern: {
regex: /^\d+\.\d+\.\d+$/,
message: 'The release must be in the format major.minor.patch',
},
},
},
slug: {
generate: (name) => name,
validation: {
pattern: {
regex: /^\d+\.\d+\.\d+$/,
message: 'The release must be in the format major.minor.patch',
},
},
},
}),
// TODO: Define the date with a normalized format
Date: fields.text({ label: 'Date' }),
content: fields.mdx({
label: 'Content',
options: {
image: {
directory: 'public/images/releases',
publicPath: '/images/releases/',
},
},
}),
},
parseSlugForSort: (slug) => {
const [major, minor, patch] = slug.split('.');
return `${major.padStart(4, '0')}.${minor.padStart(4, '0')}.${patch.padStart(4, '0')}`;
},
}),
},
});