Skip to content

Commit 52ce6e8

Browse files
committed
fix online code-exercise issue, and optimize readme
1 parent bf1d0ff commit 52ce6e8

File tree

8 files changed

+24
-6
lines changed

8 files changed

+24
-6
lines changed

.devcontainer/devcontainer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,5 @@
1313
},
1414
"remoteUser": "vscode",
1515
"postCreateCommand": "/bin/bash .devcontainer/postCreate.sh",
16-
"postAttachCommand": "xlings checker"
16+
"postAttachCommand": "d2x checker"
1717
}

.devcontainer/postCreate.sh

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,11 @@ if ! command -v xlings >/dev/null 2>&1; then
99
curl -fsSL https://d2learn.org/xlings-install.sh | bash
1010
fi
1111

12-
echo "xlings installed"
12+
echo "xlings installed"
13+
14+
echo "Installing dependencies (d2x and ...) by xlings..."
15+
16+
source ~/.bashrc
17+
xlings install --verbose
18+
19+
echo "Dependencies installed"

.github/workflows/online-ebook.yml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,17 +40,23 @@ jobs:
4040

4141
steps:
4242
- uses: actions/checkout@v4
43-
- name: Install mdBook by Xlings
43+
44+
- name: Install Xlings
45+
env:
46+
XLINGS_NON_INTERACTIVE: 1
4447
run: |
4548
curl -fsSL https://d2learn.org/xlings-install.sh | bash
46-
export PATH=/home/xlings/.xlings_data/bin:$PATH
47-
xlings install mdbook@${MDBOOK_VERSION} --global -y
49+
echo "PATH=$HOME/.xlings/subos/current/bin:$PATH" >> "$GITHUB_ENV"
50+
51+
- name: Install mdBook
52+
run: xlings install mdbook@${MDBOOK_VERSION} -y
53+
4854
- name: Setup Pages
4955
id: pages
5056
uses: actions/configure-pages@v4
57+
5158
- name: Build with mdBook
5259
run: |
53-
export PATH=/home/xlings/.xlings_data/bin:$PATH
5460
./build.sh
5561
- name: Upload artifact
5662
uses: actions/upload-pages-artifact@v3

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ irm https://d2learn.org/xlings-install.ps1.txt | iex
6767
</details>
6868

6969
```bash
70+
xlings install d2x -y
7071
d2x install d2mcpp
7172
cd d2mcpp
7273
d2x checker

README.zh.hant.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ irm https://d2learn.org/xlings-install.ps1.txt | iex
6767
</details>
6868

6969
```bash
70+
xlings install d2x -y
7071
d2x install d2mcpp
7172
cd d2mcpp
7273
d2x checker

README.zh.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ irm https://d2learn.org/xlings-install.ps1.txt | iex
6767
</details>
6868

6969
```bash
70+
xlings install d2x -y
7071
d2x install d2mcpp
7172
cd d2mcpp
7273
d2x checker

book/en/src/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ irm https://d2learn.org/xlings-install.ps1.txt | iex
6363
</details>
6464

6565
```bash
66+
xlings install d2x -y
6667
d2x install d2mcpp
6768
cd d2mcpp
6869
d2x checker

book/src/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ irm https://d2learn.org/xlings-install.ps1.txt | iex
6363
</details>
6464

6565
```bash
66+
xlings install d2x -y
6667
d2x install d2mcpp
6768
cd d2mcpp
6869
d2x checker

0 commit comments

Comments
 (0)