Documentation ¶
Index ¶
- Variables
- func FromYAML(path string, modelName string, cue string) (map[string]interface{}, error)
- type BaseModel
- type Model
- func (m Model) DestinationContentPath() string
- func (m Model) DestinationFilePath(slug string) string
- func (m Model) New(slug string, destination string) error
- func (m Model) SourceContentPath() string
- func (m Model) SourceFilePath(slug string) string
- func (m Model) StaticContentPath() string
- func (m Model) TemplateFilePath(slug string) string
- func (m Model) TemplatePath() string
Constants ¶
This section is empty.
Variables ¶
View Source
var ArticleCue string
View Source
var ArticleTemplate string
View Source
var CategoryCue string
View Source
var CategoryTemplate string
View Source
var Models = []Model{ { ID: "profile", Name: "Profile", Folder: "profiles", ForeignKey: "profile_id", Cue: ProfileCue, }, { ID: "article", Name: "Article", Folder: "articles", ForeignKey: "article_id", Cue: ArticleCue, }, { ID: "category", Name: "Category", Folder: "categories", ForeignKey: "category_id", Cue: CategoryCue, }, { ID: "page", Name: "Page", Folder: "pages", ForeignKey: "page_id", Cue: PageCue, }, }
Models is used by various commands to determine how to perform certain actions based on arguments and flags provided. All new types must be represented in this slice.
View Source
var PageCue string
View Source
var PageTemplate string
View Source
var ProfileCue string
View Source
var ProfileTemplate string
Functions ¶
Types ¶
type BaseModel ¶ added in v0.1.3
type BaseModel struct { ID string `json:"id"` Body string `json:"body"` BodyRaw string `json:"body_raw"` }
baseModel defines fields used by all drb models
type Model ¶
func (Model) DestinationContentPath ¶
func (Model) DestinationFilePath ¶
func (Model) SourceContentPath ¶
func (Model) SourceFilePath ¶
func (Model) StaticContentPath ¶ added in v0.1.3
func (Model) TemplateFilePath ¶ added in v0.1.7
func (Model) TemplatePath ¶ added in v0.1.7
Click to show internal directories.
Click to hide internal directories.