This repository contains the code for the Tour of JSON Schema project. https://json-schema-org.github.io/tour
The project is built using next.js.
after cloning the repository, create a .env
file in the root of the project with the following content:
MODE = "local"
Then run the following command to install the dependencies:
yarn install
To start the development server, run the following command:
yarn dev
when you run
yarn dev
, a file namedoutline.json
will be created in th/content
directory. This file is used to generate the table of contents for the website.
To run the tests, run the following command:
yarn test
The content written in MDX, a markdown format that supports JSX syntax. This allows us to embed React components in the docs. See the GitHub Markdown Guide for a quick overview of markdown syntax.
We recommend the following extensions for VSCode users:
the content of each step is stored in the /content
directory with the following structure:
├── 01-introduction
│ ├── index.mdx
│ ├── 01-welcome
│ ├── instructions.mdx
│ ├── code.ts
│ ├── 02-what-is-json-schema
│ ├── instructions.mdx
│ ├── code.ts
├── 02-types
│ ├── index.mdx
│ ├── 01-primitive-types
│ ├── instructions.mdx
│ ├── code.ts
│ ├── 02-arrays
│ ├── instructions.mdx
│ ├── code.ts
The instructions.mdx file holds the content the users sees, and the code.ts file holds template code and the logic to validate user provided schemas