{{ $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) }}
{{ 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 ) }}
| SiteInfo Variable | Value |
{{ range $idx, $elem := $siteVarNames }}
{{ printf `| %s | ` $elem | safeHTML }}
{{ partial "debugprint.html" (index $siteVarSymbols $idx) }}
{{ printf " |
" | safeHTML }}
{{ end }}
{{ else if $typeIsGitInfo }}
{{ $gitInfoVarNames := (slice "Hash" "AbbreviatedHash" "Subject" "AuthorName" "AuthorEmail" "AuthorDate") }}
{{ $gitInfoVarSymbols := (slice .Hash .AbbreviatedHash .Subject .AuthorName .AuthorEmail .AuthorDate ) }}
| GitInfo Variable | Value |
{{ range $idx, $elem := $gitInfoVarNames }}
{{ printf `| %s | ` $elem | safeHTML }}
{{ partial "debugprint.html" (index $gitInfoVarSymbols $idx) }}
{{ printf " |
" | safeHTML }}
{{ end }}
{{ 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 ) }}
| OutputFormat Variable | Value |
{{ range $idx, $elem := $OutputFormatVarNames }}
{{ printf `| %s | ` $elem | safeHTML }}
{{ partial "debugprint.html" (index $OutputFormatVarSymbols $idx) }}
{{ printf " |
" | safeHTML }}
{{ end }}
{{ 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 ) }}
| FileInfo Variable | Value |
{{ range $idx, $elem := $FileInfoVarNames }}
{{ printf `| %s | ` $elem | safeHTML }}
{{ partial "debugprint.html" (index $FileInfoVarSymbols $idx) }}
{{ printf " |
" | safeHTML }}
{{ end }}
{{ 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 ) }}
| Page Variable | Value |
{{ range $idx, $elem := $PageVarNames }}
{{ printf `| %s | ` $elem | safeHTML }}
{{ partial "debugprint.html" (index $PageVarSymbols $idx) }}
{{ printf " |
" | safeHTML }}
{{ end }}
{{ with .NextPage }}
{{ printf `| NextPage | %s |
` .Permalink .Title | safeHTML }}
{{ else }}
{{ printf `| NextPage | None |
` | safeHTML }}
{{ end }}
{{ with .PrevPage }}
{{ printf `| PrevPage | %s |
` .Permalink .Title | safeHTML }}
{{ else }}
{{ printf `| PrevPage | None |
` | safeHTML }}
{{ end }}
{{ with .NextInSection }}
{{ printf `| NextInSection | %s |
` .Permalink .Title | safeHTML }}
{{ else }}
{{ printf `| NextInSection | None |
` | safeHTML }}
{{ end }}
{{ with .PrevInSection }}
{{ printf `| PrevInSection | %s |
` .Permalink .Title | safeHTML }}
{{ else }}
{{ printf `| PrevInSection | None |
` | safeHTML }}
{{ end }}
{{ 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 ) }}
| MenuEntry Variable | Value |
{{ range $idx, $elem := $MenuEntryVarNames }}
{{ printf `| %s | ` $elem | safeHTML }}
{{ partial "debugprint.html" (index $MenuEntryVarSymbols $idx) }}
{{ printf " |
" | safeHTML }}
{{ end }}
{{ else if $typeIsOrderedTaxonomyEntry }}
{{ $OrderedTaxonomyEntryVarNames := (slice "Name" "Count" "Term" "WeightedPages") }}
{{ $OrderedTaxonomyEntryVarSymbols := (slice .Name .Count .Term .WeightedPages ) }}
| OrderedTaxonomyEntry Variable | Value |
{{ range $idx, $elem := $OrderedTaxonomyEntryVarNames }}
{{ printf `| %s | ` $elem | safeHTML }}
{{ partial "debugprint.html" (index $OrderedTaxonomyEntryVarSymbols $idx) }}
{{ printf " |
" | safeHTML }}
{{ end }}
{{ end }}
{{ else if $typeIsInterface }}