# Quickstart

URL: /kida/docs/get-started/quickstart/
Section: get-started
Description: Render your first Kida template in 2 minutes

---

> For a complete page index, fetch /kida/llms.txt.

Render your first Kida template in 2 minutes.

## Prerequisites

- Python 3.14+
- Kida installed (`pip install kida-templates`)

## Step 1: Create a Template

Create `templates/hello.html`:

```html
<!DOCTYPE html>
<html>
<head>
    <title>{{ title }}</title>
</head>
<body>
    <h1>Hello, {{ name }}!</h1>

    {% if items %}
    <ul>
        {% for item in items %}
        <li>{{ item }}</li>
        {% end %}
    </ul>
    {% end %}
</body>
</html>
```

Note: Kida uses unified `{% end %}` to close all blocks.

## Step 2: Render the Template

Create `render.py`:

```python
from kida import Environment, FileSystemLoader

# Create environment with template directory
env = Environment(loader=FileSystemLoader("templates/"))

# Load and render the template
template = env.get_template("hello.html")
html = template.render(
    title="My Page",
    name="World",
    items=["Apple", "Banana", "Cherry"]
)

print(html)
```

## Step 3: Run It

```bash
python render.py
```

Output:

```html
<!DOCTYPE html>
<html>
<head>
    <title>My Page</title>
</head>
<body>
    <h1>Hello, World!</h1>

    <ul>
        <li>Apple</li>
        <li>Banana</li>
        <li>Cherry</li>
    </ul>
</body>
</html>
```

## Key Concepts

| Concept | Syntax | Example |
|---------|--------|---------|
| Output | `{{ expr }}` | `{{ name }}` |
| Control | `{% tag %}` | `{% if %}`, `{% for %}` |
| Block end | `{% end %}` | Closes any block |
| Comments | `{# text #}` | `{# ignore me #}` |
| Filters | `\| filter` | `{{ name \| upper }}` |
| Pipeline | `\|> filter` | `{{ title \|> escape \|> upper }}` |
| Pattern match | `{% match %}` | `{% match status %}{% case "ok" %}...{% end %}` |

## Next Steps

:::{cards}
:columns: 1-2-3
:gap: medium

:::{card} First Project
:icon: package
:link: /docs/get-started/first-project/
:description: Build something real
Template inheritance, filters, and multi-page rendering.
:::{/card}

:::{card} Syntax Guide
:icon: code
:link: /docs/syntax/
:description: Variables, control flow, filters
Learn the template language from basics to advanced.
:::{/card}

:::{card} Coming from Jinja2
:icon: arrow-right
:link: /docs/get-started/coming-from-jinja2/
:description: Quick syntax cheat sheet
See what's familiar, what changed, and what Kida adds.
:::{/card}

:::{/cards}
