导航

v2.1.0
网站页面

文档页

并排呈现站点导航、行宽适合阅读的文章和页内目录。

文档页分为三栏:全站导航、保持适读行宽的文章,以及本页目录。它采用带页眉和补充区域的应用框架。可用宽度缩小时,目录先隐藏,导航随后移出侧边栏,文章始终保持适读行宽。

指南、参考文档、手册,或任何需要把目录放在旁边的长文章,都适合使用文档页。周围没有导航的文章或博客文章,则使用内含出栏布局的页面框架。

文档

<div class="shell bg-surface-base fg-text-body text-sm" style="--shell-sidebar: 15rem">  <a class="skip" href="#docs-main">Skip to content</a>  <header class="navbar shell-header bb(1) bb-solid b-line-hair" style="--navbar-padding-x: 1.25rem">    <button type="button" class="btn btn-quiet btn-square btn-sm shell-toggle" commandfor="docs-nav" command="show-modal" aria-label="Open navigation">      <svg class="icon" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">        <path d="M3 5.5L13 5.5" /><path d="M3 10.5L13 10.5" />      </svg>    </button>    <a class="navbar-brand" href="#">      <svg class="icon" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">        <circle cx="8" cy="8" r="6" /><path d="M8 4.3333A3.6667 3.6667 0 0 1 8 11.6667Z" fill="currentColor" stroke="none" />      </svg>Atlas    </a>    <div class="navbar-end">      <label class="input-group input-group-sm w(220) hidden flex@container(--xl)">        <svg class="icon" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">          <circle cx="7" cy="7" r="4.5" /><path d="M10.182 10.182L14 14" />        </svg>        <input class="input-group-field" type="search" placeholder="Search the docs" aria-label="Search the docs">        <kbd class="kbd">/</kbd>      </label>      <a class="btn btn-sm" href="#">Dashboard</a>    </div>  </header>  <div class="shell-sidebar p-sm bxe(1) bxe-solid b-line-hair">    <nav class="nav" aria-label="Documentation">      <div class="nav-label">Getting started</div>      <a class="nav-item" href="#">Introduction</a>      <a class="nav-item" href="#" aria-current="page">Installation</a>      <a class="nav-item" href="#">Theme</a>      <div class="nav-label">Deploy</div>      <a class="nav-item" href="#">Build settings</a>      <a class="nav-item" href="#">Environment variables</a>      <a class="nav-item" href="#">Domains</a>      <a class="nav-item" href="#">Regions</a>      <div class="nav-label">Reference</div>      <a class="nav-item" href="#">Command line</a>      <a class="nav-item" href="#">Configuration file</a>      <a class="nav-item" href="#">Limits</a>    </nav>  </div>  <main class="shell-main" id="docs-main" tabindex="-1">    <article class="flex flex-col gap-xl max-w(720) mx-auto px(20) py-xl">      <header class="flex flex-col gap-sm">        <nav aria-label="Breadcrumb">          <ol class="breadcrumb">            <li class="breadcrumb-item"><a class="breadcrumb-link" href="#">Docs</a></li>            <li class="breadcrumb-item"><a class="breadcrumb-link" href="#">Getting started</a></li>            <li class="breadcrumb-item">              <a class="breadcrumb-link" href="#" aria-current="page">Installation</a>            </li>          </ol>        </nav>        <h1 class="heading heading-2xl">Installation</h1>        <p class="lead">          Install the command line, link a folder to a project, and deploy it. It takes about two minutes.        </p>      </header>      <section class="flex flex-col gap-sm">        <h2 class="heading heading-lg flash" id="docs-requirements">Requirements</h2>        <p class="m(0) leading-md">          Atlas runs on any machine with Node 22 or later. The command line talks to the same API as the dashboard, so anything you can click you can also script.        </p>        <p class="m(0) leading-md">          You need an account and a project. Both are free to create, and neither asks for a card.        </p>      </section>      <section class="flex flex-col gap-sm">        <h2 class="heading heading-lg flash" id="docs-install">Install the command line</h2>        <p class="m(0) leading-md">          Install it globally, or run it without installing through your package manager. The second way always uses the latest release.        </p>        <p class="m(0) leading-md">          After the first run it asks you to sign in. The token is stored in your home directory and can be revoked from the dashboard.        </p>      </section>      <section class="flex flex-col gap-sm">        <h2 class="heading heading-lg flash" id="docs-link">Link a project</h2>        <p class="m(0) leading-md">          Run the link command in the folder of your app. It finds the framework, writes a small configuration file and connects the folder to a project.        </p>        <p class="m(0) leading-md">          Commit the configuration file. Everyone on the team then deploys the same way.        </p>      </section>      <section class="flex flex-col gap-sm">        <h2 class="heading heading-lg flash" id="docs-deploy">Deploy</h2>        <p class="m(0) leading-md">          Every push to a branch makes a preview with its own address. A push to the main branch goes to production.        </p>        <p class="m(0) leading-md">          A deployment is immutable. Rolling back is choosing an earlier one, and takes a few seconds.        </p>      </section>      <nav class="pager" aria-label="Guide pages">        <a class="pager-link" rel="prev" href="#">          <span class="pager-label">            <svg class="icon" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">              <path d="M13.6362 7.5189A0.4947 0.4947 0 0 0 13.5 7.5L2.4755 7.5006A0.5 0.5 0 0 0 2.4266 8.4946L2.5 8.5H13.5A0.4947 0.4947 0 0 0 13.6362 8.4811A0.7009 0.7009 0 0 0 13.6362 7.5189Z" fill="currentColor" stroke="none" fill-rule="evenodd" transform="rotate(180 8 8)" /><path d="M8 4.5L13.2348 7.8313A0.2 0.2 0 0 1 13.2348 8.1687L8 11.5" transform="rotate(180 8 8)" />            </svg>Previous          </span><span class="pager-title">Introduction</span>        </a>        <a class="pager-link" rel="next" href="#">          <span class="pager-label">            Next<svg class="icon" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">              <path d="M13.6362 7.5189A0.4947 0.4947 0 0 0 13.5 7.5L2.4755 7.5006A0.5 0.5 0 0 0 2.4266 8.4946L2.5 8.5H13.5A0.4947 0.4947 0 0 0 13.6362 8.4811A0.7009 0.7009 0 0 0 13.6362 7.5189Z" fill="currentColor" stroke="none" fill-rule="evenodd" /><path d="M8 4.5L13.2348 7.8313A0.2 0.2 0 0 1 13.2348 8.1687L8 11.5" />            </svg>          </span><span class="pager-title">Theme</span>        </a>      </nav>    </article>  </main>  <div class="shell-aside py-xl pxe-lg">    <nav class="toc" aria-label="On this page">      <p class="toc-title">On this page</p>      <ul class="toc-list">        <li><a class="toc-link" href="#docs-requirements">Requirements</a></li>        <li><a class="toc-link" href="#docs-install">Install the command line</a></li>        <li><a class="toc-link" href="#docs-link">Link a project</a></li>        <li><a class="toc-link" href="#docs-deploy">Deploy</a></li>      </ul>    </nav>  </div>  <dialog class="dialog dialog-drawer dialog-drawer-start" id="docs-nav" closedby="any" aria-label="Navigation">    <div class="dialog-body flex flex-col gap-md">      <a class="navbar-brand h(40) px-xs" href="#">        <svg class="icon" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">          <circle cx="8" cy="8" r="6" /><path d="M8 4.3333A3.6667 3.6667 0 0 1 8 11.6667Z" fill="currentColor" stroke="none" />        </svg>Atlas      </a>      <label class="input-group input-group-sm">        <svg class="icon" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">          <circle cx="7" cy="7" r="4.5" /><path d="M10.182 10.182L14 14" />        </svg>        <input class="input-group-field" type="search" placeholder="Search the docs" aria-label="Search the docs">      </label>      <nav class="nav" aria-label="Documentation, in the drawer">        <div class="nav-label">Getting started</div>        <a class="nav-item" href="#">Introduction</a>        <a class="nav-item" href="#" aria-current="page">Installation</a>        <a class="nav-item" href="#">Theme</a>        <div class="nav-label">Deploy</div>        <a class="nav-item" href="#">Build settings</a>        <a class="nav-item" href="#">Environment variables</a>        <a class="nav-item" href="#">Domains</a>        <a class="nav-item" href="#">Regions</a>        <div class="nav-label">Reference</div>        <a class="nav-item" href="#">Command line</a>        <a class="nav-item" href="#">Configuration file</a>        <a class="nav-item" href="#">Limits</a>      </nav>    </div>    <button type="button" class="btn btn-quiet btn-square btn-sm dialog-close" commandfor="docs-nav" command="close" aria-label="Close navigation">      <svg class="icon" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">        <path d="M4 4L12 12" /><path d="M4 12L12 4" />      </svg>    </button>  </dialog></div>
import MenuIcon from '@master/icons-react/native/16/soft/menu'import ContrastIcon from '@master/icons-react/native/16/soft/contrast'import SearchIcon from '@master/icons-react/native/16/soft/search'import ArrowLeftIcon from '@master/icons-react/native/16/soft/arrow-left'import ArrowRightIcon from '@master/icons-react/native/16/soft/arrow-right'import XIcon from '@master/icons-react/native/16/soft/x'<div className="shell bg-surface-base fg-text-body text-sm" style={{ '--shell-sidebar': '15rem' } as React.CSSProperties}>  <a className="skip" href="#docs-main">Skip to content</a>  <header className="navbar shell-header bb(1) bb-solid b-line-hair" style={{ '--navbar-padding-x': '1.25rem' } as React.CSSProperties}>    <button type="button" className="btn btn-quiet btn-square btn-sm shell-toggle" {...{ commandfor: 'docs-nav', command: 'show-modal' }} aria-label="Open navigation">      <MenuIcon className="icon" />    </button>    <a className="navbar-brand" href="#"><ContrastIcon className="icon" />Atlas</a>    <div className="navbar-end">      <label className="input-group input-group-sm w(220) hidden flex@container(--xl)">        <SearchIcon className="icon" />        <input className="input-group-field" type="search" placeholder="Search the docs" aria-label="Search the docs" />        <kbd className="kbd">/</kbd>      </label>      <a className="btn btn-sm" href="#">Dashboard</a>    </div>  </header>  <div className="shell-sidebar p-sm bxe(1) bxe-solid b-line-hair">    <nav className="nav" aria-label="Documentation">      <div className="nav-label">Getting started</div>      <a className="nav-item" href="#">Introduction</a>      <a className="nav-item" href="#" aria-current="page">Installation</a>      <a className="nav-item" href="#">Theme</a>      <div className="nav-label">Deploy</div>      <a className="nav-item" href="#">Build settings</a>      <a className="nav-item" href="#">Environment variables</a>      <a className="nav-item" href="#">Domains</a>      <a className="nav-item" href="#">Regions</a>      <div className="nav-label">Reference</div>      <a className="nav-item" href="#">Command line</a>      <a className="nav-item" href="#">Configuration file</a>      <a className="nav-item" href="#">Limits</a>    </nav>  </div>  <main className="shell-main" id="docs-main" tabIndex={-1}>    <article className="flex flex-col gap-xl max-w(720) mx-auto px(20) py-xl">      <header className="flex flex-col gap-sm">        <nav aria-label="Breadcrumb">          <ol className="breadcrumb">            <li className="breadcrumb-item"><a className="breadcrumb-link" href="#">Docs</a></li>            <li className="breadcrumb-item">              <a className="breadcrumb-link" href="#">Getting started</a>            </li>            <li className="breadcrumb-item">              <a className="breadcrumb-link" href="#" aria-current="page">Installation</a>            </li>          </ol>        </nav>        <h1 className="heading heading-2xl">Installation</h1>        <p className="lead">          Install the command line, link a folder to a project, and deploy it. It takes about two minutes.        </p>      </header>      <section className="flex flex-col gap-sm">        <h2 className="heading heading-lg flash" id="docs-requirements">Requirements</h2>        <p className="m(0) leading-md">          Atlas runs on any machine with Node 22 or later. The command line talks to the same API as the dashboard, so anything you can click you can also script.        </p>        <p className="m(0) leading-md">          You need an account and a project. Both are free to create, and neither asks for a card.        </p>      </section>      <section className="flex flex-col gap-sm">        <h2 className="heading heading-lg flash" id="docs-install">Install the command line</h2>        <p className="m(0) leading-md">          Install it globally, or run it without installing through your package manager. The second way always uses the latest release.        </p>        <p className="m(0) leading-md">          After the first run it asks you to sign in. The token is stored in your home directory and can be revoked from the dashboard.        </p>      </section>      <section className="flex flex-col gap-sm">        <h2 className="heading heading-lg flash" id="docs-link">Link a project</h2>        <p className="m(0) leading-md">          Run the link command in the folder of your app. It finds the framework, writes a small configuration file and connects the folder to a project.        </p>        <p className="m(0) leading-md">          Commit the configuration file. Everyone on the team then deploys the same way.        </p>      </section>      <section className="flex flex-col gap-sm">        <h2 className="heading heading-lg flash" id="docs-deploy">Deploy</h2>        <p className="m(0) leading-md">          Every push to a branch makes a preview with its own address. A push to the main branch goes to production.        </p>        <p className="m(0) leading-md">          A deployment is immutable. Rolling back is choosing an earlier one, and takes a few seconds.        </p>      </section>      <nav className="pager" aria-label="Guide pages">        <a className="pager-link" rel="prev" href="#">          <span className="pager-label"><ArrowLeftIcon className="icon" />Previous</span><span className="pager-title">Introduction</span>        </a>        <a className="pager-link" rel="next" href="#">          <span className="pager-label">Next<ArrowRightIcon className="icon" /></span><span className="pager-title">Theme</span>        </a>      </nav>    </article>  </main>  <div className="shell-aside py-xl pxe-lg">    <nav className="toc" aria-label="On this page">      <p className="toc-title">On this page</p>      <ul className="toc-list">        <li><a className="toc-link" href="#docs-requirements">Requirements</a></li>        <li><a className="toc-link" href="#docs-install">Install the command line</a></li>        <li><a className="toc-link" href="#docs-link">Link a project</a></li>        <li><a className="toc-link" href="#docs-deploy">Deploy</a></li>      </ul>    </nav>  </div>  <dialog className="dialog dialog-drawer dialog-drawer-start" id="docs-nav" closedby="any" aria-label="Navigation">    <div className="dialog-body flex flex-col gap-md">      <a className="navbar-brand h(40) px-xs" href="#"><ContrastIcon className="icon" />Atlas</a>      <label className="input-group input-group-sm">        <SearchIcon className="icon" />        <input className="input-group-field" type="search" placeholder="Search the docs" aria-label="Search the docs" />      </label>      <nav className="nav" aria-label="Documentation, in the drawer">        <div className="nav-label">Getting started</div>        <a className="nav-item" href="#">Introduction</a>        <a className="nav-item" href="#" aria-current="page">Installation</a>        <a className="nav-item" href="#">Theme</a>        <div className="nav-label">Deploy</div>        <a className="nav-item" href="#">Build settings</a>        <a className="nav-item" href="#">Environment variables</a>        <a className="nav-item" href="#">Domains</a>        <a className="nav-item" href="#">Regions</a>        <div className="nav-label">Reference</div>        <a className="nav-item" href="#">Command line</a>        <a className="nav-item" href="#">Configuration file</a>        <a className="nav-item" href="#">Limits</a>      </nav>    </div>    <button type="button" className="btn btn-quiet btn-square btn-sm dialog-close" {...{ commandfor: 'docs-nav', command: 'close' }} aria-label="Close navigation">      <XIcon className="icon" />    </button>  </dialog></div>
<script>  import MenuIcon from '@master/icons-svelte/native/16/soft/menu'  import ContrastIcon from '@master/icons-svelte/native/16/soft/contrast'  import SearchIcon from '@master/icons-svelte/native/16/soft/search'  import ArrowLeftIcon from '@master/icons-svelte/native/16/soft/arrow-left'  import ArrowRightIcon from '@master/icons-svelte/native/16/soft/arrow-right'  import XIcon from '@master/icons-svelte/native/16/soft/x'</script><div class="shell bg-surface-base fg-text-body text-sm" style="--shell-sidebar: 15rem">  <a class="skip" href="#docs-main">Skip to content</a>  <header class="navbar shell-header bb(1) bb-solid b-line-hair" style="--navbar-padding-x: 1.25rem">    <button type="button" class="btn btn-quiet btn-square btn-sm shell-toggle" commandfor="docs-nav" command="show-modal" aria-label="Open navigation">      <MenuIcon class="icon" />    </button>    <a class="navbar-brand" href="#"><ContrastIcon class="icon" />Atlas</a>    <div class="navbar-end">      <label class="input-group input-group-sm w(220) hidden flex@container(--xl)">        <SearchIcon class="icon" />        <input class="input-group-field" type="search" placeholder="Search the docs" aria-label="Search the docs">        <kbd class="kbd">/</kbd>      </label>      <a class="btn btn-sm" href="#">Dashboard</a>    </div>  </header>  <div class="shell-sidebar p-sm bxe(1) bxe-solid b-line-hair">    <nav class="nav" aria-label="Documentation">      <div class="nav-label">Getting started</div>      <a class="nav-item" href="#">Introduction</a>      <a class="nav-item" href="#" aria-current="page">Installation</a>      <a class="nav-item" href="#">Theme</a>      <div class="nav-label">Deploy</div>      <a class="nav-item" href="#">Build settings</a>      <a class="nav-item" href="#">Environment variables</a>      <a class="nav-item" href="#">Domains</a>      <a class="nav-item" href="#">Regions</a>      <div class="nav-label">Reference</div>      <a class="nav-item" href="#">Command line</a>      <a class="nav-item" href="#">Configuration file</a>      <a class="nav-item" href="#">Limits</a>    </nav>  </div>  <main class="shell-main" id="docs-main" tabindex="-1">    <article class="flex flex-col gap-xl max-w(720) mx-auto px(20) py-xl">      <header class="flex flex-col gap-sm">        <nav aria-label="Breadcrumb">          <ol class="breadcrumb">            <li class="breadcrumb-item"><a class="breadcrumb-link" href="#">Docs</a></li>            <li class="breadcrumb-item"><a class="breadcrumb-link" href="#">Getting started</a></li>            <li class="breadcrumb-item">              <a class="breadcrumb-link" href="#" aria-current="page">Installation</a>            </li>          </ol>        </nav>        <h1 class="heading heading-2xl">Installation</h1>        <p class="lead">          Install the command line, link a folder to a project, and deploy it. It takes about two minutes.        </p>      </header>      <section class="flex flex-col gap-sm">        <h2 class="heading heading-lg flash" id="docs-requirements">Requirements</h2>        <p class="m(0) leading-md">          Atlas runs on any machine with Node 22 or later. The command line talks to the same API as the dashboard, so anything you can click you can also script.        </p>        <p class="m(0) leading-md">          You need an account and a project. Both are free to create, and neither asks for a card.        </p>      </section>      <section class="flex flex-col gap-sm">        <h2 class="heading heading-lg flash" id="docs-install">Install the command line</h2>        <p class="m(0) leading-md">          Install it globally, or run it without installing through your package manager. The second way always uses the latest release.        </p>        <p class="m(0) leading-md">          After the first run it asks you to sign in. The token is stored in your home directory and can be revoked from the dashboard.        </p>      </section>      <section class="flex flex-col gap-sm">        <h2 class="heading heading-lg flash" id="docs-link">Link a project</h2>        <p class="m(0) leading-md">          Run the link command in the folder of your app. It finds the framework, writes a small configuration file and connects the folder to a project.        </p>        <p class="m(0) leading-md">          Commit the configuration file. Everyone on the team then deploys the same way.        </p>      </section>      <section class="flex flex-col gap-sm">        <h2 class="heading heading-lg flash" id="docs-deploy">Deploy</h2>        <p class="m(0) leading-md">          Every push to a branch makes a preview with its own address. A push to the main branch goes to production.        </p>        <p class="m(0) leading-md">          A deployment is immutable. Rolling back is choosing an earlier one, and takes a few seconds.        </p>      </section>      <nav class="pager" aria-label="Guide pages">        <a class="pager-link" rel="prev" href="#">          <span class="pager-label"><ArrowLeftIcon class="icon" />Previous</span><span class="pager-title">Introduction</span>        </a>        <a class="pager-link" rel="next" href="#">          <span class="pager-label">Next<ArrowRightIcon class="icon" /></span><span class="pager-title">Theme</span>        </a>      </nav>    </article>  </main>  <div class="shell-aside py-xl pxe-lg">    <nav class="toc" aria-label="On this page">      <p class="toc-title">On this page</p>      <ul class="toc-list">        <li><a class="toc-link" href="#docs-requirements">Requirements</a></li>        <li><a class="toc-link" href="#docs-install">Install the command line</a></li>        <li><a class="toc-link" href="#docs-link">Link a project</a></li>        <li><a class="toc-link" href="#docs-deploy">Deploy</a></li>      </ul>    </nav>  </div>  <dialog class="dialog dialog-drawer dialog-drawer-start" id="docs-nav" closedby="any" aria-label="Navigation">    <div class="dialog-body flex flex-col gap-md">      <a class="navbar-brand h(40) px-xs" href="#"><ContrastIcon class="icon" />Atlas</a>      <label class="input-group input-group-sm">        <SearchIcon class="icon" />        <input class="input-group-field" type="search" placeholder="Search the docs" aria-label="Search the docs">      </label>      <nav class="nav" aria-label="Documentation, in the drawer">        <div class="nav-label">Getting started</div>        <a class="nav-item" href="#">Introduction</a>        <a class="nav-item" href="#" aria-current="page">Installation</a>        <a class="nav-item" href="#">Theme</a>        <div class="nav-label">Deploy</div>        <a class="nav-item" href="#">Build settings</a>        <a class="nav-item" href="#">Environment variables</a>        <a class="nav-item" href="#">Domains</a>        <a class="nav-item" href="#">Regions</a>        <div class="nav-label">Reference</div>        <a class="nav-item" href="#">Command line</a>        <a class="nav-item" href="#">Configuration file</a>        <a class="nav-item" href="#">Limits</a>      </nav>    </div>    <button type="button" class="btn btn-quiet btn-square btn-sm dialog-close" commandfor="docs-nav" command="close" aria-label="Close navigation">      <XIcon class="icon" />    </button>  </dialog></div>
<script setup>import MenuIcon from '@master/icons-vue/native/16/soft/menu'import ContrastIcon from '@master/icons-vue/native/16/soft/contrast'import SearchIcon from '@master/icons-vue/native/16/soft/search'import ArrowLeftIcon from '@master/icons-vue/native/16/soft/arrow-left'import ArrowRightIcon from '@master/icons-vue/native/16/soft/arrow-right'import XIcon from '@master/icons-vue/native/16/soft/x'</script><template>  <div class="shell bg-surface-base fg-text-body text-sm" style="--shell-sidebar: 15rem">    <a class="skip" href="#docs-main">Skip to content</a>    <header class="navbar shell-header bb(1) bb-solid b-line-hair" style="--navbar-padding-x: 1.25rem">      <button type="button" class="btn btn-quiet btn-square btn-sm shell-toggle" commandfor="docs-nav" command="show-modal" aria-label="Open navigation">        <MenuIcon class="icon" />      </button>      <a class="navbar-brand" href="#"><ContrastIcon class="icon" />Atlas</a>      <div class="navbar-end">        <label class="input-group input-group-sm w(220) hidden flex@container(--xl)">          <SearchIcon class="icon" />          <input class="input-group-field" type="search" placeholder="Search the docs" aria-label="Search the docs">          <kbd class="kbd">/</kbd>        </label>        <a class="btn btn-sm" href="#">Dashboard</a>      </div>    </header>    <div class="shell-sidebar p-sm bxe(1) bxe-solid b-line-hair">      <nav class="nav" aria-label="Documentation">        <div class="nav-label">Getting started</div>        <a class="nav-item" href="#">Introduction</a>        <a class="nav-item" href="#" aria-current="page">Installation</a>        <a class="nav-item" href="#">Theme</a>        <div class="nav-label">Deploy</div>        <a class="nav-item" href="#">Build settings</a>        <a class="nav-item" href="#">Environment variables</a>        <a class="nav-item" href="#">Domains</a>        <a class="nav-item" href="#">Regions</a>        <div class="nav-label">Reference</div>        <a class="nav-item" href="#">Command line</a>        <a class="nav-item" href="#">Configuration file</a>        <a class="nav-item" href="#">Limits</a>      </nav>    </div>    <main class="shell-main" id="docs-main" tabindex="-1">      <article class="flex flex-col gap-xl max-w(720) mx-auto px(20) py-xl">        <header class="flex flex-col gap-sm">          <nav aria-label="Breadcrumb">            <ol class="breadcrumb">              <li class="breadcrumb-item"><a class="breadcrumb-link" href="#">Docs</a></li>              <li class="breadcrumb-item">                <a class="breadcrumb-link" href="#">Getting started</a>              </li>              <li class="breadcrumb-item">                <a class="breadcrumb-link" href="#" aria-current="page">Installation</a>              </li>            </ol>          </nav>          <h1 class="heading heading-2xl">Installation</h1>          <p class="lead">            Install the command line, link a folder to a project, and deploy it. It takes about two minutes.          </p>        </header>        <section class="flex flex-col gap-sm">          <h2 class="heading heading-lg flash" id="docs-requirements">Requirements</h2>          <p class="m(0) leading-md">            Atlas runs on any machine with Node 22 or later. The command line talks to the same API as the dashboard, so anything you can click you can also script.          </p>          <p class="m(0) leading-md">            You need an account and a project. Both are free to create, and neither asks for a card.          </p>        </section>        <section class="flex flex-col gap-sm">          <h2 class="heading heading-lg flash" id="docs-install">Install the command line</h2>          <p class="m(0) leading-md">            Install it globally, or run it without installing through your package manager. The second way always uses the latest release.          </p>          <p class="m(0) leading-md">            After the first run it asks you to sign in. The token is stored in your home directory and can be revoked from the dashboard.          </p>        </section>        <section class="flex flex-col gap-sm">          <h2 class="heading heading-lg flash" id="docs-link">Link a project</h2>          <p class="m(0) leading-md">            Run the link command in the folder of your app. It finds the framework, writes a small configuration file and connects the folder to a project.          </p>          <p class="m(0) leading-md">            Commit the configuration file. Everyone on the team then deploys the same way.          </p>        </section>        <section class="flex flex-col gap-sm">          <h2 class="heading heading-lg flash" id="docs-deploy">Deploy</h2>          <p class="m(0) leading-md">            Every push to a branch makes a preview with its own address. A push to the main branch goes to production.          </p>          <p class="m(0) leading-md">            A deployment is immutable. Rolling back is choosing an earlier one, and takes a few seconds.          </p>        </section>        <nav class="pager" aria-label="Guide pages">          <a class="pager-link" rel="prev" href="#">            <span class="pager-label"><ArrowLeftIcon class="icon" />Previous</span><span class="pager-title">Introduction</span>          </a>          <a class="pager-link" rel="next" href="#">            <span class="pager-label">Next<ArrowRightIcon class="icon" /></span><span class="pager-title">Theme</span>          </a>        </nav>      </article>    </main>    <div class="shell-aside py-xl pxe-lg">      <nav class="toc" aria-label="On this page">        <p class="toc-title">On this page</p>        <ul class="toc-list">          <li><a class="toc-link" href="#docs-requirements">Requirements</a></li>          <li><a class="toc-link" href="#docs-install">Install the command line</a></li>          <li><a class="toc-link" href="#docs-link">Link a project</a></li>          <li><a class="toc-link" href="#docs-deploy">Deploy</a></li>        </ul>      </nav>    </div>    <dialog class="dialog dialog-drawer dialog-drawer-start" id="docs-nav" closedby="any" aria-label="Navigation">      <div class="dialog-body flex flex-col gap-md">        <a class="navbar-brand h(40) px-xs" href="#"><ContrastIcon class="icon" />Atlas</a>        <label class="input-group input-group-sm">          <SearchIcon class="icon" />          <input class="input-group-field" type="search" placeholder="Search the docs" aria-label="Search the docs">        </label>        <nav class="nav" aria-label="Documentation, in the drawer">          <div class="nav-label">Getting started</div>          <a class="nav-item" href="#">Introduction</a>          <a class="nav-item" href="#" aria-current="page">Installation</a>          <a class="nav-item" href="#">Theme</a>          <div class="nav-label">Deploy</div>          <a class="nav-item" href="#">Build settings</a>          <a class="nav-item" href="#">Environment variables</a>          <a class="nav-item" href="#">Domains</a>          <a class="nav-item" href="#">Regions</a>          <div class="nav-label">Reference</div>          <a class="nav-item" href="#">Command line</a>          <a class="nav-item" href="#">Configuration file</a>          <a class="nav-item" href="#">Limits</a>        </nav>      </div>      <button type="button" class="btn btn-quiet btn-square btn-sm dialog-close" commandfor="docs-nav" command="close" aria-label="Close navigation">        <XIcon class="icon" />      </button>    </dialog>  </div></template>
滚动页面时,两侧边栏保持在原位,目录会标记当前视口中的章节。在平板尺寸下,目录隐藏;在手机尺寸下,导航移入抽屉。

#页面结构

区域类名内容
页眉navbar shell-header品牌标识、搜索框和产品入口
侧边栏shell-sidebar一个导航组件,每组上方各有一个 nav-label
主内容区shell-main一个使用 max-w(720) mx-auto 限制最大宽度并水平居中的 <article>
补充区域shell-aside本页目录
  • 文章设定阅读行宽。 720px 的行宽约能容纳 75 个正文字符,接近舒适阅读的行宽上限。文章所在的中间栏占据剩余空间,使文章始终在两侧边栏之间居中。
  • 两侧边栏各自独立滚动。 每栏的高度等于视口中页眉下方的可用高度,因此滚动较长的导航时页面不会移动,滚动页面时导航也不会移动。
  • 目录自动标记当前章节。 浏览器支持 scroll-target-group 时,本页目录会随页面滚动更新标记;其他情况下,通过脚本设置 aria-current。
  • 标题跳转时会避开页眉。 每个标题都使用 flash:通过链接跳转时,标题停在视口顶部下方 5rem 处,避开粘性栏,并用一圈轮廓标出跳转目标。
  • 文章末尾提供继续浏览的入口。 前后页导航显示上一页和下一页的标题。

搜索框通过 hidden flex@container(--xl) 隐藏。导航栏是尺寸容器,宽度达到 36rem 时,搜索框才会显示。页眉的 --navbar-padding-x 为 1.25rem,即侧边栏内边距加上导航项内边距,因此品牌与下方的导航从同一条线开始。

#无障碍

  • 四处导航各需一个标签:全站导航为“文档”,本页导航为“本页内容”,面包屑导航和前后页导航也各有自己的标签。两侧边栏都用普通元素包裹一个 <nav>,因此每侧只有一个地标。
  • 源码顺序为页眉、导航、文章、目录。按页面顺序阅读时,读者会先经过导航,再到达文章的 <h1>。因此,第一个元素是通往主内容区的跳过链接,主内容区设有 tabindex="-1"。
  • 窄屏上会隐藏目录,读者少了快速跳转的入口,但文章仍保留所有标题。
  • 搜索和导航是查找页面的两种方式。抽屉中也放了搜索框,因此在页眉搜索框隐藏的手机上,两种方式依然都在。
  • / 是单键快捷键:请提供关闭或更改按键的方式(WCAG 2.1.4),并且在焦点位于输入框时不要响应,以免输入时被带到搜索框。