# Hugo Documentation Site

This directory contains the Hugo configuration for the Testify documentation site.

## Structure

```
hugo/
├── hugo.yaml                   # Main Hugo configuration
├── testify.yaml.template       # Dynamic config template (version info)
├── gendoc.go                    # Local development server (go run gendoc.go)
├── themes/
│   ├── hugo-relearn/          # Relearn theme (extracted from zip)
│   ├── testify-assets/        # Custom SCSS and assets
│   │   └── _custom.scss       # Theme customization
│   └── testify-static/        # Static files (logo, favicon)
└── layouts/                   # Custom layouts (override theme)
    ├── shortcodes/            # Custom Hugo shortcodes
    └── partials/              # Custom partial templates

```

## Content Generation

Documentation content is generated by the `DocGenerator` to:
```
../../../docs/doc-site/
```

This directory is mounted as Hugo's content directory via module mounts in `hugo.yaml`.

## Local Development

```bash
# Run local Hugo server
go run gendoc.go

# Site will be available at:
# http://localhost:1313/testify/
```

The `gendoc.go` program:
1. Extracts version info from git tags and go.mod
2. Generates `testify.yaml` from template
3. Starts Hugo server with both config files
4. Enables live reload and draft content

## Theme

Uses **Hugo Relearn** theme (dark variant) following go-swagger patterns.

Theme customizations:
- Custom SCSS in `themes/testify-assets/_custom.scss`
- Static branding assets in `themes/testify-static/`
- Layout overrides in `layouts/`

## Configuration

Two-layer config following go-swagger pattern:

1. **hugo.yaml** - Static configuration (theme, structure, parameters)
2. **testify.yaml** - Dynamic configuration (version, build time)

The dynamic config is generated at build time from `testify.yaml.template`.

## URL Structure

Following domain-based organization:

```
/                          # Home page
/boolean/                  # Boolean assertions (True, False)
/collection/               # Collection assertions (Contains, Empty, Len)
/compare/                  # Comparison assertions (Greater, Less)
/equal/                    # Equality assertions (Equal, NotEqual, Same)
/error/                    # Error assertions (Error, NoError, ErrorIs)
/file/                     # File assertions (FileExists, FileEmpty)
/http/                     # HTTP assertions (HTTPSuccess, HTTPError)
/json/                     # JSON assertions (JSONEq)
/number/                   # Number assertions (InDelta, InEpsilon)
/panic/                    # Panic assertions (Panics, NotPanics)
/string/                   # String assertions (Regexp, NotRegexp)
/time/                     # Time assertions (WithinDuration)
/type/                     # Type assertions (IsType, Zero, Implements)
/yaml/                     # YAML assertions (YAMLEq)
```

## Deployment

GitHub Pages deployment will be configured to:
- Build from `docs/` directory
- Publish to: https://go-openapi.github.io/testify/

## Notes

- **Versioning ignored for now** - Focus on basic structure first
- Edit links point to `internal/assertions/` source code
- Search enabled via Relearn theme
- Breadcrumbs and prev/next navigation enabled
