8000 GitHub - saleor/saleor-docs: Saleor documentation hosted at https://docs.saleor.io
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

saleor/saleor-docs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Saleor Documentation

What's In This Document

Installation

Using DevContainers for VSCode (Recommended)

Note

  • This requires docker or equivalent software to be installed and running on the machine.
  • Other editors than VSCode are supported: see the official documentation

Usage:

  1. Install the Dev Containers extension for VSCode
  2. Press F1 then run the command: >dev containers: rebuild and Reopen in Container
  3. Once started, it should open a new VSCode workspace which should allow you to perform remote coding (against the container)
  4. Go to http://127.0.0.1:5000/ (may take up to a minute to load when opened for the first time)
  5. When editing the code in VSCode, changes will reflect at http://127.0.0.1:5000/ (may take a few seconds)

More details are available in the official VSCode documentation: https://code.visualstudio.com/docs/devcontainers/containers#_getting-started

Using Docker

Steps:

  1. Go under .devcontainer/ folder
  2. Run:
    docker-compose up
  3. Visit http://127.0.0.1:5000/ (may take up to a minute to load when opened for the first time)
  4. Any changes made to the files will reflect at http://127.0.0.1:5000/ (may take a few seconds)

Using Node & NPM

  1. Make sure you are using Node in version 20+:
node --version
  1. Install project dependencies:
npm install
  1. Run your dev server:
npm start

Production Build

  1. Build project:
npm run build
  1. Testing build local:
npm run serve

Editing Content

Directory Structure

  • /docs Main docs content directory.
  • /docs/api-reference API reference generated from schema.graphql
  • /docusaurus.config.js Docusaurus configuration file.
  • /docusaurus2-graphql-doc-generator GraphQL API Reference plugin code.
  • /sidebars.js Sidebar menu structure.
  • /static Styling and other static files.

Formatting

Code formatting

Code and response examples should be inside code blocks with proper language:

```graphql
query {
  id
  name
}
```
```json
{
  "errorCode": 400
}
```

Lining pages

Use full path to the file to avoid linking to wrong page.

  • âś… Example of good link: [Attributes](/docs/developer/attributes.mdx)
  • 🛑 Avoid: [Attributes](/attributes)

Using custom React components

All documentation files use extension:

  • .mdx - Developer documentation
  • .md - Dashboard documentation

If your page uses custom react components, you are required to use .mdx file extension. Import statement is also required:

## <!-- /docs/developer/export/export-overview.mdx file -->

## title: Exporting Products

import Foo from "@site/components/Foo";

...

<Foo />

For charts we are using Mermaid package.

Editing an existing docs page