本项目由 SwiftGG 翻译组负责翻译维护。
Swift.org 网站的目标包括:
- 欢迎对 Swift 编程语言感兴趣的人。
- 与 Swift 用户社区和潜在用户分享知识,包括尽可能简单的 Swift 入门指南、用户指南、最佳实践、API 文档和功能公告。
- 与 Swift 贡献者社区和潜在贡献者分享知识,包括贡献指南、辅助贡献的技术细节、项目治理和法律信息。
- 突出展示社区驱动的计划和技术工作,这些工作适用于 Swift 在其所有或部分核心使用领域的用户。
有关 Swift.org 网站目标、内容治理和贡献指南的更多信息,请参阅网站概述。
Swift.org 使用 Jekyll,这是一个用 Ruby 编写的支持博客的静态站点生成器。
要求:
要在本地运行网站,请在终端窗口中输入以下命令:
git clone https://github.com/swiftlang/swift-org-website.git
cd swift-org-website
bundle install
LC_ALL=en_us.UTF-8 bundle exec jekyll serve --config _config.yml,_config_dev.yml
open "http://localhost:4000"
If you’d like to contribute to this project, please run Prettier before submitting your pull request to ensure consistent code style across the project.
Requirements
- [Node v18.17.1 or higher](https://nodejs.org)
```shell
npm install
npm run prettify
首先使用 Docker Compose 构建站点:
docker compose run build
然后你可以运行站点:
docker compose up website
网站将在 http://localhost:4000
上可用