3 Star 0 Fork 0

Gitee 极速下载 / sorbet

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
此仓库是为了提升国内下载速度的镜像仓库,每日同步一次。 原始仓库: https://github.com/sorbet/sorbet
克隆/下载
README.md 3.11 KB
一键复制 编辑 原始数据 按行查看 历史

Writing docs

This is the source for Sorbet's documentation site. It was scaffolded with and is currently built with Docusaurus. While some things are documented here, most of the Docusaurus user docs lives on their site.

Table of Contents

Getting started

All commands must be run from within Sorbet's top-level website/ folder.

  1. Install the dependencies:

    ❯ yarn
  2. Run the dev server (watch mode):

    ❯ yarn start
  3. Format your changes with Prettier:

    ❯ yarn prettier

    (Recommended: set up your editor to run Prettier on save.)

  4. The build should be automatically deployed when pushing to github.com. To deploy manually:

    # Build site into website/build/sorbet
    ❯ yarn build
    
    # Publish
    ❯ git checkout gh-pages
    cp -r website/build/sorbet/* .
    ❯ git add .
    ❯ git commit -m "Updated site - $(date -u +%Y-%m-%dT%H:%M:%S%z)"
    ❯ git push github.com gh-pages

Editing existing docs

External docs live in the website/docs/ folder (make sure you're not adding docs to the top-level docs/ folder, which is for Sorbet internal docs).

For more information about docs, click here.

Adding a new doc

  1. Create a new markdown doc:

    touch docs/my-new-doc.md
  2. Initialize the doc with a header, and start writing!

    ---
    id: my-new-doc
    title: My New Doc
    ---
    
    My content...

    The filename is what will be used for your doc's URL. The id is what will be used to refer to your doc in the sidebar.

  3. Add the doc to the sidebar:

    → sidebars.json

    Docusaurus allows for multiple sidebars, so we could potentially have different sidebars for different major sections of the docs. For now, we have all the docs referenced in a single sidebar.

For more information about adding new docs, click here.

Docusaurus blog

We are using Docusaurus' blog mechanism, which is basically a set of docs with release dates and which shows up in a separate section. For more information about blog posts, click here.

A note about logos

The canonical Sorbet logos are located in the ../docs/logo/ folder (i.e., at the top-level of the repo). Logos in the website's static/img/ folder are derived (usually: copied) from there.

If you make changes to the logo and want to re-generate the .ico file, install ImageMagick and then run:

convert ../docs/logo/sorbet-logo.svg -transparent white -define icon:auto-resize static/img/favicon.ico
C
1
https://gitee.com/mirrors/sorbet.git
git@gitee.com:mirrors/sorbet.git
mirrors
sorbet
sorbet
master

搜索帮助