docs: redesigned code blocks (#2745)

* docs: redesigned code blocks to include titles

* docs: added a title where necessary
This commit is contained in:
Shahed Nasser
2022-12-08 18:52:54 +02:00
committed by GitHub
parent 8efae2dfcf
commit a57177ded5
60 changed files with 455 additions and 375 deletions
+5 -5
View File
@@ -51,7 +51,7 @@ Where `<YOUR_MEILISEARCH_HOST>` is the host of your MeiliSearch instance. By def
Finally, in `medusa-config.js` add the following item into the `plugins` array:
```jsx
```jsx title=medusa-config.js
const plugins = [
//...
{
@@ -144,7 +144,7 @@ The Next.js storefront has the MeiliSearch integration available out of the box.
First, ensure that the search feature is enabled in `store.config.json`:
```json
```json title=store.config.json
{
"features": {
"search": true
@@ -206,7 +206,7 @@ In Gatsby, environment variables that should be public and available in the brow
Then, create the file `src/components/header/search.jsx` with the following content:
```jsx
```jsx title=src/components/header/search.jsx
import {
Highlight,
Hits,
@@ -269,13 +269,13 @@ If you named your environment variables differently based on your framework, mak
Finally, import this file at the beginning of `src/components/header/index.jsx`:
```jsx
```jsx title=src/components/header/index.jsx
import Search from "./search"
```
And add the `Search` component in the returned JSX before `RegionPopover`:
```jsx
```jsx title=src/components/header/index.jsx
//...
<Search />
<RegionPopover regions={mockData.regions} />