diff options
author | 2021-09-24 23:50:00 +0800 | |
---|---|---|
committer | 2021-09-24 17:50:00 +0200 | |
commit | ffbc48da9786b98c0ae2bbfda482f8b9dae55919 (patch) | |
tree | db826edd942220c7f041cf467aab26bb68c11cbd /docs/src | |
parent | 1a0e5ce2a0fab29c8c392c0543d366806ae28d32 (diff) | |
download | astro-ffbc48da9786b98c0ae2bbfda482f8b9dae55919.tar.gz astro-ffbc48da9786b98c0ae2bbfda482f8b9dae55919.tar.zst astro-ffbc48da9786b98c0ae2bbfda482f8b9dae55919.zip |
Update Doc: Getting Starteted in Zh-tw (#1398)
* Update examples in getting started
* Update Online Playgrounds for zh-tw
Diffstat (limited to '')
-rw-r--r-- | docs/src/config.ts | 3 | ||||
-rw-r--r-- | docs/src/pages/zh-TW/getting-started.md | 21 |
2 files changed, 18 insertions, 6 deletions
diff --git a/docs/src/config.ts b/docs/src/config.ts index 284fca0b7..b870eed64 100644 --- a/docs/src/config.ts +++ b/docs/src/config.ts @@ -70,8 +70,7 @@ export const SIDEBAR = { { text: '設定', header: true }, { text: '新手上路', link: 'zh-TW/getting-started' }, { text: '快速開始', link: 'zh-TW/quick-start' }, - { text: '安裝', link: 'zh-TW/installation' }, - { text: '範例', link: 'zh-TW/examples' }, + { text: '安裝', link: 'zh-TW/installation' } ], bg: [ { text: 'Главни', header: true }, diff --git a/docs/src/pages/zh-TW/getting-started.md b/docs/src/pages/zh-TW/getting-started.md index ef1d2dc91..04ca4fa21 100644 --- a/docs/src/pages/zh-TW/getting-started.md +++ b/docs/src/pages/zh-TW/getting-started.md @@ -8,7 +8,7 @@ Astro 是利用現代技術的靜態網站生成工具。可以從[首頁](https 在找 Astro 的簡易概要?[請看首頁](https://astro.build)。 -## 試用 Astro +## 試玩 Astro 試用 Astro 最簡單的方法,就是在機器的新資料夾裡執行 `npm init astro`。我們製作的 CLI 精靈會協助開啟全新的 Astro 專案。 @@ -16,11 +16,24 @@ Astro 是利用現代技術的靜態網站生成工具。可以從[首頁](https 或者,閱讀[安裝指南](/installation),有安裝 Astro 的完整流程。 -### 線上玩玩看 +### 示範專案 + +比較喜歡從範例來學 Astro 的話,請看放在 Github 的[範例資源庫](https://github.com/snowpackjs/astro/tree/main/examples)。 + +這裡的範例都可以在本地端機器執行 `npm init astro` 並加上 CLI Flag: `--template`。 +`--template` Flag 也支援第三方、社群的範本。 -有興趣在瀏覽器試玩 Astro 嗎?有線上的程式碼試玩區。試試看放在 [CodeSandbox](https://codesandbox.io/s/astro-template-hugb3) 的「Hello! World」範本。 +```bash +# 執行 init 精靈,並使用官方範本 +npm init astro -- --template [OFFICIAL_EXAMPLE_NAME] +# 執行 init 精靈,並使用社群範本 +npm init astro -- --template [GITHUB_USER]/[REPO_NAME] +npm init astro -- --template [GITHUB_USER]/[REPO_NAME]/path/to/example +``` + +### 線上玩玩看 -註:有些功能(例如:快速重新整理)目前在 CodeSandbox 的效果有限。 +有興趣在瀏覽器試玩 Astro 的話,可以在 Stackblitz、CodeSandbox、Gitpod 或 GitHub Codespaces 使用線上程式碼編輯器。點選[範例資源庫](https://github.com/snowpackjs/astro/tree/main/examples)裡任一個範例的 "Open in Stackblitz" 連結。或者,[點此](https://stackblitz.com/fork/astro)在 Stackblitz 開啟新專案。 ## 學習 Astro |