Getting Started

Getting Started

Afia is used to build and maintain components and websites. Developers can use the APIs or CLI to interface with Afia programmatically.

Installation

Afia distributes its developer tools in a compressed tarball. Download the developers tools for your system.

Creating an Afia Workspace

An Afia workspace is used to manage websites, components, assets and other artifacts all from one repository. Use afia init to initialize a workspace on disk.

mkdir my-workspace
cd my-workspace
afia init

The directory now contains an Afia.toml workspace manifest file, along with sample websites and components.

├── Afia.toml
├── components
│   └── my-nav-bar
│       ├── Component.toml
│       ├── my-nav-bar.css
│       └── my-nav-bar.rs
└── websites
    └── my-site
        └── Website.toml

Previewing a Website

Use the afia website preview command to preview the sample website.

cd websites/my-site
afia website preview
# To view the preview, open http://my-site.localhost:9000 in a web browser

Next Steps

In this Getting Started section you created an Afia workspace and previewed a website in the workspace. Use the other sections to get familiar with more concepts.