docs: redesigned code blocks (#2745)
* docs: redesigned code blocks to include titles * docs: added a title where necessary
This commit is contained in:
@@ -19,7 +19,7 @@ You can check out more information in [NPM’s documentation](https://docs.npmjs
|
||||
|
||||
If you install the Medusa CLI tool with Yarn, then try to use the CLI tool but get the error:
|
||||
|
||||
```bash noHeader
|
||||
```bash noReport
|
||||
command not found: medusa
|
||||
```
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ In your `medusa-config.js` , you should ensure that you've configured your CORS
|
||||
|
||||
The default configuration uses the following CORS settings:
|
||||
|
||||
```jsx
|
||||
```jsx title=medusa-config.js
|
||||
// CORS when consuming Medusa from admin
|
||||
const ADMIN_CORS = process.env.ADMIN_CORS || "http://localhost:7000,http://localhost:7001"
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ For that reason, when the `start` and `build` scripts in `www/docs` are used, th
|
||||
|
||||
If you receive the following error when you run the `build` command in `www/docs`:
|
||||
|
||||
```bash noHeader
|
||||
```bash noReport
|
||||
FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
|
||||
```
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
You add payment providers to your Medusa instance by adding them as plugins in `medusa-config.js`:
|
||||
|
||||
```jsx
|
||||
```jsx title=medusa-config.js
|
||||
const plugins = [
|
||||
...
|
||||
// You can create a Stripe account via: https://stripe.com
|
||||
|
||||
@@ -8,7 +8,7 @@ You can learn how to [install Redis in the Set Up your Development Environment d
|
||||
|
||||
After installing it, make sure to configure your Medusa server to use Redis:
|
||||
|
||||
```jsx
|
||||
```jsx title=medusa-config.js
|
||||
module.exports = {
|
||||
projectConfig: {
|
||||
//...
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
If you're using the [S3 Plugin](../add-plugins/s3.md) and, when you upload an image, you receive the following error on your Medusa server:
|
||||
|
||||
```bash noHeader
|
||||
```bash noReport
|
||||
AccessControlListNotSupported: The bucket does not allow ACLs
|
||||
```
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
If you've created a new Medusa server with the `--seed` option or used the `seed` script or command, the default credentials are:
|
||||
|
||||
```bash noHeader
|
||||
```bash noReport
|
||||
email: admin@medusa-test.com
|
||||
password: supersecret
|
||||
```
|
||||
|
||||
@@ -6,7 +6,7 @@ However, this comes at the expense of important features that are needed in a pr
|
||||
|
||||
Therefore, you might experience the following error when going through a checkout flow in one of Medusa's starters while using SQLite:
|
||||
|
||||
```bash noHeader
|
||||
```bash noReport
|
||||
Error: Transaction already started for the given connection, commit current transaction before starting a new one.
|
||||
```
|
||||
|
||||
@@ -16,7 +16,7 @@ You can learn how to install PostgreSQL on your machine in the [Set Up your Deve
|
||||
|
||||
Then in your `medusa-config.js`, you should change the project configuration to use Postgres as the database type:
|
||||
|
||||
```jsx
|
||||
```jsx title=medusa-config.js
|
||||
module.exports = {
|
||||
projectConfig: {
|
||||
//...
|
||||
@@ -31,7 +31,7 @@ Where `DATABASE_URL` is the connection string to your PostgreSQL database. You c
|
||||
|
||||
Make sure to also remove the following lines that are used to configure an SQLite database:
|
||||
|
||||
```jsx
|
||||
```jsx title=medusa-config.js
|
||||
database_type: "sqlite",
|
||||
database_database: "./medusa-db.sql",
|
||||
```
|
||||
@@ -46,7 +46,7 @@ medusa migrations run
|
||||
|
||||
If you want to add demo data into your server, you should also seed the database using the following command:
|
||||
|
||||
```bash npm2yarn noHeader
|
||||
```bash npm2yarn noReport
|
||||
npm run seed
|
||||
```
|
||||
|
||||
|
||||
Reference in New Issue
Block a user