all-contributors/add-baldyeagle [badge-all-contributors]: https://img.shields.io/badge/all_contributors-9-orange.svg?style=flat-square
![All Contributors][badge-all-contributors]
This repository contains the source code and the content for the Prisma documentation.
Read through the contributing guide to learn how you can contribute to the Prisma documentation.
- Clone this repository.
- On your computer, open a terminal window in the repository's directory.
- Run the following commands:
npm install
npm run dev
Run a local build to run the functions using the following command:
netlify dev
Make sure you have the correct path to
POSTGRES_URL
in your local.env
file to test the functions
To prettify or format the code, run:
npm run prettify
Visit http://localhost:8000/
to view the app.
Write MDX files in content
folder.
Open config.js
for available config options for gatsby
, header
, footer
and siteMetadata
.
-
gatsby
config for global configuration likepathPrefix
- Gatsby Path Prefix
-
header
config for site header configuration liketitle
- The title that appears on the top leftlinks
- The links for headerlogoLink
- The link to redirect on logo click
-
footer
config for site footer configuration liketitle
- The title that appears on the top leftlogoLink
- The link to redirect on logo clickproducts
,community
,company
,resources
- The links for various footernewsletter
- Newsletter configfindus
- Social links
-
siteMetadata
config for website related configurationtitle
- Title of the website in main pagedescription
- Description of the websitekeywords
- Keywords of the website for SEO
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
.
First, install wget
:
brew install wget
Then use wget
to install mdtool
:
wget https://gist.githubusercontent.com/steebchen/bd085ebde1fcf4242e3fdd0df4d202a6/raw/c04e3d262eb6a302a9fab98f6428fec9329681e2/mdtool -qO /usr/local/bin/mdtool
chmod +x /usr/local/bin/mdtool
mdtool insert 3
mdtool swap A B
mdtool move A B
mdtool remove 4
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
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
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
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 goes to these wonderful people (emoji key):
Jan Piotrowski π |
Daniel Norman π π‘ |
GΓ©rΓ΄me Grignon π π‘ |
Allison Clift-Jennings π π‘ |
Yao Hsiao π |
Daniel Weinmann π |
Rowin HernΓ‘ndez π |
Shigenobu Nishikawa π‘ |
Austin Baldwin π |
This project follows the all-contributors specification. Contributions of any kind welcome!