Tooling and schema
The hydro content-type commands, JSON Schema for editor completion, and the stock types that ship with HydroGo.
Create and validate
hydro content-type new recipes # writes content-types/recipes.yaml
hydro content-type validate # loads every file and reports errors
hydro content-type new events --dir my-types
hydro content-type validate --dir my-types| Command | What it does |
|---|---|
hydro content-type new ID [--dir content-types] | Writes a skeleton file for the new type. ID follows the id pattern. |
hydro content-type validate [--dir content-types] | Loads every *.yaml file in the directory and reports the first problem per file: unknown keys, bad kinds, missing relation targets, invalid ids. |
hydro content-type validate in CI so a broken YAML never reaches a server.Editor completion with JSON Schema
A machine-readable schema for content type files is in the repository at docs/schemas/content-type.schema.json. Add this line as the first line of a YAML file and editors with the YAML language server (VS Code YAML extension, for instance) give completion, hover docs and inline validation:
# yaml-language-server: $schema=https://raw.githubusercontent.com/hydrohq/hydrogo/main/docs/schemas/content-type.schema.jsonOffline, point at a local copy instead: # yaml-language-server: $schema=../schemas/content-type.schema.json.
Stock content types
hydro new --preset ... copies stock types into your project. They are examples; edit or delete freely.
| Type | Purpose |
|---|---|
site_settings | Brand name, tagline and footer texts (a single record). |
site_navigation | Header and footer menu links. |
faq | Questions and answers with category. |
team | People with localized role and bio. |
testimonials | Customer quotes. |
comments | Reader comments that wait for moderation (draft to published). |
galleries | Photo galleries. |
homepage_sections, masthead, columnists, official_announcements, ads, polls, videos | Building blocks of the news portal preset. |
label and description values to your language.Admin API for content types
The admin lists and manages content types at /api/v1/admin/content-types, and records at /api/v1/admin/content/{type}. All of them need an authenticated credential; see Admin API.