docs: make code blocks collapsible (#7606)
* added collapsible code feature * fixed side shadow * fix build errors * change design * make code blocks collapsible
This commit is contained in:
1 parent
dc087bf310
commit
4a6327e497
44 files changed
+815
-446
No files matched your search
+18
-23
@@ -1,4 +1,4 @@
|
||||
import { LegacyCodeTabs } from "docs-ui"
|
||||
import { CodeTabs, CodeTab } from "docs-ui"
|
||||
|
||||
If you install the Medusa CLI tool with Yarn, then try to use the CLI tool but get the error:
|
||||
|
||||
@@ -8,28 +8,23 @@ command not found: medusa
|
||||
|
||||
You have to add Yarn’s install location to the PATH variable:
|
||||
|
||||
<LegacyCodeTabs
|
||||
tabs={[
|
||||
{
|
||||
label: "MacOS / Linux",
|
||||
value: "unix",
|
||||
code: {
|
||||
lang: "bash",
|
||||
source: `export PATH="$(yarn global bin):$PATH"`
|
||||
}
|
||||
},
|
||||
{
|
||||
label: "Windows",
|
||||
value: "windows",
|
||||
code: {
|
||||
lang: "bash",
|
||||
source: `# MAKE SURE TO INCLUDE %path%
|
||||
<CodeTabs group="operating-systems">
|
||||
<CodeTab label="MacOS / Linux" value="unix">
|
||||
|
||||
```plain
|
||||
export PATH="$(yarn global bin):$PATH
|
||||
```
|
||||
|
||||
</CodeTab>
|
||||
<CodeTab label="Windows" value="windows">
|
||||
|
||||
```bash
|
||||
# MAKE SURE TO INCLUDE %path%
|
||||
setx path "%path%;c:\\users\\YOURUSERNAME\\appdata\\local\\yarnbin"
|
||||
# YOURUSERNAME is your account username`
|
||||
}
|
||||
}
|
||||
]}
|
||||
group="operating-systems"
|
||||
/>
|
||||
# YOURUSERNAME is your account username
|
||||
```
|
||||
|
||||
</CodeTab>
|
||||
</CodeTabs>
|
||||
|
||||
You can learn more in [Yarn’s documentation](https://classic.yarnpkg.com/en/docs/cli/global#adding-the-install-location-to-your-path).
|
||||
+19
-21
@@ -1,26 +1,24 @@
|
||||
import { LegacyCodeTabs } from "docs-ui"
|
||||
import { CodeTabs, CodeTab } from "docs-ui"
|
||||
|
||||
This error can occur while installing any of Medusa's projects (for example, Next.js Starter Template). There is no specific cause to this error.
|
||||
|
||||
One way to resolve it is by removing the `node_modules` directory in the project and re-installing the dependencies:
|
||||
|
||||
<LegacyCodeTabs tabs={[
|
||||
{
|
||||
label: "MacOS / Linux",
|
||||
value: "unix",
|
||||
code: {
|
||||
lang: "bash",
|
||||
source: `rm -rf node_modules
|
||||
yarn install`
|
||||
}
|
||||
},
|
||||
{
|
||||
label: "Windows",
|
||||
value: "windows",
|
||||
code: {
|
||||
lang: "bash",
|
||||
source: `rd /s /q node_modules
|
||||
yarn install`
|
||||
}
|
||||
}
|
||||
]} group="operating-systems" />
|
||||
<CodeTabs group="operating-systems">
|
||||
<CodeTab label="MacOS / Linux" value="unix">
|
||||
|
||||
```bash
|
||||
rm -rf node_modules
|
||||
yarn install
|
||||
```
|
||||
|
||||
</CodeTab>
|
||||
<CodeTab label="Windows" value="windows">
|
||||
|
||||
```bash
|
||||
rd /s /q node_modules
|
||||
yarn install
|
||||
```
|
||||
|
||||
</CodeTab>
|
||||
</CodeTabs>
|
||||
Reference in new issue
Block a user