🏷️ Remake IsHome property of Page as method

This commit is contained in:
Maxim Lebedev 2023-11-10 17:24:22 +06:00
parent 753e22ad9a
commit 2215cc751b
Signed by: toby3d
GPG Key ID: 1F14E25B7C119FC5
1 changed files with 4 additions and 1 deletions

View File

@ -10,5 +10,8 @@ type Page struct {
Title string
Content []byte
Resources Resources
IsHome bool
}
func (p Page) IsHome() bool {
return p.File.dir == "./" && p.File.translationBaseName == "index"
}