nexus/docs
Jan Piotrowski 601c2f03f4
fix(prisma): Replace outdated note (#1153)Co-authored-by: Andrew Carlson <5479270+andrewicarlson@users.noreply.github.com>
* fix(prisma): Remove outdated note

* Update 010-overview.mdx

---------

Co-authored-by: Andrew Carlson <5479270+andrewicarlson@users.noreply.github.com>
2023-03-16 11:04:26 -04:00
..
content fix(prisma): Replace outdated note (#1153)Co-authored-by: Andrew Carlson <5479270+andrewicarlson@users.noreply.github.com> 2023-03-16 11:04:26 -04:00
functions feat: new docs site (#500) 2020-09-30 12:25:39 +02:00
plugins feat: new docs site (#500) 2020-09-30 12:25:39 +02:00
prisma feat: new docs site (#500) 2020-09-30 12:25:39 +02:00
src Feature/update docs (#1136) 2023-02-02 10:48:58 -06:00
static/assets docs: move source type section into its own guide (#711) 2020-12-09 17:37:11 +01:00
.env.example feat: new docs site (#500) 2020-09-30 12:25:39 +02:00
.gitignore feat: new docs site (#500) 2020-09-30 12:25:39 +02:00
.prettierignore feat: new docs site (#500) 2020-09-30 12:25:39 +02:00
.prettierrc feat: new docs site (#500) 2020-09-30 12:25:39 +02:00
LICENSE feat: new docs site (#500) 2020-09-30 12:25:39 +02:00
README.md chore(docs): rename Nexus Schema to Nexus (#700) 2020-12-14 13:33:31 -05:00
config.js chore(docs): fix URLs point to git repo trunk 2020-12-16 09:06:39 -05:00
gatsby-browser.js feat: new docs site (#500) 2020-09-30 12:25:39 +02:00
gatsby-config.js fix: config file fixed (#522) 2020-09-30 16:07:25 +02:00
gatsby-node.js feat: new docs site (#500) 2020-09-30 12:25:39 +02:00
gatsby-ssr.js feat: new docs site (#500) 2020-09-30 12:25:39 +02:00
images.d.ts feat: new docs site (#500) 2020-09-30 12:25:39 +02:00
jest.setup.js feat: new docs site (#500) 2020-09-30 12:25:39 +02:00
netlify.toml Update netlify.toml (#521) 2020-09-30 15:54:27 +02:00
package.json docs: add sticky table of content 2020-12-02 18:30:00 +01:00
schema.sql feat: new docs site (#500) 2020-09-30 12:25:39 +02:00
tsconfig.json feat: new docs site (#500) 2020-09-30 12:25:39 +02:00
tslint.json feat: new docs site (#500) 2020-09-30 12:25:39 +02:00
yarn.lock docs: add sticky table of content 2020-12-02 18:30:00 +01:00

README.md

Nexus Documentation

Netlify Status

This repository contains the source code and the content for the Nexus documentation.

Run locally

Clone the repository and get started by running the following commands:

yarn
yarn dev

To prettify or format the code, run:

yarn prettify

Visit http://localhost:8000/ to view the app.

MDX blocks

View the example MDX blocks on http://localhost:8000/getting-started/example and the usage in example.mdx

Configure

Write MDX files in content folder.

Open config.js for available config options for gatsby, header, footer, feedback and siteMetadata

Inserting, moving and deleting files

All files/folders in the context are prefixed with a position which indicates the order in which they appear in the sidenav on the docs website. This makes it cumbersome to insert, move and delete files because the positions of a number of other files (if not all) in the same folder might need to be adjusted. Thanks to Luca Steeb, you can perform these operations with a dedicated CLI called mdtool.

Install

wget https://gist.githubusercontent.com/steebchen/bd085ebde1fcf4242e3fdd0df4d202a6/raw/c04e3d262eb6a302a9fab98f6428fec9329681e2/mdtool -qO /usr/local/bin/mdtool
chmod +x /usr/local/bin/mdtool

Usage

Overview

mdtool insert 3
mdtool swap A B
mdtool move A B
mdtool remove 4

mdtool insert

Make place for a new file at given index and increment all numbers by one after that index:

$ mdtool insert INDEX

# e.g.:
$ mdtool insert 2

# Result: for files 01-a, 02-b, 03-c, and 04-d; 03-c is renamed to 04-c and 04-d is renamed to 05-d so you can create a new file at index 2

mdtool swap

Swap two files; specify both filenames (prefix numbers get automatically adjusted):

$ mdtool swap FILENAME1 FILENAME2

# e.g.:
$ mdtool swap 03-file1.mdx 07-file2.mdx

# Result: Files are now named: 03-file2.mdx 07-file1.mdx

mdtool move

Move a given file to another given index

$ mdtool move FILENAME INDEX

# e.g.:
$ mdtool move 05-file.mdx 2

# Result: 05-file.mdx is move to 02-file.mdx, plus previous files 02-*, 03-*, 04-* are incremented

mdtool swap

Shift all other items by -1 at a given index:

$ mdtool remove INDEX

# e.g.:
$ mdtool remove 2

# Result: 01-a, 02-b, 03-c, 04-d becomes 01-a, 02-b, 02-c, 03-d; 02-b is supposed to be manually deleted

Thanks Luca