{{ $value := . }} {{ $type := (printf "%T" $value) }} {{ $typeIsBool := (eq "bool" $type) }} {{ $typeIsNumber := (or (eq "int" $type) (eq "int64" $type) (eq "float64" $type)) }} {{ $typeIsString := (findRE "^(string|template\\.(CSS|HTML|HTMLAttr|JS|JSStr|URL))$" $type) }} {{ $typeIsTime := (eq "time.Time" $type) }} {{ $typeIsSlice := (findRE "^([[][]]|.*TaxonomyList|output\\.Formats|resource\\.Resources|.*navigation\\.Menu$|\\*?hugolib\\.Pages$|hugolib\\.OrderedTaxonomy$|hugolib\\.WeightedPages)" $type) }} {{ $typeIsMap := (findRE "^(map[[].+[]]|.*SiteSocial|.*navigation\\.Menus$|hugolib\\.AuthorList|hugolib\\.Taxonomy|maps\\.Params)" $type) }} {{ $typeIsSiteInfo := (eq "*hugolib.SiteInfo" $type) }} {{ $typeIsGitInfo := (findRE "^.*gitmap\\.GitInfo" $type) }} {{ $typeIsOutputFormat := (eq "output.Format" $type) }} {{ $typeIsResource := (findRE "^\\*resource" $type) }} {{ $typeIsPage := (findRE "^(\\*hugolib\\.Page|.*hugolib\\.pageState)" $type) }} {{ $typeIsFileInfo := (findRE "^\\*(hugolib|source)\\.[fF]ileInfo$" $type) }} {{ $typeIsMenuEntry := (findRE "navigation\\.MenuEntry$" $type) }} {{ $typeIsOrderedTaxonomyEntry := (eq "hugolib.OrderedTaxonomyEntry" $type) }} {{ $typeIsWeightedPage := (eq "hugolib.WeightedPage" $type) }} {{ $typeIsStruct := (or $typeIsSiteInfo $typeIsGitInfo $typeIsOutputFormat $typeIsFileInfo $typeIsPage $typeIsMenuEntry $typeIsOrderedTaxonomyEntry) }} {{ $typeIsInterface := (or $typeIsResource) }} {{ $typeIsSpecial := (or $typeIsWeightedPage) }} {{ if $typeIsBool }} {{ printf `%#v` $value $value | safeHTML }} {{ else if (or $typeIsNumber $typeIsString) }} {{ printf "%#v" $value | htmlUnescape }} {{ else if $typeIsTime }} {{ printf "%s" $value | safeHTML }} {{ else if $typeIsSlice }} {{ range $value }} {{ partial "debugprint.html" . }} {{ end }} {{ else if $typeIsMap }} {{ if (gt (len $value) 0) }}
{{ range $key1, $value1 := $value }} {{ $type1 := (printf "%T" $value1) }} {{ $type1IsTime := (eq "time.Time" $type1) }} {{ if $type1IsTime }} {{ if (ne "0001-01-01" ($value1.Format "2006-01-02")) }} {{ printf `" | safeHTML }} {{ end }} {{ else }} {{ printf `" | safeHTML }} {{ end }} {{ end }}
KeyTypeValue
%s%s` $key1 $type1 | safeHTML }} {{ partial "debugprint.html" $value1 }} {{ printf "
%s%s` $key1 $type1 | safeHTML }} {{ partial "debugprint.html" $value1 }} {{ printf "
{{ end }} {{ else if $typeIsStruct }}
{{ if $typeIsSiteInfo }} {{ $siteVarNames := (slice "Title" "Author" "Social" "LastChange" "DisqusShortname" "GoogleAnalytics" "Copyright" "RSSLink" "LanguageCode" "BuildDrafts" "Params") }} {{ $siteVarSymbols := (slice .Title .Author .Social .LastChange .DisqusShortname .GoogleAnalytics .Copyright .RSSLink .LanguageCode .BuildDrafts .Params ) }} {{ range $idx, $elem := $siteVarNames }} {{ printf `" | safeHTML }} {{ end }}
SiteInfo VariableValue
%s` $elem | safeHTML }} {{ partial "debugprint.html" (index $siteVarSymbols $idx) }} {{ printf "
{{ else if $typeIsGitInfo }} {{ $gitInfoVarNames := (slice "Hash" "AbbreviatedHash" "Subject" "AuthorName" "AuthorEmail" "AuthorDate") }} {{ $gitInfoVarSymbols := (slice .Hash .AbbreviatedHash .Subject .AuthorName .AuthorEmail .AuthorDate ) }} {{ range $idx, $elem := $gitInfoVarNames }} {{ printf `" | safeHTML }} {{ end }}
GitInfo VariableValue
%s` $elem | safeHTML }} {{ partial "debugprint.html" (index $gitInfoVarSymbols $idx) }} {{ printf "
{{ else if $typeIsOutputFormat }} {{ $OutputFormatVarNames := (slice "Name" "MediaType" "Path" "BaseName" "Rel" "Protocol" "IsPlainText" "IsHTML" "NoUgly" "NotAlternative") }} {{ $OutputFormatVarSymbols := (slice .Name .MediaType .Path .BaseName .Rel .Protocol .IsPlainText .IsHTML .NoUgly .NotAlternative ) }} {{ range $idx, $elem := $OutputFormatVarNames }} {{ printf `" | safeHTML }} {{ end }}
OutputFormat VariableValue
%s` $elem | safeHTML }} {{ partial "debugprint.html" (index $OutputFormatVarSymbols $idx) }} {{ printf "
{{ else if $typeIsFileInfo }} {{ $FileInfoVarNames := (slice "UniqueID" "BaseFileName" "TranslationBaseName" "Lang" "Section" "LogicalName" "Dir" "Ext" "Path") }} {{ $FileInfoVarSymbols := (slice .UniqueID .BaseFileName .TranslationBaseName .Lang .Section .LogicalName .Dir .Ext .Path ) }} {{ range $idx, $elem := $FileInfoVarNames }} {{ printf `" | safeHTML }} {{ end }}
FileInfo VariableValue
%s` $elem | safeHTML }} {{ partial "debugprint.html" (index $FileInfoVarSymbols $idx) }} {{ printf "
{{ else if $typeIsPage }} {{ $PageVarNames := (slice "Name" "Title" "ResourceType" "Kind" "Section" "Draft" "Type" "Layout" "Permalink" "RelPermalink" "Data") }} {{ $PageVarSymbols := (slice .Name .Title .ResourceType .Kind .Section .Draft .Type .Layout .Permalink .RelPermalink .Data ) }} {{ range $idx, $elem := $PageVarNames }} {{ printf `" | safeHTML }} {{ end }} {{ with .NextPage }} {{ printf `` .Permalink .Title | safeHTML }} {{ else }} {{ printf `` | safeHTML }} {{ end }} {{ with .PrevPage }} {{ printf `` .Permalink .Title | safeHTML }} {{ else }} {{ printf `` | safeHTML }} {{ end }} {{ with .NextInSection }} {{ printf `` .Permalink .Title | safeHTML }} {{ else }} {{ printf `` | safeHTML }} {{ end }} {{ with .PrevInSection }} {{ printf `` .Permalink .Title | safeHTML }} {{ else }} {{ printf `` | safeHTML }} {{ end }}
Page VariableValue
%s` $elem | safeHTML }} {{ partial "debugprint.html" (index $PageVarSymbols $idx) }} {{ printf "
NextPage%s
NextPageNone
PrevPage%s
PrevPageNone
NextInSection%s
NextInSectionNone
PrevInSection%s
PrevInSectionNone
{{ else if $typeIsMenuEntry }} {{ $MenuEntryVarNames := (slice "ConfiguredURL" "Name" "Menu" "Identifier" "Title" "Pre" "Post" "Weight" "Parent" "Children") }} {{ $MenuEntryVarSymbols := (slice .ConfiguredURL .Name .Menu .Identifier .Title .Pre .Post .Weight .Parent .Children ) }} {{ range $idx, $elem := $MenuEntryVarNames }} {{ printf `" | safeHTML }} {{ end }}
MenuEntry VariableValue
%s` $elem | safeHTML }} {{ partial "debugprint.html" (index $MenuEntryVarSymbols $idx) }} {{ printf "
{{ else if $typeIsOrderedTaxonomyEntry }} {{ $OrderedTaxonomyEntryVarNames := (slice "Name" "Count" "Term" "WeightedPages") }} {{ $OrderedTaxonomyEntryVarSymbols := (slice .Name .Count .Term .WeightedPages ) }} {{ range $idx, $elem := $OrderedTaxonomyEntryVarNames }} {{ printf `" | safeHTML }} {{ end }}
OrderedTaxonomyEntry VariableValue
%s` $elem | safeHTML }} {{ partial "debugprint.html" (index $OrderedTaxonomyEntryVarSymbols $idx) }} {{ printf "
{{ end }}
{{ else if $typeIsInterface }}
{{ if $typeIsResource }} {{ $ResourceVarNames := (slice "Name" "Title" "ResourceType" "Permalink" "RelPermalink" "Params") }} {{ $ResourceVarSymbols := (slice .Name .Title .ResourceType .Permalink .RelPermalink .Params ) }} {{ range $idx, $elem := $ResourceVarNames }} {{ printf `" | safeHTML }} {{ end }}
Resource VariableValue
%s` $elem | safeHTML }} {{ partial "debugprint.html" (index $ResourceVarSymbols $idx) }} {{ printf "
{{ end }}
{{ else if $typeIsSpecial }} {{ if $typeIsWeightedPage }}
{{ printf "" .Page.Title .Weight | safeHTML }}
%sW:%d
{{ end }} {{ else }}
{{ printf "%#v (type:%s)" $value $type | safeHTML }}
{{ end }} {{/* range $key1, $value1 := . */}} {{/* printf "%#v%#v" $key1 $value1 | safeHTML */}} {{/* end */}}