feat: 前台动态路由与积木页面、网页路径/发布/模式、PAGE_BUILDER 文档
Made-with: Cursor
This commit is contained in:
@@ -13,13 +13,16 @@ type Site struct {
|
||||
|
||||
// Page 网页(属于某站点)
|
||||
type Page struct {
|
||||
ID bson.ObjectID `bson:"_id,omitempty" json:"id"`
|
||||
SiteID string `bson:"site_id" json:"site_id"`
|
||||
Slug string `bson:"slug" json:"slug"` // index, about, ...
|
||||
Title string `bson:"title" json:"title"`
|
||||
Type string `bson:"type" json:"type"` // homepage, page
|
||||
Content string `bson:"content" json:"content"` // HTML 或 JSON 字符串
|
||||
UpdatedAt string `bson:"updated_at" json:"updated_at"`
|
||||
ID bson.ObjectID `bson:"_id,omitempty" json:"id"`
|
||||
SiteID string `bson:"site_id" json:"site_id"`
|
||||
Slug string `bson:"slug" json:"slug"` // index, about, ...
|
||||
Title string `bson:"title" json:"title"`
|
||||
Type string `bson:"type" json:"type"` // homepage, page
|
||||
Content string `bson:"content" json:"content"` // html 模式为 HTML;builder 模式为 JSON(见文档)
|
||||
ContentMode string `bson:"content_mode,omitempty" json:"content_mode"` // html | builder,空视为 html
|
||||
RoutePath string `bson:"route_path,omitempty" json:"route_path"` // 自定义前台路径,如 /about;空则用 /{slug}
|
||||
Published *bool `bson:"published,omitempty" json:"published"` // nil 或未设视为已发布
|
||||
UpdatedAt string `bson:"updated_at" json:"updated_at"`
|
||||
}
|
||||
|
||||
// HomepageData 首页可编辑数据(与 yuheng-download-space 对应)
|
||||
|
||||
Reference in New Issue
Block a user