Skip to content

Commit

Permalink
[doc] Added an mdx-code-block escape hatch syntaxt to workaround a Cr…
Browse files Browse the repository at this point in the history
…owdIn … (#5574)

* Added an mdx-code-block escape hatch syntaxt to workaround a CrowdIn issue.

* Added an mdx-code-block escape hatch syntaxt to workaround a CrowdIn issue.

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Apply suggestions from code review

* Update index.md

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Chengchen(Rex) Wang <14366016+rexwangcc@users.noreply.github.com>
  • Loading branch information
3 people committed Jul 29, 2022
1 parent f97800c commit b3ac33a
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 10 deletions.
18 changes: 12 additions & 6 deletions docs/lang/articles/contribution/dev_install.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ Installation instructions vary depending on which operating system (OS) you are

## Prerequisites

````mdx-code-block
<Tabs
defaultValue="unix"
values={[
Expand Down Expand Up @@ -66,13 +67,14 @@ Installation instructions vary depending on which operating system (OS) you are
</TabItem>
</Tabs>

````
### Install Clang

<blockquote>
This Clang compiler is used to compile the Taichi device runtime. It is **not required** to use this compiler for the C++ compiler.
</blockquote>

````mdx-code-block
<Tabs
defaultValue="arch"
values={[
Expand Down Expand Up @@ -153,7 +155,7 @@ Some Linux distributions may require additional packages to build Taichi. Keep a
</TabItem>
</Tabs>

````
### Install LLVM

#### Install pre-built, customized LLVM binaries
Expand All @@ -162,6 +164,7 @@ We provide pre-built, customized LLVM binaries. For now, Taichi supports LLVM 10

1. Download and install customized binaries from the following list per your system environment:

````mdx-code-block
<Tabs
defaultValue="llvm_linux"
values={[
Expand All @@ -185,9 +188,9 @@ We provide pre-built, customized LLVM binaries. For now, Taichi supports LLVM 10
<a href="https://github.com/taichi-dev/taichi_assets/releases/download/llvm10_msvc2022/taichi-llvm-10.0.0-msvc2022.zip">LLVM 10.0.0 for Windows MSVC 2022</a>
</TabItem>
</Tabs>

2. Configure environment variable:
````mdx-code-block
<Tabs
defaultValue="linux"
values={[
Expand Down Expand Up @@ -216,14 +219,15 @@ Add an environment variable `LLVM_DIR` with value `<Path to the extracted LLVM b
</TabItem>
</Tabs>

````

<details>

<summary><font color="#006284"><h4>Build LLVM 10.0.0 from source</h4></font></summary>

We provide instructions here if you need to build LLVM 10.0.0 from source.

````mdx-code-block
<Tabs
defaultValue="linux"
values={[
Expand Down Expand Up @@ -282,7 +286,6 @@ cmake --build . --target=INSTALL --config=Release
</TabItem>
</Tabs>

</details>
## Install optional dependencies
Expand All @@ -298,6 +301,7 @@ This section works for you if you have a Nvidia GPU supporting CUDA. Note that t
To install CUDA:
````mdx-code-block
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
Expand Down Expand Up @@ -352,6 +356,7 @@ import TabItem from '@theme/TabItem';
You must install the Vulkan SDK in order to debug Taichi's Vulkan backend. To proceed:
````mdx-code-block
<Tabs
defaultValue="linux"
values={[
Expand Down Expand Up @@ -393,10 +398,12 @@ You must install the Vulkan SDK in order to debug Taichi's Vulkan backend. To pr
</TabItem>
</Tabs>
````
</details>

## Build Taichi from source

````mdx-code-block
<Tabs
defaultValue="linux"
values={[
Expand Down Expand Up @@ -478,7 +485,6 @@ If you want to build Taichi with Clang or maybe utilize `ccache` to cache and sp
</TabItem>
</Tabs>

## Troubleshooting and debugging
### `llvm-as` cannot be opened on macOS
Expand Down
5 changes: 3 additions & 2 deletions docs/lang/articles/contribution/doc_writing.md
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,6 @@ This is a danger!
## Code groups

You could also insert tab-based code groups:

```md
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
Expand All @@ -192,6 +191,7 @@ import TabItem from '@theme/TabItem';
</Tabs>
```

````mdx-code-block
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
Expand All @@ -206,7 +206,6 @@ import TabItem from '@theme/TabItem';
<TabItem value="orange">This is an orange 🍊.</TabItem>
<TabItem value="banana">This is a banana 🍌.</TabItem>
</Tabs>

## Footnotes
To add footnotes, use:
Expand Down Expand Up @@ -251,6 +250,8 @@ import TOCInline from '@theme/TOCInline';
to insert an in-line ToC:
````mdx-code-block
import TOCInline from '@theme/TOCInline';
<TOCInline toc={toc} />
````
7 changes: 5 additions & 2 deletions docs/lang/articles/get-started/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,13 @@ To get started with the Taichi Language, simply install it with `pip`:
python3 -m pip install taichi
```

There are a few of extra requirements depend on which operating system you are using:

````mdx-code-block
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
There are a few of extra requirements depend on which operating system you are using:

<Tabs
defaultValue="arch-linux"
values={[
Expand All @@ -71,6 +73,7 @@ There are a few of extra requirements depend on which operating system you are u
</TabItem>
</Tabs>
````

See the [Installation Troubleshooting](../faqs/install.md) if you run into any issues when installing Taichi.

Expand Down

0 comments on commit b3ac33a

Please sign in to comment.