21 lines
389 B
Go
21 lines
389 B
Go
package domain
|
|
|
|
type Page struct {
|
|
Language Language
|
|
Params map[string]any
|
|
File Path
|
|
Description string
|
|
Title string
|
|
Content []byte
|
|
Resources Resources
|
|
Translations []*Page
|
|
}
|
|
|
|
func (p Page) IsHome() bool {
|
|
return p.File.dir == "./" && p.File.translationBaseName == "index"
|
|
}
|
|
|
|
func (p Page) IsTranslated() bool {
|
|
return 1 < len(p.Translations)
|
|
}
|