Skip to content
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

Fix updates bit on the website #6287

Merged
merged 1 commit into from
Aug 10, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
8 changes: 2 additions & 6 deletions docs/components/Markdown.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,9 @@ export function Markdown({
);
}

export async function getServerSideProps() {
export async function getStaticProps() {
const { readdirSync } = require('fs');
const { normalize } = require('path');
const dir = __dirname.endsWith('/server')
? normalize(`${__dirname}/../../pages/releases`)
: normalize(`${__dirname}/../../../pages/releases`);

const dir = __dirname.replace(/docs.+$/, 'docs/pages/releases');
const releases = (readdirSync(dir, 'utf8') as Array<string>)
.filter(name => !name.startsWith('.') && !name.startsWith('index'))
.map(name => name.replace('.mdx', ''))
Expand Down
4 changes: 2 additions & 2 deletions docs/pages/releases/2021-03-22.mdx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Markdown, getServerSideProps } from '../../components/Markdown';
import { Markdown, getStaticProps } from '../../components/Markdown';
import { Emoji } from '../../components/primitives/Emoji';

# Release: 22nd March 2021
Expand Down Expand Up @@ -50,4 +50,4 @@ Now you can include negative values for `float`, `decimal` and `integer` fields.
You can also view the [verbose release notes](https://github.com/keystonejs/keystone/releases/tag/2021-03-22) on GitHub.

export default ({ children, ...props }) => <Markdown description="Prisma migration improvements. Negative values now available for float, decimal and integer fields." {...props}>{children}</Markdown>;
export { getServerSideProps }
export { getStaticProps }
4 changes: 2 additions & 2 deletions docs/pages/releases/2021-03-23.mdx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Markdown, getServerSideProps } from '../../components/Markdown';
import { Markdown, getStaticProps } from '../../components/Markdown';
import { Emoji } from '../../components/primitives/Emoji';

# Release: 23rd March 2021
Expand All @@ -23,4 +23,4 @@ Mitchell [solved a bug](https://github.com/keystonejs/keystone/pull/5168) where
You can also view the [verbose release notes](https://github.com/keystonejs/keystone/releases/tag/2021-03-23) on GitHub.

export default ({ children, ...props }) => <Markdown description="Added support for SQLite with Prisma. Bugfix for `withItemData`." {...props}>{children}</Markdown>;
export { getServerSideProps }
export { getStaticProps }
4 changes: 2 additions & 2 deletions docs/pages/releases/2021-03-30.mdx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Markdown, getServerSideProps } from '../../components/Markdown';
import { Markdown, getStaticProps } from '../../components/Markdown';
import { Emoji } from '../../components/primitives/Emoji';

# Release: 30th March 2021
Expand Down Expand Up @@ -44,4 +44,4 @@ We fixed a bug that existed in `updateMany` on lists with declarative access con
You can also view the [verbose release notes](https://github.com/keystonejs/keystone/releases/tag/2021-03-30) on GitHub.

export default ({ children, ...props }) => <Markdown description="Goodbye legacy code. Improved `select` field type. Bugfix for `updateMany`." {...props}>{children}</Markdown>;
export { getServerSideProps }
export { getStaticProps }
4 changes: 2 additions & 2 deletions docs/pages/releases/2021-04-06.mdx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Markdown, getServerSideProps } from '../../components/Markdown';
import { Markdown, getStaticProps } from '../../components/Markdown';
import { Emoji } from '../../components/primitives/Emoji';

# Release: 6th April 2021
Expand Down Expand Up @@ -38,4 +38,4 @@ Pagination in the Admin UI has fresh styles and is easier to use.
You can also view the [verbose release notes](https://github.com/keystonejs/keystone/releases/tag/2021-04-06) on GitHub.

export default ({ children, ...props }) => <Markdown description="We pruned a lot of code to make way for a more efficient and productive core in Keystone 6. Better pagination in Admin UI." {...props}>{children}</Markdown>;
export { getServerSideProps }
export { getStaticProps }
4 changes: 2 additions & 2 deletions docs/pages/releases/2021-04-20.mdx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Markdown, getServerSideProps } from '../../components/Markdown';
import { Markdown, getStaticProps } from '../../components/Markdown';

# Release: 20th April 2021

Expand Down Expand Up @@ -60,4 +60,4 @@ const [post] = await context.db.lists.Post.findMany({
You can also view the [verbose release notes](https://github.com/keystonejs/keystone/releases/tag/2021-04-20) on GitHub.

export default ({ children, ...props }) => <Markdown description="Lists API improvements: new query option & read hooks." {...props}>{children}</Markdown>;
export { getServerSideProps }
export { getStaticProps }
4 changes: 2 additions & 2 deletions docs/pages/releases/2021-05-03.mdx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Markdown, getServerSideProps } from '../../components/Markdown';
import { Markdown, getStaticProps } from '../../components/Markdown';
import { Emoji } from '../../components/primitives/Emoji';

# Release: 3rd May 2021
Expand Down Expand Up @@ -27,4 +27,4 @@ This release involved a bunch of busywork behind the scenes in Keystone 6. Strip
You can also view the [verbose release notes](https://github.com/keystonejs/keystone/releases/tag/2021-05-03) on GitHub.

export default ({ children, ...props }) => <Markdown description="File field type added to Keystone 6. Includes a `maxFileSize` property for easier project config." {...props}>{children}</Markdown>;
export { getServerSideProps }
export { getStaticProps }
4 changes: 2 additions & 2 deletions docs/pages/releases/2021-05-05.mdx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Markdown, getServerSideProps } from '../../components/Markdown';
import { Markdown, getStaticProps } from '../../components/Markdown';
import { Emoji } from '../../components/primitives/Emoji';

# Release: 5th May 2021
Expand All @@ -20,4 +20,4 @@ If you look closely you’ll see the core team working on example projects to sh
You can also view the [verbose release notes](https://github.com/keystonejs/keystone/releases/tag/2021-05-05) on GitHub.

export default ({ children, ...props }) => <Markdown description="Aside from dependency updates, we added an isIndexed config option to the text, integer, float, select, and timestamp field types." {...props}>{children}</Markdown>;
export { getServerSideProps }
export { getStaticProps }
4 changes: 2 additions & 2 deletions docs/pages/releases/2021-05-11.mdx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Markdown, getServerSideProps } from '../../components/Markdown';
import { Markdown, getStaticProps } from '../../components/Markdown';
import { Emoji } from '../../components/primitives/Emoji';

# Release: 11th May 2021
Expand All @@ -21,4 +21,4 @@ A bunch of admin UI tweaks in this release, among other minor fixes. We also hav
You can also view the [verbose release notes](https://github.com/keystonejs/keystone/releases/tag/2021-05-11) on GitHub.

export default ({ children, ...props }) => <Markdown description="A bunch of admin UI tweaks in this release, among other minor fixes. We also have the initial stages of a new blog example and a sweet new admin UI logo." {...props}>{children}</Markdown>;
export { getServerSideProps }
export { getStaticProps }
4 changes: 2 additions & 2 deletions docs/pages/releases/2021-05-17.mdx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Markdown, getServerSideProps } from '../../components/Markdown';
import { Markdown, getStaticProps } from '../../components/Markdown';
import { Emoji } from '../../components/primitives/Emoji';

# Release: 17th May 2021
Expand All @@ -24,4 +24,4 @@ Thanks to @cameronbraid for spotting a [session issue](https://github.com/keysto
You can also view the [verbose release notes](https://github.com/keystonejs/keystone/releases/tag/2021-05-17) on GitHub.

export default ({ children, ...props }) => <Markdown description="Apollo cache hinting now configurable on a per list or field basis. New Auth example project. Focus control improvements to Admin UI." {...props}>{children}</Markdown>;
export { getServerSideProps }
export { getStaticProps }
4 changes: 2 additions & 2 deletions docs/pages/releases/2021-05-19.mdx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Markdown, getServerSideProps } from '../../components/Markdown';
import { Markdown, getStaticProps } from '../../components/Markdown';
import { Emoji } from '../../components/primitives/Emoji';

# Release: 19th May 2021
Expand Down Expand Up @@ -35,4 +35,4 @@ If you were directly importing from `@keystone-next/admin-ui` you can now import
You can also view the [verbose release notes](https://github.com/keystonejs/keystone/releases/tag/2021-05-19) on GitHub.

export default ({ children, ...props }) => <Markdown description="Node.JS engines in our packages have been updated to 12.x and 14.x. Admin UI packages moved." {...props}>{children}</Markdown>;
export { getServerSideProps }
export { getStaticProps }
4 changes: 2 additions & 2 deletions docs/pages/releases/2021-06-02.mdx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Markdown, getServerSideProps } from '../../components/Markdown';
import { Markdown, getStaticProps } from '../../components/Markdown';
import { Emoji } from '../../components/primitives/Emoji';

# Release: 2nd June 2021
Expand Down Expand Up @@ -184,4 +184,4 @@ We've updated our Prisma dependency from `2.22.1` to `2.24.0`! Check out the [Pr
You can also view the [verbose release notes](https://github.com/keystonejs/keystone/releases/tag/2021-06-02) on GitHub.

export default ({ children, ...props }) => <Markdown description="We have a new JSON field, a bunch of new learning resources, and plenty of under the hood optimisations in this big release." {...props}>{children}</Markdown>;
export { getServerSideProps }
export { getStaticProps }
4 changes: 2 additions & 2 deletions docs/pages/releases/2021-06-15.mdx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Markdown, getServerSideProps } from '../../components/Markdown';
import { Markdown, getStaticProps } from '../../components/Markdown';
import { Emoji } from '../../components/primitives/Emoji';

# Release: 15th June 2021
Expand Down Expand Up @@ -93,4 +93,4 @@ We've updated our Prisma dependencies to `2.24.1`, check out the [Prisma release
You can also view the [verbose release notes](https://github.com/keystonejs/keystone/releases/tag/2021-06-15) on GitHub.

export default ({ children, ...props }) => <Markdown description="Keystone 6 now has a new core. It’ll now easier for us to ship roadmap features like custom field types, GraphQL Schema extensions, and more." {...props}>{children}</Markdown>;
export { getServerSideProps }
export { getStaticProps }
4 changes: 2 additions & 2 deletions docs/pages/releases/2021-06-28.mdx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Markdown, getServerSideProps } from '../../components/Markdown';
import { Markdown, getStaticProps } from '../../components/Markdown';
import { Emoji } from '../../components/primitives/Emoji';

# Release: 28th June 2021
Expand Down Expand Up @@ -64,4 +64,4 @@ We've updated our Prisma dependencies to `2.25.0`, check out the [Prisma release
You can also view the [verbose release notes](https://github.com/keystonejs/keystone/releases/tag/2021-06-28) on GitHub.

export default ({ children, ...props }) => <Markdown description="A new package to help test the behaviour of your GraphQL API, a document field example, better error messages, accessibility updates and another Prisma update." {...props}>{children}</Markdown>;
export { getServerSideProps }
export { getStaticProps }
4 changes: 2 additions & 2 deletions docs/pages/releases/2021-06-29.mdx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Markdown, getServerSideProps } from '../../components/Markdown';
import { Markdown, getStaticProps } from '../../components/Markdown';
import { Emoji } from '../../components/primitives/Emoji';

# Release: 29th June 2021
Expand Down Expand Up @@ -64,4 +64,4 @@ config({
You can also view the [verbose release notes](https://github.com/keystonejs/keystone/releases/tag/2021-06-29) on GitHub.

export default ({ children, ...props }) => <Markdown description="The ID Field option has been revamped with cuid, uuid and autoincrement options." {...props}>{children}</Markdown>;
export { getServerSideProps }
export { getStaticProps }
4 changes: 2 additions & 2 deletions docs/pages/releases/2021-06-30.mdx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Markdown, getServerSideProps } from '../../components/Markdown';
import { Markdown, getStaticProps } from '../../components/Markdown';
import { Emoji } from '../../components/primitives/Emoji';

# Release: 30th June 2021
Expand All @@ -23,4 +23,4 @@ We've discovered an issue where `cloudinaryImage` and `relationship` fields were
You can also view the [verbose release notes](https://github.com/keystonejs/keystone/releases/tag/2021-06-30) on GitHub.

export default ({ children, ...props }) => <Markdown description="Bugfixes for `cloudinaryimage` and `relationships` fields." {...props}>{children}</Markdown>;
export { getServerSideProps }
export { getStaticProps }
4 changes: 2 additions & 2 deletions docs/pages/releases/2021-07-13.mdx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Markdown, getServerSideProps } from '../../components/Markdown';
import { Markdown, getStaticProps } from '../../components/Markdown';
import { Emoji } from '../../components/primitives/Emoji';

# Release: 13th July 2021
Expand Down Expand Up @@ -69,4 +69,4 @@ Our `packages-next` folder has moved over to `packages` as part of our push to a
You can also view the [verbose release notes](https://github.com/keystonejs/keystone/releases/tag/2021-07-13) on GitHub.

export default ({ children, ...props }) => <Markdown description="More examples, types, and UI rendering tweaks as we push forward towards a general availability release." {...props}>{children}</Markdown>;
export { getServerSideProps }
export { getStaticProps }
4 changes: 2 additions & 2 deletions docs/pages/releases/2021-07-29.mdx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Markdown, getServerSideProps } from '../../components/Markdown';
import { Markdown, getStaticProps } from '../../components/Markdown';
import { Emoji } from '../../components/primitives/Emoji';

# Release: 29th July 2021
Expand Down Expand Up @@ -97,4 +97,4 @@ Updated Prisma dependencies to `2.27.0`, check out the [Prisma releases page](ht
You can also view the [verbose release notes](https://github.com/keystonejs/keystone/releases/tag/2021-07-29) on GitHub.

export default ({ children, ...props }) => <Markdown description="Custom navigation, pages and logo in this big Admin UI themed release!" {...props}>{children}</Markdown>;
export { getServerSideProps }
export { getStaticProps }
4 changes: 2 additions & 2 deletions docs/pages/releases/index.mdx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Markdown, getServerSideProps } from '../../components/Markdown';
import { Markdown, getStaticProps } from '../../components/Markdown';
import { Emoji } from '../../components/primitives/Emoji';
import { Status } from '../../components/primitives/Status';

Expand Down Expand Up @@ -79,4 +79,4 @@ Prisma migrations <Emoji symbol="🚚" alt="Truck"/>, Noteworthy bug-squashing <
?> 🔎 You can also find all the **Keystone 6** releases on [GitHub](https://github.com/keystonejs/keystone/releases)!

export default ({ children, ...props }) => <Markdown description="A complete timeline of KeystoneJS releases." {...props} noRightNav>{children}</Markdown>;
export { getServerSideProps }
export { getStaticProps }
8 changes: 4 additions & 4 deletions docs/pages/updates/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { HTMLAttributes, ReactNode } from 'react';
import { jsx } from '@emotion/react';
import Link from 'next/link';

import { getServerSideProps } from '../../components/Markdown';
import { getStaticProps } from '../../components/Markdown';
import { InlineCode } from '../../components/primitives/Code';
import { Button } from '../../components/primitives/Button';
import { Alert } from '../../components/primitives/Alert';
Expand Down Expand Up @@ -190,7 +190,7 @@ export default function WhatsNew() {
frameBorder="0"
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
allowFullScreen
></iframe>
/>
</div>
<a href="https://github.com/keystonejs/prisma-day-2021-workshop">
Follow along in with the repo
Expand Down Expand Up @@ -247,7 +247,7 @@ export default function WhatsNew() {
frameBorder="0"
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
allowFullScreen
></iframe>
/>
</div>
</Box>
<Timeline date="29th June 2021" />
Expand Down Expand Up @@ -397,4 +397,4 @@ export default function WhatsNew() {
);
}

export { getServerSideProps };
export { getStaticProps };
4 changes: 2 additions & 2 deletions docs/pages/updates/prisma-day-2021.mdx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Markdown, getServerSideProps } from '../../components/Markdown';
import { Markdown, getStaticProps } from '../../components/Markdown';

# Prisma Day 2021 Talk

Expand Down Expand Up @@ -110,4 +110,4 @@ So this is our take on what that looks like. I'd love you to check it out, let u
Thanks for having me.

export default ({ children, ...props }) => <Markdown description="Watch Jed Watson’s Keystone 6 talk from Prisma Day 2021. Full transcript available." {...props}>{children}</Markdown>;
export { getServerSideProps }
export { getStaticProps }
4 changes: 2 additions & 2 deletions docs/pages/updates/roadmap.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import { ComponentProps, Fragment, ReactNode } from 'react';
import { jsx } from '@emotion/react';

import { getServerSideProps } from '../../components/Markdown';
import { getStaticProps } from '../../components/Markdown';
import { InlineCode } from '../../components/primitives/Code';
import { Button } from '../../components/primitives/Button';
import { Highlight } from '../../components/primitives/Highlight';
Expand Down Expand Up @@ -416,4 +416,4 @@ export default function Roadmap() {
);
}

export { getServerSideProps };
export { getStaticProps };
4 changes: 2 additions & 2 deletions docs/pages/updates/whats-new-in-v6.mdx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Markdown, getServerSideProps } from '../../components/Markdown';
import { Markdown, getStaticProps } from '../../components/Markdown';
import { SubscribeForm } from '../../components/SubscribeForm';
import { Badge } from '../../components/primitives/Badge';
import { Emoji } from '../../components/primitives/Emoji';
Expand Down Expand Up @@ -58,4 +58,4 @@ We also have new reference examples for how to use advanced features, like imple
roles-based access control system.

export default ({ children, ...props }) => <Markdown description="What's new in Keystone 6" {...props}>{children}</Markdown>;
export { getServerSideProps }
export { getStaticProps }