跳至正文
版本:bleeding-edge 🩸

🤝 为文档做出贡献

你好 Dyno!你好 Markdown!

本文档基于 Docusaurus 平台制作,并使用 Markdown 编写!请随时在 GitHub 上提出修改建议和编辑页面,这些帮助对我们至关重要,我们衷心感谢每一位参与文档编写的人!

提出修改建议​

你可以直接在 GitHub 上提出修改建议,只需点击每个页面左下角的 编辑此页面 按钮,提出你的建议并为此开启一个拉取请求即可!一旦被接受,你的建议将立即应用到文档的 bleeding-edge 版本中!

Running the Docs Locally​

To preview your changes before opening a Pull Request, clone the docs repository with its submodules (the API is a submodule) and run it with Node.js and Yarn:

Terminal
git clone --recurse-submodules https://github.com/nanos-world/docs.git
cd docs
yarn install
yarn start

The docs will open at http://localhost:3000 and reload as you edit the files.

Where to Edit​

  • docs/ is the bleeding-edge version of the docs, which matches the latest game updates. Most changes should be made here.
  • versioned_docs/version-latest/ is the stable version. Only edit it to fix something that is also wrong in the current stable game version.
  • blog/ contains the news posts.
  • src/api/ is a submodule with the API JSON files (see below).

Writing Tips​

  • Every heading ends with an explicit anchor, like ## My Heading {/* #my-heading */}, so links keep working in translated pages. Run yarn write-heading-ids to generate them.
  • Link to other pages using their file path, e.g. [Packages Guide](/core-concepts/packages/packages-guide.mdx).
  • Use the built-in components to reference the API, such as <Classes.Character />, <StaticClasses.Server />, <MethodReference type="Class" class_name="Actor" method_name="SetLocation" /> and <EventReference type="Class" class_name="Character" event="Death" />.
  • Add the side in the title of Lua code blocks (e.g. ```lua title="Server/Index.lua"), it helps readers to know where the code runs.

API 参考​

我们的文档非常智能!脚本参考部分是基于我们在 GitHub 上的 JSON API 仓库自动生成的。我们已将所有的类、方法和事件定义为 JSON 格式,它可以被解析为任何格式!

因此,如果你想对在那里发现的任何描述或拼写错误提出修改建议,请参考我们 API 仓库的对应文件夹:Classes、StaticClasses、Structs、UtilityClasses、StandardLibraries 或 Enums!

翻译的页面​

默认情况下,GitHub 上的所有页面均为英文,所有翻译均由 Crowdin 提供。你可以访问 nanos world 官方文档 Crowdin 页面,帮助我们完成所有可用语言的翻译!你也可以申请支持更多语言!如果你想协助翻译一种新的语言,请联系我们!

Crowdin