diff options
author | 2021-08-05 00:05:00 +0800 | |
---|---|---|
committer | 2021-08-04 09:05:00 -0700 | |
commit | 2bd178d4f95e9d1a30135a774a4b21e0bd7e20be (patch) | |
tree | 51e3b8f4ac656ebd1ebb5bc8e93109ca04803a55 /docs/src/pages/zh-CN/quick-start.md | |
parent | c7aca2c9b258ed941f7089dfa3ad092be9419a76 (diff) | |
download | astro-2bd178d4f95e9d1a30135a774a4b21e0bd7e20be.tar.gz astro-2bd178d4f95e9d1a30135a774a4b21e0bd7e20be.tar.zst astro-2bd178d4f95e9d1a30135a774a4b21e0bd7e20be.zip |
docs(translate):translate getting-started.md into ZH (CN & TW) (#979)
* translate getting-started.md into ZH (CN & TW)
* fix translate the title for getting-started.md
* add zh CN & TW config in Docs
* fix config "locale"
* fix config.ts add route for CN & TW
* fix installation.md Next Steps title 's level
* translate quick-start.md &
installation.md & examples.md
into ZH (CN )
* Add lang variable to docs frontmatter
for translations
* Update docs/src/pages/zh-TW/getting-started.md
Co-authored-by: Caleb Jasik <calebjasik@jasik.xyz>
Co-authored-by: Caleb Jasik <calebjasik@jasik.xyz>
Diffstat (limited to 'docs/src/pages/zh-CN/quick-start.md')
-rw-r--r-- | docs/src/pages/zh-CN/quick-start.md | 72 |
1 files changed, 72 insertions, 0 deletions
diff --git a/docs/src/pages/zh-CN/quick-start.md b/docs/src/pages/zh-CN/quick-start.md new file mode 100644 index 000000000..8f9db1ec3 --- /dev/null +++ b/docs/src/pages/zh-CN/quick-start.md @@ -0,0 +1,72 @@ +--- +layout: ~/layouts/MainLayout.astro +title: 快速入门 +lang: zh-CN +--- + +```shell +# 环境要求:确保 Node.js 版本是 12.20.0+、14.13.1+ 或 16 及以上。 +node --version + +# 创建并进入新项目目录 +mkdir my-astro-project && cd $_ + +# 初始化项目 +npm init astro + +# 安装项目依赖 +npm install + +# 启动项目 +npm start + +# 将项目打包到 dist 文件夹下 +npm run build +``` + +如果想要知道还有哪些方法能够使用 Astro 来做开发,请阅读 [安装指南](installation)。 + +## 启动项目 + +工程目录下终端输入以下命令: + +```bash +npm start +``` + +Astro 会开启预览服务器,地址为 [http://localhost:3000](http://localhost:3000), +在浏览器打开这个网址,就会看到 Astro 的 HelloWorld 页面 + +服务器会实时监听 'src/' 目录下的文件改动,所以在开发过程的支持热更新,修改程序后,无需重启。 + +## 打包项目 + +工程目录下终端输入以下命令: + +```bash +npm run build +``` + +这将让 Astro 打包你的网站并直接保存到磁盘。你的应用程序现在已经在`dist/`目录中打包好了。 + +## 部署项目 + +Astro 生成的网站是静态的可以发布常见的托管服务商: + +- [Vercel](https://vercel.com/) +- [Netlify](https://www.netlify.com/) +- [S3 bucket](https://aws.amazon.com/s3/) +- [Google Firebase](https://firebase.google.com/) +- 查看 [部署指南](/guides/deploy) 了解更多细节 + +## 下一步 + +成功了!现在即可开始开发! + +我们建议花点时间用于熟悉 Astro 的运作方式。只要在文档中进一步探索,建议看看这些: + +📚 深入了解 Astro 的项目结构:[项目结构](/core-concepts/project-structure) + +📚 深入了解 Astro 的组件语法:[Astro 组件指南](/core-concepts/astro-components) + +📚 深入了解 Astro 根据文件路径生成路由:[路由指南](core-concepts/astro-pages) |