Skip to content

Commit

Permalink
Doc cleanup - Pass 2 (keystonejs#1797)
Browse files Browse the repository at this point in the history
* Fixed missing title on Knex adapter page

* Fixed Adding Lists linking to Quick Start instead of New Project

* Removed hardcoded v5.keystone.js URLs from docs

* Fixed broken link in demo-projects/README.md

* Replaced remaining instances of v5.keystonejs.com with keystonejs.com
  • Loading branch information
Vultraz authored and MadeByMike committed Oct 22, 2019
1 parent 4590cd2 commit 837acad
Show file tree
Hide file tree
Showing 33 changed files with 70 additions and 68 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,11 @@ yarn start
```

For more details and system requirements, check out the [5 Minute Quick Start
Guide](https://v5.keystonejs.com/quick-start/).
Guide](https://keystonejs.com/quick-start/).

### API

The [API documentation](https://v5.keystonejs.com/api/) contains a reference for all KeystoneJS packages.
The [API documentation](https://keystonejs.com/api/) contains a reference for all KeystoneJS packages.

### Demo Projects

Expand Down Expand Up @@ -150,7 +150,7 @@ _Note that when using a custom server, you will no longer get the formatted
console output when starting a server._

For more, see the [Custom Server
Discussion](https://v5.keystonejs.com/guides/custom-server).
Discussion](https://keystonejs.com/guides/custom-server).

### Production Build

Expand Down Expand Up @@ -213,7 +213,7 @@ tightly coupled to the API.

### Adding Authentication

_See [Authentication docs](https://v5.keystonejs.com/guides/authentication)._
_See [Authentication docs](https://keystonejs.com/guides/authentication)._

To setup authentication, you must instantiate an _Auth Strategy_, and create a
list used for authentication in `index.js`:
Expand Down
2 changes: 1 addition & 1 deletion demo-projects/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Minimum requirements for the Demo Projects:

- [Node.js](https://nodejs.org/) >= 10.x
- [Yarn](https://yarnpkg.com/)
- [MongoDB](https://v5.keystonejs.com/quick-start/mongodb) >= 4.x
- [MongoDB](https://www.mongodb.com/) >= 4.x

Download a copy of the Keystone 5 repo, and check out the latest release:

Expand Down
2 changes: 1 addition & 1 deletion demo-projects/blog/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@ PORT=5000 yarn start blog

Although the "Password" auth strategy is enabled for the Admin UI on this project, we haven't implemented any restrictions on the GraphQL API yet. So unauthenticated users are able to create and destroy admin users (!)

See the [Access Control](https://v5.keystonejs.com/guides/access-control) documentation for information on how to do this.
See the [Access Control](https://keystonejs.com/guides/access-control) documentation for information on how to do this.
2 changes: 1 addition & 1 deletion demo-projects/meetup/meetupConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ const MEETUP = {
`,
callToActionButtonLabel: `Join us now`,
copyrightText: `
<p>Copyright &copy; Thinkmill Pty Ltd, powered by <a href="https://v5.keystonejs.com">KeystoneJS</a>.</p>
<p>Copyright &copy; Thinkmill Pty Ltd, powered by <a href="https://keystonejs.com">KeystoneJS</a>.</p>
<p>If you run a meetup, please feel free to clone our site and make your own!
<a href="https://github.com/keystonejs/keystone-5/tree/master/demo-projects/meetup">You can find it on GitHub</a>.
</p>
Expand Down
4 changes: 2 additions & 2 deletions docs/api/access-control.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ order: 5
Control who can do what with your GraphQL API.

_Note_: This is the API documentation for Access Control. For getting started,
see the [Access Control Guide](https://v5.keystonejs.com/guides/access-control) or the
[Authentication Guide](https://v5.keystonejs.com/guides/authentication).
see the [Access Control Guide](/guides/access-control) or the
[Authentication Guide](/guides/authentication).

## Table of Contents

Expand Down
6 changes: 3 additions & 3 deletions docs/api/authentication.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ order: 4

# Authentication

Authentication strategies allow users to identify themselves to KeystoneJS. This can be used to restrict access to the AdminUI, and to configure [access controls](https://v5.keystonejs.com/guides/access-control/).
Authentication strategies allow users to identify themselves to KeystoneJS. This can be used to restrict access to the AdminUI, and to configure [access controls](/guides/access-control/).

- For password logins see: [`auth-password`](https://v5.keystonejs.com/keystone-alpha/auth-password/)
- For social logins using [Passport.js](http://www.passportjs.org/) see: [`auth-passport`](https://v5.keystonejs.com/keystone-alpha/auth-passport/)
- For password logins see: [`auth-password`](/keystone-alpha/auth-password/)
- For social logins using [Passport.js](http://www.passportjs.org/) see: [`auth-passport`](/keystone-alpha/auth-passport/)

## Usage

Expand Down
8 changes: 4 additions & 4 deletions docs/api/create-list.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ keystone.createList('Post', {
| `hooks` | `Object` | `{}` | Specify hooks to execute functions after list actions. |
| `labelField` | `String` | `name` | Specify a field to use as a label for individual list items. |
| `labelResolver` | `Function` | Resolves `labelField` or `id` | Function to resolve labels for individual list items. |
| `access` | `Function` \| `Object` \| `Boolean` | `true` | [Access control](https://v5.keystonejs.com/guides/access-control) options for the list. |
| `access` | `Function` \| `Object` \| `Boolean` | `true` | [Access control](/guides/access-control) options for the list. |
| `adapterConfig` | `Object` | | Override the adapter config options for a specific list. |
| `itemQueryName` | `String` | | Changes the _item_ name in GraphQL queries and mutations. |
| `listQueryName` | `String` | | Changes the _list_ name in GraphQL queries and mutations. |
Expand Down Expand Up @@ -121,9 +121,9 @@ keystone.createList('User', {

### `access`

[Access control](https://v5.keystonejs.com/guides/access-control) options for the list.
[Access control](/guides/access-control) options for the list.

Options for `create`, `read`, `update` and `delete` - can be a function, GraphQL where clause or Boolean. See the [access control API documentation](https://v5.keystonejs.com/api/access-control) for more details.
Options for `create`, `read`, `update` and `delete` - can be a function, GraphQL where clause or Boolean. See the [access control API documentation](/api/access-control) for more details.

#### Usage

Expand Down Expand Up @@ -297,7 +297,7 @@ This provides a method for packaging features that can be applied to multiple li

Configuration for limiting the kinds of queries that can be made against the list, to avoid queries that might overload the server.

See also [global query limits on the Keystone object](https://v5.keystonejs.com/api/keystone#query-limits).
See also [global query limits on the Keystone object](/api/keystone#query-limits).

- `maxResults`: maximum number of results that can be returned in a query (or subquery)

Expand Down
4 changes: 2 additions & 2 deletions docs/api/hooks.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ order: 7
# Hooks

The APIs for each hook are mostly the same across the 3 hook types
([list hooks](https://v5.keystonejs.com/guides/hooks#list-hooks), [field hooks](https://v5.keystonejs.com/guides/hooks#field-hooks), [field type
hooks](https://v5.keystonejs.com/guides/hooks#field-type-hooks)).
([list hooks](/guides/hooks#list-hooks), [field hooks](/guides/hooks#field-hooks), [field type
hooks](/guides/hooks#field-type-hooks)).

Any differences are called out in the documentation below.

Expand Down
4 changes: 2 additions & 2 deletions docs/guides/access-control.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ const { Text, Select, Checkbox, Password } = require('@keystone-alpha/fields');
const keystone = // ...

// Setup the Authentication Strategy.
// See https://v5.keystonejs.com/guides/authentication for more
// See /guides/authentication for more
const authStrategy = // ...

keystone.createList('User', {
Expand Down Expand Up @@ -106,4 +106,4 @@ Note that Jess can only read _his own_ email, and cannot read any passwords.

---

Read more in the [Access Control API docs](https://v5.keystonejs.com/api/access-control).
Read more in the [Access Control API docs](/api/access-control).
10 changes: 5 additions & 5 deletions docs/guides/add-lists.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ order: 2

# Adding Lists To Your Keystone Project

We've already created one list during [previous tutorial](https://v5.keystonejs.com/quick-start).
We've already created one list during [previous tutorial](/guides/new-project).
Now it's the time to dive deeper. Let's make ToDos object a bit more complex.

## Creating basic list in separate file
Expand Down Expand Up @@ -71,7 +71,7 @@ module.exports = {
}
```

If you're curious about the usage options you can read more about `CalendarDay` [here](https://v5.keystonejs.com/keystone-alpha/fields/src/types/calendar-day/). Now it's time to explore docs on other field types and get a bit familiar with them. It will help you make your schema cleaner.
If you're curious about the usage options you can read more about `CalendarDay` [here](/keystone-alpha/fields/src/types/calendar-day/). Now it's time to explore docs on other field types and get a bit familiar with them. It will help you make your schema cleaner.

## Defining User list

Expand Down Expand Up @@ -103,8 +103,8 @@ const UsersSchema = require('./lists/Users.js');
keystone.createList('User', UsersSchema);
```

Relaunch your app and check if new list appeared in admin panel. Note, now `type: Password` looks when you're creating new user. But how can we assign a task to specific user? Let's proceed with [Defining Relationships](https://v5.keystonejs.com/guides/relationships)
Relaunch your app and check if new list appeared in admin panel. Note, now `type: Password` looks when you're creating new user. But how can we assign a task to specific user? Let's proceed with [Defining Relationships](/guides/relationships)

See also:
[Schema - Lists & Fields](https://v5.keystonejs.com/guides/schema)
[API - createList](https://v5.keystonejs.com/api/create-list)
[Schema - Lists & Fields](/guides/schema)
[API - createList](/api/create-list)
6 changes: 3 additions & 3 deletions docs/guides/apps.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,11 @@ In both cases, the `keystone dev` and `keystone start` commands will consume the
exported `.apps` array, making their middleware available in the order the apps
are specified.

If you're using a [Custom Server](https://v5.keystonejs.com/guides/custom-server), it will be your
If you're using a [Custom Server](/guides/custom-server), it will be your
responsibility to ensure each app's middleware is correctly injected into any
http server you setup.

Other interesting KeystoneJS compatible Apps are:

- [Static App](https://v5.keystonejs.com/keystone-alpha/app-static) for serving static files.
- [Next.js App](https://v5.keystonejs.com/keystone-alpha/app-next) for serving a Next.js App on the same server as the API
- [Static App](/keystone-alpha/app-static) for serving static files.
- [Next.js App](/keystone-alpha/app-next) for serving a Next.js App on the same server as the API
6 changes: 3 additions & 3 deletions docs/guides/authentication.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ _Note on terminology_:
- _Access Control_ refers to the specific actions an authenticated or anonymous
user can take. Often referred to as _authorization_ elsewhere.
The specifics of how this is done is outside the scope of this document.
See [Access Control](https://v5.keystonejs.com/guides/access-control) for more.
See [Access Control](/guides/access-control) for more.

## Admin UI

Expand All @@ -22,7 +22,7 @@ Username / Password authentication can be enabled on the Admin UI.
> NOTE: Admin Authentication will only restrict access to the Admin _UI_.
>
> To also restrict access to the _API_,
> you must setup [Access Control](https://v5.keystonejs.com/guides/access-control) config.
> you must setup [Access Control](/guides/access-control) config.
To setup authentication, you must instantiate an _Auth Strategy_, and create a
list used for authentication in `index.js`:
Expand Down Expand Up @@ -91,4 +91,4 @@ Finally; login with the newly created `User`'s credentials.
Adding Authentication as above will only enable login to the Admin UI, it _will
not_ restrict API access.

**To restrict API access, you must setup [Access Control](https://v5.keystonejs.com/guides/access-control).**
**To restrict API access, you must setup [Access Control](/guides/access-control).**
4 changes: 2 additions & 2 deletions docs/guides/custom-mutations.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@ Out of the box Keystone provides predictable CRUD operations (Create, Read, Upda

Custom Queries and Mutations may be required if you wish to preform non-CRUD operations or actions that don't relate to a specific List.

See the [GraphQL Philosophy](https://v5.keystonejs.com/guides/graphql-philosophy) for more information on how Keystone implements CRUD operations in GraphQL and when Custom Queries and Mutations may be required.
See the [GraphQL Philosophy](/guides/graphql-philosophy) for more information on how Keystone implements CRUD operations in GraphQL and when Custom Queries and Mutations may be required.

You can add to Keystone's generated schema with custom types, queries, and mutations using the `keystone.extendGraphQLSchema()` method.

# Creating an Custom Mutation

A common example where a custom mutation might be beneficial is if you want to increment a value.

Like any problem there are multiple solutions. You can implement an incrementing value with [Hooks](https://v5.keystonejs.com/guides/hooks) but in this example we're going to look at how to do this with a custom mutation.
Like any problem there are multiple solutions. You can implement an incrementing value with [Hooks](/guides/hooks) but in this example we're going to look at how to do this with a custom mutation.

First let's define a `Page` list. For the sake of simplicity, we'll give it only two fields: `title` and `views`.

Expand Down
2 changes: 1 addition & 1 deletion docs/guides/custom-server.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ handles the GraphQL API and Admin UI. Things such as:
- ... etc

A **Custom Server** can replace the default and act as the entry point to your
application which consumes your [schema definition](https://v5.keystonejs.com/guides/schema). A Custom
application which consumes your [schema definition](/guides/schema). A Custom
Server must handle initialising a http server which correctly executes any given KeystoneJS Apps.

_Note_: Before reaching for a custom server, consider using a KeystoneJS
Expand Down
2 changes: 1 addition & 1 deletion docs/guides/graphql-philosophy.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ order: 3

# GraphQL Philosophy

> 💡 _This is a conceptural introduction to how the Keystone team think about GraphQL APIs (and hence how Keystone's GraphQL API is generated). For more specific API docs, see [**Introduction to the GraphQL API**](https://v5.keystonejs.com/guides/intro-to-graphql)._
> 💡 _This is a conceptural introduction to how the Keystone team think about GraphQL APIs (and hence how Keystone's GraphQL API is generated). For more specific API docs, see [**Introduction to the GraphQL API**](/guides/intro-to-graphql)._
## Goals

Expand Down
2 changes: 1 addition & 1 deletion docs/guides/hooks.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ title: Hooks
# Hooks

> _NOTE: Below is an overview of hooks. For API docs see
> [Hooks API](https://v5.keystonejs.com/api/hooks)._
> [Hooks API](/api/hooks)._
KeystoneJS provide a system of hooks on the `create`, `update`, and `delete` mutations which allow developers to customise the behaviour of their system.

Expand Down
6 changes: 3 additions & 3 deletions docs/guides/intro-to-graphql.md
Original file line number Diff line number Diff line change
Expand Up @@ -218,13 +218,13 @@ fetch('/admin/api', {

A good next step is to write an `executeQuery` function that accepts a query and variables and returns the results from the API. Take a look at the `todo` sample application in the `cli` for examples of this.

**Note:** If you have configured [Access Control](https://v5.keystonejs.com/api/access-control) it can effect the result of some queries.
**Note:** If you have configured [Access Control](/api/access-control) it can effect the result of some queries.

## Executing Queries and Mutations on the Server

In addition to executing queries via the API, you can execute queries and mutations on the server using [the `keystone.executeQuery()` method](https://v5.keystonejs.com/keystone-alpha/keystone/#executequeryquerystring-config).
In addition to executing queries via the API, you can execute queries and mutations on the server using [the `keystone.executeQuery()` method](/keystone-alpha/keystone/#executequeryquerystring-config).

**Note: ** No access control checks are run when executing queries on the server. Any queries or mutations that checked for `context.req` in the resolver may also return different results as the `req` object is set to `{}`. See: [Keystone executeQuery()](https://v5.keystonejs.com/keystone-alpha/keystone/#executequeryquerystring-config)
**Note: ** No access control checks are run when executing queries on the server. Any queries or mutations that checked for `context.req` in the resolver may also return different results as the `req` object is set to `{}`. See: [Keystone executeQuery()](/keystone-alpha/keystone/#executequeryquerystring-config)

## Filter, Limit and Sorting

Expand Down
4 changes: 2 additions & 2 deletions docs/guides/mutation-lifecycle.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ Each of these mutations is implemented within KeystoneJS by a corresponding reso
Please refer to the [API documentation](LINK_TODO)) for full details on how to call these mutations either from [GraphQL](LINK_TODO)) or directly from [Keystone](LINK_TODO)).
-->

KeystoneJS provides [access control](https://v5.keystonejs.com/guides/access-control)) mechanisms and a [hook system](https://v5.keystonejs.com/guides/hooks)) which allows the developer to customise the behaviour of each of these mutations.
KeystoneJS provides [access control](/guides/access-control)) mechanisms and a [hook system](/guides/hooks)) which allows the developer to customise the behaviour of each of these mutations.

This document details the lifecycle of each mutation, and how the different access control mechanisms and hooks interact.

Expand Down Expand Up @@ -103,7 +103,7 @@ The first step in all mutations is to check that the user has access to perform

If access control has been defined statically or imperatively this check can be performed here. An `AccessDeniedError` is returned if the access control failed. If the access control mechanism for this list is defined declaratively (i.e using a GraphQL `where` statement), this check is deferred until the next step.

For more information on how to define access control, please consult the [access control documentation](https://v5.keystonejs.com/guides/access-control)).
For more information on how to define access control, please consult the [access control documentation](/guides/access-control)).

#### 2. Get item(s) (`update/delete`)

Expand Down
2 changes: 1 addition & 1 deletion docs/guides/new-project.md
Original file line number Diff line number Diff line change
Expand Up @@ -139,4 +139,4 @@ You should see something like this
🔗 GraphQL API: http://localhost:3000/admin/api
```

Now it's the time to check those routes in browser to ensure that everything works as expected. Then proceed to second step - [Adding Lists](https://v5.keystonejs.com/guides/add-lists)
Now it's the time to check those routes in browser to ensure that everything works as expected. Then proceed to second step - [Adding Lists](/guides/add-lists)
2 changes: 1 addition & 1 deletion docs/guides/performance.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ On the second step, you will see a screen such as:

Ignore the `npx apollo service:push` command for now,
we'll need to upload the schema a slightly different way to account for any
[Access Control](https://v5.keystonejs.com/guides/access-control.) you may have setup.
[Access Control](/guides/access-control.) you may have setup.

#### Config

Expand Down
Loading

0 comments on commit 837acad

Please sign in to comment.