90 lines
2.7 KiB
Text
90 lines
2.7 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,
|
|
|
|
{
|
|
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,
|
|
],
|
|
}
|