allow for sections and components in any order on pages
This commit is contained in:
23
lang/lang.go
23
lang/lang.go
@ -122,15 +122,20 @@ type ResponseSpec struct {
|
||||
|
||||
// Page Enhanced Page definitions with unified section model
|
||||
type Page struct {
|
||||
Name string `parser:"'page' @Ident"`
|
||||
Path string `parser:"'at' @String"`
|
||||
Layout string `parser:"'layout' @Ident"`
|
||||
Title *string `parser:"('title' @String)?"`
|
||||
Description *string `parser:"('desc' @String)?"`
|
||||
Auth bool `parser:"@'auth'?"`
|
||||
Meta []MetaTag `parser:"('{' @@*"` // Block-delimited content
|
||||
Sections []Section `parser:"@@*"` // Unified sections replace containers/tabs/panels/modals
|
||||
Components []Component `parser:"@@* '}')?"` // Direct components within the block
|
||||
Name string `parser:"'page' @Ident"`
|
||||
Path string `parser:"'at' @String"`
|
||||
Layout string `parser:"'layout' @Ident"`
|
||||
Title *string `parser:"('title' @String)?"`
|
||||
Description *string `parser:"('desc' @String)?"`
|
||||
Auth bool `parser:"@'auth'?"`
|
||||
Meta []MetaTag `parser:"('{' @@*"` // Block-delimited content
|
||||
Elements []PageElement `parser:"@@* '}')?"` // Unified elements allowing any order
|
||||
}
|
||||
|
||||
// PageElement Unified element type for pages allowing sections and components in any order
|
||||
type PageElement struct {
|
||||
Section *Section `parser:"@@"`
|
||||
Component *Component `parser:"| @@"`
|
||||
}
|
||||
|
||||
// MetaTag Meta tags for SEO
|
||||
|
Reference in New Issue
Block a user