Documentation ¶
Index ¶
- Variables
- type Article
- type BaseModel
- type Category
- 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
- type Profile
- type SocialAccount
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, }, }
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 ProfileCue string
View Source
var ProfileTemplate string
Functions ¶
This section is empty.
Types ¶
type Article ¶ added in v0.1.3
type Article struct { BaseModel `json:",omitempty"` Title string `json:"title"` Excerpt string `json:"excerpt"` PublishDate string `json:"publish_date"` EditDate string `json:"edit_date"` Draft bool `json:"draft"` Featured bool `json:"featured"` CoverImage string `json:"cover_image"` CategoryID string `json:"category_id"` Tags []string `json:"tags"` ProfileID string `json:"profile_id"` }
func ArticleFromYAML ¶ added in v0.1.3
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 Category ¶ added in v0.1.3
type Category struct { BaseModel `json:",omitempty"` Title string `json:"title"` Description string `json:"description"` CoverImage string `json:"cover_image"` }
func CategoryFromYAML ¶ added in v0.1.3
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
type Profile ¶
type Profile struct { BaseModel `json:",omitempty"` FirstName string `json:"first_name"` LastName string `json:"last_name"` Company string `json:"company"` Title string `json:"title"` SocialAccounts []SocialAccount `json:"social_accounts,omitempty"` }
func ProfileFromYAML ¶
type SocialAccount ¶
Click to show internal directories.
Click to hide internal directories.