Skip to content

Commit

Permalink
Improve printing Page Params for debug in bare_min single template
Browse files Browse the repository at this point in the history
  • Loading branch information
kaushalmodi committed Nov 12, 2017
1 parent 5f9b0f3 commit 41d0111
Showing 1 changed file with 5 additions and 20 deletions.
25 changes: 5 additions & 20 deletions test/site/themes/bare_min/layouts/_default/single.html
Expand Up @@ -80,35 +80,20 @@ <h1 class="post-title">{{ .Title }}</h1>
{{ end }}
{{ end }}
</p>
<p>
{{ with .Params.weight }}
Weight (for debug): {{ . }}
{{ end }}
</p>
<p>
{{ if .Params.blackfriday }}
Blackfriday (for debug): {{ .Params.blackfriday }}
{{ end }}
</p>
<p>
{{ if .Params.menu }}
Menu (for debug): {{ .Params.menu }}
{{ end }}
</p>
<p>
{{ if .Params.draft }}
<b>--- This is a Draft ---</b>
{{ end }}
</p>
{{ .Content }}

<hr>
<h3>All Page Params (for debug)</h3>
<p>
{{ range .Params }}
{{ printf "%#v" . }} <br/>
<table>
{{ range $key, $value := .Params }}
{{ printf "<tr><td>%#v</td><td>%#v</td></tr>" $key $value | safeHTML }}
{{ end }}
</p>

</table>
</div>

{{ end }}

0 comments on commit 41d0111

Please sign in to comment.