跳到主要內容

ARC developer documentation

Web Device

Build a static site with Web Device from AFS-native pages, content, and site configuration.

ARC is the runtime and command-line tooling behind the site. AFS is its path-based filesystem abstraction. Web Device is ARC's AFS provider for static websites: a runtime module that reads a class of AFS paths. It reads a site's pages, content records, and Web configuration, then renders static HTML. It is not a separate website framework: the files in the AFS-backed site remain the source of truth.

Three parts of a site

Most sites divide their work across these locations:

LocationPurpose
pages/Routable pages, routes, and layouts. Use layout.aup for Web pages; layout.json remains a compatibility fallback.
content/Directory-based content records. A record normally stores its body in content.md or index.md, and can add locale variants such as content.zh.md with YAML front matter, the YAML metadata block at the start of a document.
.web/Site-wide configuration, components, themes, templates, and static assets. .web/site.yaml is the recommended configuration entry point.

AUP is ARC's declarative language for describing UI and layouts. Use it to compose Web components into a page layout. Do not expect arbitrary AUP-native nodes to render as Web content on their own: a Web layout must refer to components supplied by the site's .web/components/ directory or a theme library. See AUP layout boundary for the current boundary.

Choose a path

Read by task rather than trying to learn the whole system at once:

GoalStart here
Start from an empty directoryGet started; establish scope, create a first site, then run it directly on your machine.
Understand an existing siteUnderstand a site; begin with the directory, pages, content, and routes.
Start authoring or changing a siteAuthor a site; begin with site configuration, page layouts, and content binding.
Look up the exact contractReference; this will cover directories, AUP, source bindings, components, and version boundaries.
Follow a complete pathRecipes; grow from a minimal information site to a content site and a custom component.

The complete shape is fixed before each page is filled in. Every draft page says which question it will answer; a page with commands becomes operational reference only after those commands have been run against the current runtime.

Articles explain context; documentation states the contract

Web Device: Declare a Website, Then Pick the Right Path explains the design context. The Web Content System on ARC explains why a content object does not need to begin as an article, product, or event.

Those articles are useful background, not the operational reference. This board follows current code, tests, and observed runtime behavior. Historical language in an article does not automatically become a product commitment.

Version boundary

The facts in this initial page were checked against arc 2.0.0-beta.25. Any page that includes commands must name the version used for verification and show actual output. When using another release, check its command reference and compatibility guidance first.