mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-31 22:41:53 +02:00
Misc doc, code refactoring to improve documentation
This commit is contained in:
@@ -17,7 +17,6 @@ package page
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"github.com/bep/gitmap"
|
||||
"github.com/gohugoio/hugo/common/maps"
|
||||
"github.com/gohugoio/hugo/config"
|
||||
"github.com/gohugoio/hugo/hugofs/files"
|
||||
@@ -82,6 +81,7 @@ func MarshalPageToJSON(p Page) ([]byte, error) {
|
||||
language := p.Language()
|
||||
file := p.File()
|
||||
gitInfo := p.GitInfo()
|
||||
codeOwners := p.CodeOwners()
|
||||
outputFormats := p.OutputFormats()
|
||||
alternativeOutputFormats := p.AlternativeOutputFormats()
|
||||
menus := p.Menus()
|
||||
@@ -89,10 +89,11 @@ func MarshalPageToJSON(p Page) ([]byte, error) {
|
||||
isTranslated := p.IsTranslated()
|
||||
allTranslations := p.AllTranslations()
|
||||
translations := p.Translations()
|
||||
store := p.Store()
|
||||
getIdentity := p.GetIdentity()
|
||||
|
||||
s := struct {
|
||||
Content any
|
||||
Content interface{}
|
||||
Plain string
|
||||
PlainWords []string
|
||||
Summary template.HTML
|
||||
@@ -110,7 +111,7 @@ func MarshalPageToJSON(p Page) ([]byte, error) {
|
||||
Name string
|
||||
Title string
|
||||
Params maps.Params
|
||||
Data any
|
||||
Data interface{}
|
||||
Date time.Time
|
||||
Lastmod time.Time
|
||||
PublishDate time.Time
|
||||
@@ -139,7 +140,8 @@ func MarshalPageToJSON(p Page) ([]byte, error) {
|
||||
Weight int
|
||||
Language *langs.Language
|
||||
File source.File
|
||||
GitInfo *gitmap.GitInfo
|
||||
GitInfo source.GitInfo
|
||||
CodeOwners []string
|
||||
OutputFormats OutputFormats
|
||||
AlternativeOutputFormats OutputFormats
|
||||
Menus navigation.PageMenus
|
||||
@@ -147,6 +149,7 @@ func MarshalPageToJSON(p Page) ([]byte, error) {
|
||||
IsTranslated bool
|
||||
AllTranslations Pages
|
||||
Translations Pages
|
||||
Store *maps.Scratch
|
||||
GetIdentity identity.Identity
|
||||
}{
|
||||
Content: content,
|
||||
@@ -197,6 +200,7 @@ func MarshalPageToJSON(p Page) ([]byte, error) {
|
||||
Language: language,
|
||||
File: file,
|
||||
GitInfo: gitInfo,
|
||||
CodeOwners: codeOwners,
|
||||
OutputFormats: outputFormats,
|
||||
AlternativeOutputFormats: alternativeOutputFormats,
|
||||
Menus: menus,
|
||||
@@ -204,6 +208,7 @@ func MarshalPageToJSON(p Page) ([]byte, error) {
|
||||
IsTranslated: isTranslated,
|
||||
AllTranslations: allTranslations,
|
||||
Translations: translations,
|
||||
Store: store,
|
||||
GetIdentity: getIdentity,
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user