• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

vapor/docs:

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称(OpenSource Name):

vapor/docs

开源软件地址(OpenSource Url):

https://github.com/vapor/docs

开源编程语言(OpenSource Language):

Swift 49.8%

开源软件介绍(OpenSource Introduction):

Documentation

Read the docs at docs.vapor.codes

Start with Docker

  • Prerequisite for this setup, you must have docker and docker compose installed on the system
  1. first clone the repo

  2. then run

docker compose up 
  1. then open from the browser on the port 8000 e.g.
http://127.0.1.1:8000

Contributing

If you want to add information to the docs or have found any mistakes you wish to fix, feel free to create a PR for the change.

Translating


Localised docs are incredibly useful for allowing people to learn Vapor in their native language. If you wish to contribute to the Vapor documentation by translating, follow the steps below.

You'll need Python3 to build the docs. You can download this from the Python Website or install via Homebrew. Once installed, run pip install -r requirements.txt in the root directory of this repository. This will install all the needed dependencies in order to be able to build the documentation.

Following the installation of the dependencies, check if your language you want to translate to is already included in the mkdocs.yml file. If it is not, then you can add it like this:

languages:
  # Structure
  <language iso code>:
    name: <The name of the language>
    site_name: <The translated site name>
    build: true # Whether the documentation gets build or not. You can disable this if you don't want to build your language or want to temporarily disable other languages

  # Example
  nl:
    name: Nederlands
    site_name: Vapor Documentatie
    build: true

NOTE: The language code you have to add must conform to the ISO 639-1 Standard. More information can be found here.

If there are navigation components that have to be translated, then you can add them under nav_translations in the mkdocs file. This is done by specifying a keyword defined in the nav: section of the mkdocs.yml file and then adding the translation. An example can be found below of how to add those:

nav_translations:
  # Structure
  <language code>:
    <keyword>: <translation>

  # Example
  nl:
    Welcome: Welkom
    Install: Installeren

Copy the markdown file you would like to translate and name it <original name file>.<language code>.md. For example:

- index.md <- the original english documentation
- index.nl.md <- the dutch translation of the english documentation file

You can check it out by running mkdocs serve in the terminal. Once you are satisfied with your translations, feel free to create a PR. Don't forget to turn the build flag to true for all languages!

NOTE: If a file isn't translated, it will just default to the default language file. So you don't have to translate everything all at once.




鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap