Documentation ¶
Index ¶
- func NewMatterFromPage(p *Page) (pm *matter.PageMatter, err error)
- func RegisterMatcherFn(matcher MatcherFn)
- type MatcherFn
- type Page
- func New(origin string, path, raw string, created, updated int64, ...) (p *Page, err error)
- func NewFromPageMatter(pm *matter.PageMatter, formats types.FormatProvider, enjin context.Context) (p *Page, err error)
- func NewFromPageStub(s *fs.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 NewMatterFromPage ¶ added in v0.2.0
func NewMatterFromPage(p *Page) (pm *matter.PageMatter, err error)
func RegisterMatcherFn ¶
func RegisterMatcherFn(matcher MatcherFn)
Types ¶
type Page ¶
type Page struct { Type string `json:"type"` Format string `json:"format"` Url string `json:"url"` Slug string `json:"slug"` Path string `json:"path"` Title string `json:"title"` 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:"permalink-sha"` Language string `json:"language"` Translates string `json:"translates"` LanguageTag language.Tag `json:"language-tag"` Shasum string `json:"shasum"` Content string `json:"content"` FrontMatter string `json:"frontMatter"` FrontMatterType matter.FrontMatterType `json:"front-matter-type"` PageMatter *matter.PageMatter `json:"page-matter"` CreatedAt time.Time `json:"created"` UpdatedAt time.Time `json:"updated"` DeletedAt sql.NullTime `json:"deleted"` Context context.Context `json:"Context"` Formats types.FormatProvider `json:"-"` // contains filtered or unexported fields }
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.