# Getting Started

Clay turns a folder of Markdown files into a documentation website. You write pages in `docs/`, describe the site in `clay.yaml`, and Clay builds static files you can publish anywhere. No templates, no theme to configure, no JavaScript to write.

::: cards
- [Introduction](https://clay-doc.github.io/clay-example-repo/4.x/getting-started/introduction.md)
- [Installation](https://clay-doc.github.io/clay-example-repo/4.x/getting-started/installation.md)
- [Quick Start](https://clay-doc.github.io/clay-example-repo/4.x/getting-started/quick-start.md)
- [Project Structure](https://clay-doc.github.io/clay-example-repo/4.x/getting-started/project-structure.md)
:::

## Your first five minutes

::: steps
1. **Install Clay** in your project:

   ```bash
   npm install --save-dev clay-doc
   ```

2. **Name the site** in `clay.yaml`:

   ```yaml [clay.yaml]
   title: "My Project"
   ```

3. **Write a page**, `docs/index.md`:

   ```markdown [docs/index.md]
   # Welcome

   This is the documentation of **My Project**.
   ```

4. **Watch it live** with `npx clay dev`, at [http://localhost:3000](http://localhost:3000).

5. **Build it** with `npx clay build`. The site is in `publish/public`, ready to upload.
:::

The [quick start](https://clay-doc.github.io/clay-example-repo/4.x/getting-started/quick-start.md) goes through the same steps in more detail, with a section of its own and a look at the result.

## What you need

| | |
|---|---|
| **Node.js** | 20.19 or newer, which comes with npm, see [installation](https://clay-doc.github.io/clay-example-repo/4.x/getting-started/installation.md) |
| **Your docs** | Markdown files, or the wish to write some. Existing READMEs work as they are |
| **An editor** | Any. `clay dev` shows every change in the browser right away |
| **A host** | Later, to publish: [GitHub Pages](https://clay-doc.github.io/clay-example-repo/4.x/publishing/github-pages.md) is free and set up in minutes |

## Questions before you start

::: details Do I need to know Vue, Nuxt or JavaScript?
No. Clay is built with them, but you only write Markdown and a few lines of YAML. There is no theme to set up and no code to write.
:::

::: details Can I use the Markdown files I already have?
Yes. Clay reads the Markdown you know from GitHub, and links between `.md` files work like they do there. Copy your files into `docs/`, start `clay dev`, and fix what the [build checks](https://clay-doc.github.io/clay-example-repo/4.x/publishing/build-checks.md) report.
:::

::: details Does my project have to be a JavaScript project?
No. Clay runs with `npx` in any repository, written in Go, Python, Java or anything else, see [without installing](https://clay-doc.github.io/clay-example-repo/4.x/getting-started/installation.md#without-installing).
:::

::: details What does it cost?
Nothing. Clay is open source under the Apache 2.0 license, and the sites it builds run on any free static host.
:::

> [!TIP]
> Already have a Clay site? See [upgrading to Clay 4](https://clay-doc.github.io/clay-example-repo/4.x/guides/upgrading-to-clay-4.md).

---

All pages of these docs, as Markdown for language models: https://clay-doc.github.io/clay-example-repo/4.x/llms.txt
