Documentation
¶
Index ¶
- func RegisterMatcherFn(matcher MatcherFn)
- type MatcherFn
- type Page
- func New(path, raw string, created, updated int64, formats types.FormatProvider, ...) (p *Page, err error)
- func NewFromFile(path, file string, formats types.FormatProvider, enjin context.Context) (p *Page, err error)
- func NewFromPageMatter(pm *matter.PageMatter, formats types.FormatProvider, enjin context.Context) (p *Page, err error)
- func NewFromPageStub(s *matter.PageStub, formats types.FormatProvider) (p *Page, err error)
- func SortPages(filtered []*Page, orderBy, sortDir string) (sorted []*Page)
- func (p *Page) Copy() (copy *Page)
- func (p *Page) HasTranslation() (ok bool)
- func (p *Page) IsRedirection(path string) (ok bool)
- func (p *Page) IsTranslation(path string) (ok bool)
- func (p *Page) Match(path string) (found string, ok bool)
- func (p *Page) MatchPrefix(prefix string) (found string, ok bool)
- func (p *Page) MatchQL(query string) (ok bool, err error)
- func (p *Page) Redirections() (redirects []string)
- func (p *Page) SetFormat(filepath string) (path string)
- func (p *Page) SetLanguage(tag language.Tag)
- func (p *Page) SetPermalink(value string) (err error)
- func (p *Page) SetSlugUrl(filepath string)
- func (p *Page) String() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterMatcherFn ¶
func RegisterMatcherFn(matcher MatcherFn)
Types ¶
type Page ¶
type Page struct { Type string `json:"type" gorm:"type"` Format string `json:"format" gorm:"type:string"` Url string `json:"url" gorm:"index"` Slug string `json:"slug"` Path string `json:"path"` Title string `json:"title" gorm:"index"` Summary string `json:"summary"` Description string `json:"description"` Layout string `json:"layout"` Section string `json:"section"` Archetype string `json:"archetype"` Permalink uuid.UUID `json:"permalink"` PermalinkSha string `json:"-" gorm:"-"` Language string `json:"language"` Translates string `json:"translates"` LanguageTag language.Tag `json:"-" gorm:"-"` Shasum string `json:"shasum"` Content string `json:"content"` FrontMatter string `json:"frontMatter"` FrontMatterType matter.FrontMatterType PageMatter *matter.PageMatter Context context.Context `json:"-" gorm:"-"` Formats types.FormatProvider gorm.Model // contains filtered or unexported fields }
func NewFromFile ¶
func NewFromPageMatter ¶ added in v0.1.0
func NewFromPageMatter(pm *matter.PageMatter, formats types.FormatProvider, enjin context.Context) (p *Page, err error)
func NewFromPageStub ¶ added in v0.1.0
func (*Page) HasTranslation ¶
func (*Page) IsRedirection ¶
func (*Page) IsTranslation ¶
func (*Page) Redirections ¶
func (*Page) SetLanguage ¶
func (*Page) SetPermalink ¶ added in v0.1.0
func (*Page) SetSlugUrl ¶
Click to show internal directories.
Click to hide internal directories.