153 lines
4.9 KiB
Text
153 lines
4.9 KiB
Text
# Content type definitions
|
|
#
|
|
# Each entry maps a named content kind (blog, recipes, …) to its display
|
|
# settings and pagination behaviour. These drive build-time code generation
|
|
# in shared/build.rs and the ContentIndex/PostViewer components at runtime.
|
|
#
|
|
# To add a new content type: add a record here AND create the corresponding
|
|
# directory under site/content/.
|
|
|
|
let site_c = import "site/contracts.ncl" in
|
|
|
|
{
|
|
content_types = [
|
|
{
|
|
name = "blog",
|
|
directory = "blog",
|
|
enabled = true,
|
|
features = {
|
|
style_mode = "row",
|
|
style_css = "blog-content",
|
|
use_feature = true,
|
|
use_categories = true,
|
|
use_tags = true,
|
|
use_emojis = true,
|
|
cta_view = "BlogCTAView",
|
|
default_page_size = 8,
|
|
page_size_options = [5, 8, 12, 20],
|
|
show_page_info = true,
|
|
pagination_style = "numbered",
|
|
} | site_c.ContentTypeFeatures,
|
|
} | site_c.ContentType,
|
|
|
|
{
|
|
name = "recipes",
|
|
directory = "recipes",
|
|
enabled = true,
|
|
features = {
|
|
style_mode = "grid",
|
|
style_css = "recipe-content",
|
|
use_feature = false,
|
|
use_categories = true,
|
|
use_tags = true,
|
|
use_emojis = true,
|
|
cta_view = "RecipesCTAView",
|
|
default_page_size = 12,
|
|
page_size_options = [6, 12, 18, 24],
|
|
show_page_info = true,
|
|
pagination_style = "numbered",
|
|
} | site_c.ContentTypeFeatures,
|
|
} | site_c.ContentType,
|
|
|
|
{
|
|
name = "projects",
|
|
directory = "projects",
|
|
enabled = true,
|
|
features = {
|
|
style_mode = "grid",
|
|
style_css = "projects-content",
|
|
use_feature = true,
|
|
use_categories = true,
|
|
use_tags = true,
|
|
use_emojis = true,
|
|
cta_view = "ProjectsCTAView",
|
|
default_page_size = 12,
|
|
page_size_options = [6, 12, 18, 24],
|
|
show_page_info = false,
|
|
pagination_style = "numbered",
|
|
} | site_c.ContentTypeFeatures,
|
|
} | site_c.ContentType,
|
|
|
|
# ontoref domains (ADR-065) — bakes the `domains` ContentType so /domains (EN)
|
|
# /dominios (ES) routes activate. Mirrors projects (category-layout grid).
|
|
{
|
|
name = "domains",
|
|
directory = "domains",
|
|
enabled = true,
|
|
features = {
|
|
style_mode = "grid",
|
|
style_css = "projects-content",
|
|
use_feature = true,
|
|
use_categories = true,
|
|
use_tags = true,
|
|
use_emojis = true,
|
|
cta_view = "ProjectsCTAView",
|
|
default_page_size = 12,
|
|
page_size_options = [6, 12, 18, 24],
|
|
show_page_info = false,
|
|
pagination_style = "numbered",
|
|
} | site_c.ContentTypeFeatures,
|
|
} | site_c.ContentType,
|
|
|
|
{
|
|
name = "activities",
|
|
directory = "activities",
|
|
enabled = true,
|
|
features = {
|
|
style_mode = "grid",
|
|
style_css = "activities-content",
|
|
use_feature = true,
|
|
use_categories = true,
|
|
use_tags = true,
|
|
use_emojis = true,
|
|
cta_view = "ActivitiesCTAView",
|
|
default_page_size = 12,
|
|
page_size_options = [6, 12, 18, 24],
|
|
show_page_info = false,
|
|
pagination_style = "numbered",
|
|
} | site_c.ContentTypeFeatures,
|
|
} | site_c.ContentType,
|
|
|
|
# ADR viewer (projected from .ontoref/adrs by gen-adr-pages.nu --mode content).
|
|
# Reuses ProjectsCTAView; served at /adr/{slug}.
|
|
{
|
|
name = "adr",
|
|
directory = "adr",
|
|
enabled = true,
|
|
features = {
|
|
style_mode = "grid",
|
|
style_css = "adr-content",
|
|
use_feature = false,
|
|
use_categories = true,
|
|
use_tags = true,
|
|
use_emojis = false,
|
|
cta_view = "ProjectsCTAView",
|
|
default_page_size = 24,
|
|
page_size_options = [12, 24, 48],
|
|
show_page_info = false,
|
|
pagination_style = "numbered",
|
|
} | site_c.ContentTypeFeatures,
|
|
} | site_c.ContentType,
|
|
|
|
# Catalog of verifiables (projected from .ontoref/catalog). Shared-superset
|
|
# kind (ADR-001); reuses ProjectsCTAView; served at /catalog/{slug}.
|
|
{
|
|
name = "catalog",
|
|
directory = "catalog",
|
|
enabled = true,
|
|
features = {
|
|
style_mode = "grid",
|
|
style_css = "adr-content",
|
|
use_feature = false,
|
|
use_categories = true,
|
|
use_tags = true,
|
|
use_emojis = false,
|
|
cta_view = "ProjectsCTAView",
|
|
default_page_size = 24,
|
|
page_size_options = [12, 24, 48],
|
|
show_page_info = false,
|
|
pagination_style = "numbered",
|
|
} | site_c.ContentTypeFeatures,
|
|
} | site_c.ContentType,
|
|
],
|
|
}
|