Skip to content

Commit

Permalink
Drop remark formatting (keystonejs#7895)
Browse files Browse the repository at this point in the history
Co-authored-by: Daniel Cousens <[email protected]>
  • Loading branch information
dcousens and dcousens authored Sep 7, 2022
1 parent 524431b commit 8ba5a35
Show file tree
Hide file tree
Showing 29 changed files with 92 additions and 749 deletions.
2 changes: 1 addition & 1 deletion .github/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
requestInfoReplyComment: >
It looks like we could use some more details.
Good titles and descriptions help us fix things faster.
If you can provide more information please update this issue.
If you can provide more information please update this issue.
# *OPTIONAL* default titles to check against for lack of descriptiveness
# MUST BE ALL LOWERCASE
Expand Down
3 changes: 0 additions & 3 deletions .github/workflows/always_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,6 @@ jobs:
- name: Preconstruct
run: yarn build

- name: Remark
run: yarn lint:markdown

- name: Prisma Filters
run: yarn lint:filters

Expand Down
1 change: 0 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
package.json
packages/icons/icons/*
reports
coverage
Expand Down
49 changes: 0 additions & 49 deletions ;e

This file was deleted.

2 changes: 1 addition & 1 deletion docs/pages/docs/apis/auth.md
Original file line number Diff line number Diff line change
Expand Up @@ -459,7 +459,7 @@ The authenticated item will be returned as `item`.
{% related-content %}
{% well
heading="Example Project: Authentication"
href="<https://github.com/keystonejs/keystone/tree/main/examples/with-auth>" %}
href="https://github.com/keystonejs/keystone/tree/main/examples/with-auth" %}
Adds password-based authentication to the Task Manager starter project.
{% /well %}
{% /related-content %}
28 changes: 14 additions & 14 deletions docs/pages/docs/apis/filters.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,29 +74,29 @@ The `json` field type does not support filters.
- If the `type` is `string`(the default), the same filters as `text` will be available.
- If the `type` is `integer`, the same filters as `integer` will be available.
- If the `type` is `enum`, the following filters will be available:
\| **Filter name** \| **Type** \| **Description** \|
\| --------------- \| ---------- \| ------------------- \|
\| `equals` \| `ListKeyFieldKeyType` | Equals |
\| `in` \| `[ListKeyFieldKeyType!]` | Is in the array |
\| `notIn` \| `[ListKeyFieldKeyType!]` | Is not in the array |
\| `not` \| `ListKeyFieldKeyTypeNullableFilter` | Does not match the inner filter |
| **Filter name** | **Type** | **Description** |
| --------------- | ---------- | ------------------- |
| `equals` | `ListKeyFieldKeyType` | Equals |
| `in` | `[ListKeyFieldKeyType!]` | Is in the array |
| `notIn` | `[ListKeyFieldKeyType!]` | Is not in the array |
| `not` | `ListKeyFieldKeyTypeNullableFilter` | Does not match the inner filter |

### text

| **Filter name** | **Type** | **Description** | **Notes** |
| --------------- | ---------------------------------------- | ----------------------------------------------------- | --------- |
| `equals` | `String` | Equals | |
| `lt` | `String` | Less than | |
| `lte` | `String` | Less than or equal | |
| `gt` | `String` | Greater than | |
| `gte` | `String` | Greater than or equal | |
| `equals` | `String` | Equals |
| `lt` | `String` | Less than |
| `lte` | `String` | Less than or equal |
| `gt` | `String` | Greater than |
| `gte` | `String` | Greater than or equal |
| `contains` | `String` | Contains | [1] |
| `startsWith` | `String` | Starts with | [1] |
| `endsWith` | `String` | Ends with | [1] |
| `in` | `[String!]` | Is in the array | |
| `notIn` | `[String!]` | Is not in the array | |
| `in` | `[String!]` | Is in the array |
| `notIn` | `[String!]` | Is not in the array |
| `mode` | `QueryMode` (`default` or `insensitive`) | Whether the filters should be case insensitive or not | [2] |
| `not` | `NestedStringNullableFilter` | Does not match the inner filter | |
| `not` | `NestedStringNullableFilter` | Does not match the inner filter |

#### Notes

Expand Down
4 changes: 2 additions & 2 deletions docs/pages/docs/apis/schema.md
Original file line number Diff line number Diff line change
Expand Up @@ -245,8 +245,8 @@ The API to configure all the parts parts of your Keystone system.
{% /well %}
{% well
heading="Example Project: Blog"
href="<https://github.com/keystonejs/keystone/tree/main/examples/blog>"
target="\_blank" %}
href="https://github.com/keystonejs/keystone/tree/main/examples/blog"
target="_blank" %}
A basic Blog schema with Posts and Authors. Use this as a starting place for learning how to use Keystone. It’s also a starter for other feature projects.
{% /well %}
{% /related-content %}
4 changes: 2 additions & 2 deletions docs/pages/docs/apis/session.md
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,8 @@ The API to configure all the parts parts of your Keystone system.
{% /well %}
{% well
heading="Example Project: Authentication"
href="<https://github.com/keystonejs/keystone/tree/main/examples/with-auth>"
target="\_blank" %}
href="https://github.com/keystonejs/keystone/tree/main/examples/with-auth"
target="_blank" %}
Adds password-based authentication to the Task Manager starter project.
{% /well %}
{% /related-content %}
2 changes: 1 addition & 1 deletion docs/pages/docs/guides/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ yarn keystone start

- These examples use `yarn` as the package manager, you can use others like `npm` or `pnpm` if you prefer.
- The commands above are included in the `package.json` reference at the top of this page. We recommend using package scripts so your build and start commands are centralised in source control.
- If you promote your build through separate environments in a pipeline (e.g testing staging production) you should run migrations during the **promote** step and **not** as part of the build script.
- If you promote your build through separate environments in a pipeline (e.g testing &rarr; staging &rarr; production) you should run migrations during the **promote** step and **not** as part of the build script.
- It is important you do **not run migrations against your production database from staging builds**. If you have staging or preview environments set up in production, make sure they are not pointed to your production database.

## Related resources
Expand Down
4 changes: 2 additions & 2 deletions docs/pages/docs/guides/custom-admin-ui-logo.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ Once you've added your custom logo component you should see it rendered out in t
{% related-content %}
{% well
heading="Example: Custom Admin UI Logo"
href="<https://github.com/keystonejs/keystone/tree/main/examples/custom-admin-ui-logo>"
target="\_blank" %}
href="https://github.com/keystonejs/keystone/tree/main/examples/custom-admin-ui-logo"
target="_blank" %}
Adds a custom logo component in the Admin UI. Builds on the Task Manager starter project.
{% /well %}
{% well
Expand Down
4 changes: 2 additions & 2 deletions docs/pages/docs/guides/custom-admin-ui-navigation.md
Original file line number Diff line number Diff line change
Expand Up @@ -328,8 +328,8 @@ Pass in `isSelected` if you have a custom condition or would like more granular
{% related-content %}
{% well
heading="Example: Custom Admin UI Navigation"
href="<https://github.com/keystonejs/keystone/tree/main/examples/custom-admin-ui-navigation>"
target="\_blank" %}
href="https://github.com/keystonejs/keystone/tree/main/examples/custom-admin-ui-navigation"
target="_blank" %}
Adds a custom navigation component to the Admin UI. Builds on the Task Manager starter project.
{% /well %}
{% well
Expand Down
4 changes: 2 additions & 2 deletions docs/pages/docs/guides/custom-admin-ui-pages.md
Original file line number Diff line number Diff line change
Expand Up @@ -186,8 +186,8 @@ Using `emotion` for styling is purely a recommendation, if you would prefer to u
{% related-content %}
{% well
heading="Example: Custom Admin UI Pages"
href="<https://github.com/keystonejs/keystone/tree/main/examples/custom-admin-ui-pages>"
target="\_blank" %}
href="https://github.com/keystonejs/keystone/tree/main/examples/custom-admin-ui-pages"
target="_blank" %}
Adds a custom page in the Admin UI. Builds on the Task Manager starter project.
{% /well %}
{% well
Expand Down
4 changes: 2 additions & 2 deletions docs/pages/docs/guides/custom-fields.md
Original file line number Diff line number Diff line change
Expand Up @@ -221,8 +221,8 @@ export const CardValue: CardValueComponent = ({ item, field }) => {
{% related-content %}
{% well
heading="Example Project: Custom Fields"
href="<https://github.com/keystonejs/keystone/tree/main/examples/custom-field>"
target="\_blank" %}
href="https://github.com/keystonejs/keystone/tree/main/examples/custom-field"
target="_blank" %}
Adds a custom field type based on the `integer` field type which lets users rate items on a 5-star scale. Builds on the Blog starter project.
{% /well %}
{% /related-content %}
4 changes: 2 additions & 2 deletions docs/pages/docs/guides/document-fields.md
Original file line number Diff line number Diff line change
Expand Up @@ -855,8 +855,8 @@ const componentBlockRenderers: InferRenderersForComponentBlocks<typeof component
{% related-content %}
{% well
heading="Example Project: Document Field"
href="<https://github.com/keystonejs/keystone/tree/main/examples/document-field>"
target="\_blank" %}
href="https://github.com/keystonejs/keystone/tree/main/examples/document-field"
target="_blank" %}
Illustrates how to configure `document` fields in your Keystone system and render their data in a frontend application. Builds on the Blog starter project.
{% /well %}
{% well
Expand Down
4 changes: 2 additions & 2 deletions docs/pages/docs/guides/images-and-files.md
Original file line number Diff line number Diff line change
Expand Up @@ -264,10 +264,10 @@ The complete reference for Field configuration
{% well heading="Relationship Guide" href="/docs/apis/fields" %}
Learn how to reason about and configure relationships in Keystone so you can bring value to your project through structured content.
{% /well %}
{% well heading="Example Project: S3 Assets" href="<https://github.com/keystonejs/keystone/tree/main/examples/assets-s3>" %}
{% well heading="Example Project: S3 Assets" href="https://github.com/keystonejs/keystone/tree/main/examples/assets-s3" %}
A full keystone project illustrating how to configure `storage` using `kind: 's3'` and then uses both an `image` and `file` field types within a list.
{% /well %}
{% well heading="Example Project: Local Assets" href="<https://github.com/keystonejs/keystone/tree/main/examples/assets-local>" %}
{% well heading="Example Project: Local Assets" href="https://github.com/keystonejs/keystone/tree/main/examples/assets-local" %}
A full keystone project illustrating how to configure `storage` using `kind: 'local'` and then uses both an `image` and `file` field types within a list.
{% /well %}
{% /related-content %}
20 changes: 10 additions & 10 deletions docs/pages/docs/guides/relationships.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ query {

If we can find all the `authors` of a post, we can also find all the posts written by a particular user. To do this we need to configure a two-sided relationship in our schema:

```typescript{9-10,17-18}\[1-3]
```typescript{9-10,17-18}[1-3]
import { config, list } from '@keystone-6/core';
import { text, relationship } from '@keystone-6/core/fields';
Expand Down Expand Up @@ -128,7 +128,7 @@ Two-sided relationships are declared in two places, but **there is only one rela

Keystone also lets you define one, and two-sided **relationships that refer to the same list**. To make a _one-sided_ Twitter style following relationship we do the following:

```typescript{9}\[1-3]
```typescript{9}[1-3]
import { config, list } from '@keystone-6/core';
import { text, relationship } from '@keystone-6/core/fields';
Expand All @@ -146,7 +146,7 @@ export default config({

Or change this into a _two-sided_ relationship to also access the followers of every user:

```typescript{9-10}\[1-3]
```typescript{9-10}[1-3]
import { config, list } from '@keystone-6/core';
import { text, relationship } from '@keystone-6/core/fields';
Expand All @@ -171,8 +171,8 @@ The only relationship configuration not currently supported is having a field re

_Cardinality_ is a term used to describe how many items can exist on either side of a relationship. Each side can have either `one` or `many` related items. Since each relationship can have one and two sides, we have the following options available:

| Relationship type | One to one | One to many | Many to many |
| ----------------- | ------------------------------------------- | --------------------------------------- | --------------------------------------- |
| Relationship type | One to one | One to many | Many to many |
| ----------------- | -------------------------------------------- | ---------------------------------------- | ---------------------------------------- |
| One-sided | {% emoji symbol="❌" alt="Not supported" /%} | {% emoji symbol="✅" alt="Supported" /%} | {% emoji symbol="✅" alt="Supported" /%} |
| Two-sided | {% emoji symbol="✅" alt="Supported" /%} | {% emoji symbol="✅" alt="Supported" /%} | {% emoji symbol="✅" alt="Supported" /%} |

Expand All @@ -195,7 +195,7 @@ Let’s explore how to set up each type of cardinality in the context of our blo
- Posts have a single author
- Users can have multiple posts

```typescript{15}\[1-3]
```typescript{15}[1-3]
import { config, list } from '@keystone-6/core';
import { text, relationship } from '@keystone-6/core/fields';
Expand All @@ -222,7 +222,7 @@ export default config({
- Posts can have multiple authors
- Users can have multiple posts

```typescript{15}\[1-3]
```typescript{15}[1-3]
import { config, list } from '@keystone-6/core';
import { text, relationship } from '@keystone-6/core/fields';
Expand Down Expand Up @@ -255,7 +255,7 @@ In two-sided relationships the `many` option on both sides must be considered.
- Posts have a single author
- Users can create only one post

```typescript{9,16}\[1-3]
```typescript{9,16}[1-3]
import { config, list } from '@keystone-6/core';
import { text, relationship } from '@keystone-6/core/fields';
Expand Down Expand Up @@ -283,7 +283,7 @@ export default config({
- Posts have a single author
- Users can have multiple posts

```typescript{9,16}\[1-3]
```typescript{9,16}[1-3]
import { config, list } from '@keystone-6/core';
import { text, relationship } from '@keystone-6/core/fields';
Expand Down Expand Up @@ -315,7 +315,7 @@ Note that we’ve used `many: false` in the author field and `many: true` in the
- Posts can have multiple authors
- Users can have multiple posts

```typescript{9,16}\[1-3]
```typescript{9,16}[1-3]
import { config, list } from '@keystone-6/core';
import { text, relationship } from '@keystone-6/core/fields';
Expand Down
4 changes: 2 additions & 2 deletions docs/pages/docs/guides/testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -248,8 +248,8 @@ describe('Example tests using test environment', () => {
{% related-content %}
{% well
heading="Example Project: Testing"
href="<https://github.com/keystonejs/keystone/tree/main/examples/testing>"
target="\_blank" %}
href="https://github.com/keystonejs/keystone/tree/main/examples/testing"
target="_blank" %}
Shows you how to write tests against the GraphQL API to your Keystone system. Builds on the Authentication example project.
{% /well %}
{% well
Expand Down
4 changes: 2 additions & 2 deletions docs/pages/docs/guides/virtual-fields.md
Original file line number Diff line number Diff line change
Expand Up @@ -322,8 +322,8 @@ Using a pre-calculated scalar field is the best solution to use if you need filt
{% related-content %}
{% well
heading="Virtual fields example"
href="<https://github.com/keystonejs/keystone/tree/main/examples/virtual-field>"
target="\_blank" %}
href="https://github.com/keystonejs/keystone/tree/main/examples/virtual-field"
target="_blank" %}
A demo project that shows you how to add virtual fields to a Keystone list.
{% /well %}
{% well
Expand Down
11 changes: 6 additions & 5 deletions docs/pages/docs/walkthroughs/embedded-mode-with-sqlite-nextjs.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ It is recommended that you use the same major version of `next` as used internal

Run `yarn dev` at the root of your project.

Next.js will start a local server for you at <http://localhost:3000>
Next.js will start a local server for you at [http://localhost:3000](http://localhost:3000)

![A browser showing the Home page of the default Next.js app](/assets/walkthroughs/embedded-nextjs/localhost-home-1.png)

Expand All @@ -90,6 +90,7 @@ yarn add @keystone-6/core
Add the `.keystone` directory to your `.gitignore` file. The contents of `.keystone` are generated at build time. You’ll never have to change them.

```bash

# In your .gitignore
.keystone
```
Expand Down Expand Up @@ -174,8 +175,8 @@ Running `yarn dev` again will do the following:
- Provision a GraphQL schema based on the configuration of `keystone.ts`
- Build a [Prisma.io](https://www.prisma.io/) schema (which Keystone uses to manage the database)
- Create the database and run a migration to set up your schema
- Serve Keystone’s Admin UI at <http://localhost:8000>
- Serve the Next.js frontend at <http://localhost:3000>
- Serve Keystone’s Admin UI at [http://localhost:8000](http://localhost:8000)
- Serve the Next.js frontend at [http://localhost:3000](http://localhost:3000)
- Add a `postinstall` script that ensures everything works if we install other dependencies later on

Go ahead and add two post entries using your Admin UI, ensuring you only use `hyphens-and-lowercase-chars` in the slug field for permalinks.
Expand Down Expand Up @@ -295,7 +296,7 @@ export async function getStaticProps({ params }: GetStaticPropsContext) {

Run `yarn dev` again.

**Congratulations!** 🙌   You now have:
**Congratulations!** 🙌 &nbsp; You now have:

- A Next.js frontend blending static pages from your frontend repo with dynamic content from your database
- Dynamic pages powered by Keystone content that‘s editable in an intuitive Admin UI.
Expand All @@ -312,7 +313,7 @@ To get a read-only GraphQL API and GraphQL Playground in production, add `/pages
export { default, config } from '.keystone/next/graphql-api';
```

This takes the fully functional GraphQL API that Keystone is already generating and makes it available as an endpoint and GraphQL Playground within the Next.js frontend app at <http://localhost:3000/api/graphql>.
This takes the fully functional GraphQL API that Keystone is already generating and makes it available as an endpoint and GraphQL Playground within the Next.js frontend app at [http://localhost:3000/api/graphql](http://localhost:3000/api/graphql).

![A browser displaying the GraphQL playground](/assets/walkthroughs/embedded-nextjs/graphql-api.png)

Expand Down
Loading

0 comments on commit 8ba5a35

Please sign in to comment.