github.com/anakojm/hugo-katex@v0.0.0-20231023141351-42d6f5de9c0b/resources/page/page_marshaljson.autogen.go (about)

     1  // Copyright 2019 The Hugo Authors. All rights reserved.
     2  //
     3  // Licensed under the Apache License, Version 2.0 (the "License");
     4  // you may not use this file except in compliance with the License.
     5  // You may obtain a copy of the License at
     6  // http://www.apache.org/licenses/LICENSE-2.0
     7  //
     8  // Unless required by applicable law or agreed to in writing, software
     9  // distributed under the License is distributed on an "AS IS" BASIS,
    10  // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    11  // See the License for the specific language governing permissions and
    12  // limitations under the License.
    13  
    14  // This file is autogenerated.
    15  
    16  package page
    17  
    18  import (
    19  	"encoding/json"
    20  	"github.com/gohugoio/hugo/common/maps"
    21  	"github.com/gohugoio/hugo/config"
    22  	"github.com/gohugoio/hugo/hugofs/files"
    23  	"github.com/gohugoio/hugo/identity"
    24  	"github.com/gohugoio/hugo/langs"
    25  	"github.com/gohugoio/hugo/media"
    26  	"github.com/gohugoio/hugo/navigation"
    27  	"github.com/gohugoio/hugo/source"
    28  	"time"
    29  )
    30  
    31  func MarshalPageToJSON(p Page) ([]byte, error) {
    32  	rawContent := p.RawContent()
    33  	resourceType := p.ResourceType()
    34  	mediaType := p.MediaType()
    35  	permalink := p.Permalink()
    36  	relPermalink := p.RelPermalink()
    37  	name := p.Name()
    38  	title := p.Title()
    39  	params := p.Params()
    40  	data := p.Data()
    41  	date := p.Date()
    42  	lastmod := p.Lastmod()
    43  	publishDate := p.PublishDate()
    44  	expiryDate := p.ExpiryDate()
    45  	aliases := p.Aliases()
    46  	bundleType := p.BundleType()
    47  	description := p.Description()
    48  	draft := p.Draft()
    49  	isHome := p.IsHome()
    50  	keywords := p.Keywords()
    51  	kind := p.Kind()
    52  	layout := p.Layout()
    53  	linkTitle := p.LinkTitle()
    54  	isNode := p.IsNode()
    55  	isPage := p.IsPage()
    56  	path := p.Path()
    57  	pathc := p.Pathc()
    58  	slug := p.Slug()
    59  	lang := p.Lang()
    60  	isSection := p.IsSection()
    61  	section := p.Section()
    62  	sectionsEntries := p.SectionsEntries()
    63  	sectionsPath := p.SectionsPath()
    64  	sitemap := p.Sitemap()
    65  	typ := p.Type()
    66  	weight := p.Weight()
    67  	language := p.Language()
    68  	file := p.File()
    69  	gitInfo := p.GitInfo()
    70  	codeOwners := p.CodeOwners()
    71  	outputFormats := p.OutputFormats()
    72  	alternativeOutputFormats := p.AlternativeOutputFormats()
    73  	menus := p.Menus()
    74  	translationKey := p.TranslationKey()
    75  	isTranslated := p.IsTranslated()
    76  	allTranslations := p.AllTranslations()
    77  	translations := p.Translations()
    78  	store := p.Store()
    79  	getIdentity := p.GetIdentity()
    80  
    81  	s := struct {
    82  		RawContent               string
    83  		ResourceType             string
    84  		MediaType                media.Type
    85  		Permalink                string
    86  		RelPermalink             string
    87  		Name                     string
    88  		Title                    string
    89  		Params                   maps.Params
    90  		Data                     interface{}
    91  		Date                     time.Time
    92  		Lastmod                  time.Time
    93  		PublishDate              time.Time
    94  		ExpiryDate               time.Time
    95  		Aliases                  []string
    96  		BundleType               files.ContentClass
    97  		Description              string
    98  		Draft                    bool
    99  		IsHome                   bool
   100  		Keywords                 []string
   101  		Kind                     string
   102  		Layout                   string
   103  		LinkTitle                string
   104  		IsNode                   bool
   105  		IsPage                   bool
   106  		Path                     string
   107  		Pathc                    string
   108  		Slug                     string
   109  		Lang                     string
   110  		IsSection                bool
   111  		Section                  string
   112  		SectionsEntries          []string
   113  		SectionsPath             string
   114  		Sitemap                  config.SitemapConfig
   115  		Type                     string
   116  		Weight                   int
   117  		Language                 *langs.Language
   118  		File                     source.File
   119  		GitInfo                  source.GitInfo
   120  		CodeOwners               []string
   121  		OutputFormats            OutputFormats
   122  		AlternativeOutputFormats OutputFormats
   123  		Menus                    navigation.PageMenus
   124  		TranslationKey           string
   125  		IsTranslated             bool
   126  		AllTranslations          Pages
   127  		Translations             Pages
   128  		Store                    *maps.Scratch
   129  		GetIdentity              identity.Identity
   130  	}{
   131  		RawContent:               rawContent,
   132  		ResourceType:             resourceType,
   133  		MediaType:                mediaType,
   134  		Permalink:                permalink,
   135  		RelPermalink:             relPermalink,
   136  		Name:                     name,
   137  		Title:                    title,
   138  		Params:                   params,
   139  		Data:                     data,
   140  		Date:                     date,
   141  		Lastmod:                  lastmod,
   142  		PublishDate:              publishDate,
   143  		ExpiryDate:               expiryDate,
   144  		Aliases:                  aliases,
   145  		BundleType:               bundleType,
   146  		Description:              description,
   147  		Draft:                    draft,
   148  		IsHome:                   isHome,
   149  		Keywords:                 keywords,
   150  		Kind:                     kind,
   151  		Layout:                   layout,
   152  		LinkTitle:                linkTitle,
   153  		IsNode:                   isNode,
   154  		IsPage:                   isPage,
   155  		Path:                     path,
   156  		Pathc:                    pathc,
   157  		Slug:                     slug,
   158  		Lang:                     lang,
   159  		IsSection:                isSection,
   160  		Section:                  section,
   161  		SectionsEntries:          sectionsEntries,
   162  		SectionsPath:             sectionsPath,
   163  		Sitemap:                  sitemap,
   164  		Type:                     typ,
   165  		Weight:                   weight,
   166  		Language:                 language,
   167  		File:                     file,
   168  		GitInfo:                  gitInfo,
   169  		CodeOwners:               codeOwners,
   170  		OutputFormats:            outputFormats,
   171  		AlternativeOutputFormats: alternativeOutputFormats,
   172  		Menus:                    menus,
   173  		TranslationKey:           translationKey,
   174  		IsTranslated:             isTranslated,
   175  		AllTranslations:          allTranslations,
   176  		Translations:             translations,
   177  		Store:                    store,
   178  		GetIdentity:              getIdentity,
   179  	}
   180  
   181  	return json.Marshal(&s)
   182  }