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

Update master with website_live #6470

Merged
merged 40 commits into from
Sep 6, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
4b06d75
Update index.tsx (#6278)
bladey Aug 8, 2021
7349553
Fix updates bit on the website (#6287)
emmatown Aug 10, 2021
4746a22
Content management update (#6282)
raveling Aug 10, 2021
512b8de
Fixed whitespace (#6283)
raveling Aug 10, 2021
6eda6b6
Update Header.tsx (#6289)
bladey Aug 10, 2021
3d4c268
Add CTA block for Web Box eCommerce Course (#6273)
raveling Aug 10, 2021
f97a9ca
Content update (#6290)
raveling Aug 10, 2021
2963ac7
Style fixes (#6291)
raveling Aug 10, 2021
d534409
Added new content to /updates (#6300)
raveling Aug 11, 2021
27e0d19
Update fields.mdx (#6304)
bladey Aug 12, 2021
e29b5e4
Fixed typo (#6322)
raveling Aug 15, 2021
64e6c1d
Added top margin to docs page component (#6301)
raveling Aug 16, 2021
c1df1e5
Added styles to table (#6315)
raveling Aug 16, 2021
4427bbc
Un-nest <Head> tags. (#6327)
bladey Aug 16, 2021
c24a290
Fixed link value (#6328)
raveling Aug 16, 2021
36f6550
Update `website_live` (#6336)
bladey Aug 17, 2021
14861b4
Merge branch 'master' into website_live
bladey Aug 17, 2021
712bea2
Release notes for 2021-08-17 release (#6345)
bladey Aug 17, 2021
46b2dc6
Fixed markdown for bold styles (#6346)
raveling Aug 17, 2021
44d6ec1
Update wording on upgrade guide and release notes (#6353)
timleslie Aug 17, 2021
cdde508
Updates nav additions (#6366)
raveling Aug 19, 2021
d43a1d8
Update new-graphql-api.mdx (#6375)
bladey Aug 19, 2021
e7ed4d3
Updated URLs (#6374)
raveling Aug 19, 2021
67e0756
Tweaking docs for Next.js walkthrough for latest version (#6383)
bladey Aug 20, 2021
a3fb2ea
Added upgrade notices to GraphQL API related pages (#6387)
raveling Aug 22, 2021
31a2064
Fixed link color inconsistency (#6388)
raveling Aug 22, 2021
80f122f
Add note to use `yarn` in the embedded Next.js guide (#6384)
bladey Aug 23, 2021
2da90e0
[WIP] Related content links (#6360)
raveling Aug 24, 2021
903e5ce
Added 2x testimonials (#6400)
raveling Aug 25, 2021
5d4841d
Typo (#6405)
raveling Aug 25, 2021
b6c45a9
Replaced absolute links with relative (#6406)
raveling Aug 25, 2021
f8ba665
Fix broken link (#6407)
bladey Aug 25, 2021
38bd965
Add missing <Link>'s in docs pages. (#6421)
bladey Aug 27, 2021
776da00
Add `Edit on GitHub` button to all docs pages (#6423)
bladey Aug 27, 2021
9b02e0d
Tab index improvements. (#6427)
bladey Aug 30, 2021
61794fa
Update EditButton.tsx (#6428)
bladey Aug 30, 2021
dd357d0
Fix styles on document field demo on website live (#6447)
emmatown Sep 2, 2021
3443efa
Content edits (#6451)
raveling Sep 2, 2021
67f3eeb
Changes to global header (#6452)
raveling Sep 2, 2021
0ca3ac8
Merge branch 'website_live'
bladey Sep 6, 2021
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
6 changes: 2 additions & 4 deletions docs/components/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,6 @@ export function Header() {

<LinkItem href="/why-keystone">Why Keystone</LinkItem>
<LinkItem href="/updates">Updates</LinkItem>
<LinkItem href="/docs">Docs</LinkItem>

{/* TODO: Add in search for mobile via this button */}
{/*
Expand All @@ -277,8 +276,6 @@ export function Header() {
<Search css={{ height: '1.4rem', marginTop: '0.2rem' }} />
</button>
*/}

<DarkModeBtn />
<Button
as="a"
href="/docs"
Expand All @@ -289,8 +286,9 @@ export function Header() {
},
})}
>
Get Started
Documentation
</Button>
<DarkModeBtn />
<a
href="https://github.com/keystonejs/keystone"
target="_blank"
Expand Down
17 changes: 16 additions & 1 deletion docs/components/Page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,10 @@ import type { Heading } from '../lib/getHeadings';
import { Announce } from '../components/Announce';
import { TableOfContents } from './docs/TableOfContents';
import { Wrapper } from './primitives/Wrapper';
import { EditButton } from './primitives/EditButton';
import { Breadcrumbs } from './Breadcrumbs';
import { Sidebar } from './docs/Sidebar';
import { Stack } from './primitives/Stack';
import { Header } from './Header';
import { Footer } from './Footer';

Expand Down Expand Up @@ -66,6 +68,8 @@ export function DocsPage({
title,
description,
ogImage,
isIndexPage,
editPath,
}: {
children: ReactNode;
headings?: Heading[];
Expand All @@ -75,6 +79,8 @@ export function DocsPage({
title: string;
description: string;
ogImage?: string;
isIndexPage?: boolean;
editPath?: string;
}) {
const contentRef = useRef<HTMLDivElement | null>(null);
const mq = useMediaQuery();
Expand Down Expand Up @@ -119,7 +125,16 @@ export function DocsPage({
ref={contentRef}
className={noProse ? '' : 'prose'}
>
<Breadcrumbs />
<Stack
orientation="horizontal"
block
css={{ justifyContent: 'space-between', alignItems: 'baseline' }}
>
<Breadcrumbs />
{!isUpdatesPage && (
<EditButton pathName={pathname} isIndexPage={isIndexPage} editPath={editPath} />
)}
</Stack>
{children}
</main>
{!!headings.length && !noRightNav && (
Expand Down
6 changes: 6 additions & 0 deletions docs/components/primitives/Button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,12 @@ const sizeMap = {
height: '2.2rem',
padding: '0 14px',
},
xsmall: {
fontSize: '.75rem',
borderRadius: '4px',
height: '2rem',
padding: '0 12px',
},
};

type ButtonProps = {
Expand Down
47 changes: 47 additions & 0 deletions docs/components/primitives/EditButton.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
/** @jsx jsx */
import { jsx } from '@emotion/react';

import { Edit } from '../../components/icons/Edit';
import { Button } from './Button';

export function EditButton({
pathName,
isIndexPage,
editPath,
}: {
pathName: string;
isIndexPage?: boolean;
editPath?: string;
}) {
let fileUrl = `https://github.com/keystonejs/keystone/edit/website_live/docs/pages`;

if (editPath) {
fileUrl += `/${editPath}`;
} else if (isIndexPage) {
fileUrl += `${pathName}/index.tsx`;
} else {
fileUrl += `${pathName}.mdx`;
}

return (
<Button
as="a"
href={fileUrl}
look="text"
size="xsmall"
target="_blank"
rel="noopener noreferrer"
css={{
textTransform: 'uppercase',
}}
>
<Edit
css={{
color: 'var(--muted)',
marginRight: '0.35rem',
}}
/>
Edit on GitHub
</Button>
);
}
1 change: 1 addition & 0 deletions docs/pages/docs/apis/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ export default function Docs() {
noProse
title={'APIs'}
description={'Index for Keystone’s API reference docs.'}
isIndexPage
>
<Type as="h1" look="heading64">
API Reference
Expand Down
1 change: 1 addition & 0 deletions docs/pages/docs/examples.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ export default function Docs() {
description={
'A growing collection of projects you can run locally to learn more about Keystone’s many features. Use them as a reference for best practice, and springboard when adding features to your own project.'
}
editPath={'docs/examples.tsx'}
>
<Type as="h1" look="heading64">
Examples
Expand Down
5 changes: 0 additions & 5 deletions docs/pages/docs/guides/document-field-demo.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,6 @@ export default ({ children }) => {
id: 'document-field-demo',
depth: 1,
},
{
label: 'Try the demo',
id: 'try-the-demo',
depth: 2,
},
...headings,
]}
>
Expand Down
9 changes: 5 additions & 4 deletions docs/pages/docs/guides/document-fields.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,7 @@ export default config({
<details>

<summary>
In the document editor at the top of this page, the Quote(shown above), Notice and Hero are
In the [document editor demo](/docs/guides/document-field-demo), the insertable Quote, Notice and Hero items are
implemented as component blocks, see the implementation for Notice and Hero by expanding this.
</summary>

Expand Down Expand Up @@ -641,9 +641,10 @@ fields.conditional(fields.checkbox({ label: 'Show Call to action' }), {

### Chromeless

If you want to give your component blocks a more native feel in the editor, you can set `chromeless: true`.
When you disable it, the generated form is disabled.
In the editor at the top of this page, the Notice and Quote blocks are chromeless and the Hero has the chrome enabled.
If you want to give your component blocks a more native feel in the editor, you can set `chromeless: true` to disable Keystone's standard generated edit form. In the [document editor demo](/docs/guides/document-field-demo), the Notice and Quote blocks are chromeless, but the Hero block has the standard chrome styling:

![Notice, Quote, and Hero component blocks demonstrating chrome, and chromeless styling](/assets/guides/document-fields/chomeless-example-docs-demo.png)

You will likely want to provide a custom [toolbar](#toolbar) when you set `chromeless: true`.

```tsx
Expand Down
1 change: 1 addition & 0 deletions docs/pages/docs/guides/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ export default function Docs() {
description={
'Practical explanations of Keystone’s fundamental building blocks. Learn how to think about, and get the most out of Keystone’s many features.'
}
isIndexPage
>
<Type as="h1" look="heading64">
Keystone Guides
Expand Down
7 changes: 6 additions & 1 deletion docs/pages/docs/index.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/** @jsxRuntime classic */
/** @jsx jsx */
import { jsx } from '@emotion/react';
import Link from 'next/link';

import { CommunitySlackCTA } from '../../components/docs/CommunitySlackCTA';
import { Examples } from '../../components/docs/ExamplesList';
Expand All @@ -19,6 +20,7 @@ export default function Docs() {
noProse
title={'Keystone Docs Home'}
description={'Developer docs for KeystoneJS: The superpowered headless CMS for developers.'}
isIndexPage
>
<Type as="h1" look="heading64">
Keystone Docs
Expand All @@ -41,7 +43,10 @@ export default function Docs() {
Watch Jed's Prisma Day talk to learn about what’s driving the development of Keystone 6,
and how it delivers a developer experience that combines features, flexibility, and the
perfect amount of abstraction to get started fast, and grow as you learn.{' '}
<a href="/updates/prisma-day-2021">Read the full transcript</a>.
<Link href="/updates/prisma-day-2021">
<a>Read the full transcript</a>
</Link>
.
</Type>
</div>
<div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,19 @@ Here's what we're going to do:

## Setup a Next.js app

Create a basic Next.js project with the `--typescript` option in an empty directory.
x> **Warning:** We normally advise to set up a new Next.js app with `yarn create next-app --typescript my-project`, however this will install Next.js `11.x`. This version isn't compatible with this guide until we upgrade Keystone's Next.js internals to `11.x`.

x> To continue, you'll need to use Next.js `10.x` until this upgrade is completed. We've set up a repository below using Next.js `10.x` you can clone in the mean time.

Clone the basic Next.js project below.

```bash
yarn create next-app --typescript my-project
cd my-project
git clone https://github.com/keystonejs/embedded-mode-with-sqlite-nextjs
cd embedded-mode-with-sqlite-nextjs
```

Then run `yarn` to install the dependencies.

!> Keystone 6 has great TypeScript support. Including it in your project will make it easier to use Keystone’s APIs later.

Delete the `/pages/api` directory. We’ll add a GraphQL API later in the tutorial. Your `/pages` directory should now look like this:
Expand Down
1 change: 1 addition & 0 deletions docs/pages/docs/walkthroughs/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ export default function Docs() {
description={
'Explore tutorials with step-by-step instruction on building solutions with Keystone.'
}
isIndexPage
>
<Type as="h1" look="heading64">
Walkthroughs
Expand Down
2 changes: 1 addition & 1 deletion docs/pages/for-developers.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -484,7 +484,7 @@ export default function ForDevelopers() {
@KeystoneJS
</a>{' '}
is almost too good to be open source. I can’t stress enough how awesome the dev
experience is. This is what I wish Wordpress was.
experience is. This is what I wish WordPress was.
</TweetBox>
<TweetBox user="_kud" img="/assets/_kud.jpg" grad="grad3">
I think I'm in love. Keystone‘s just what I needed: a dashboard &amp; GraphQL API that
Expand Down
Loading