Skip to content

Commit be22e3e

Browse files
ctruedenmattxwang
authored andcommitted
Improve the echo include
And add a dump of `page` to the editing/debugging page.
1 parent 8103a50 commit be22e3e

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

_includes/echo

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
{%- comment -%}
22
This include just echoes its arguments, for debugging/learning purposes.
33
{%- endcomment -%}
4-
<p>{{include}}</p>
4+
```
5+
{{include}}
6+
```

_pages/editing/debugging.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,12 @@ Note that liquid allows the passing of [arbitrary arguments](https://jekyllrb.co
1616

1717
{% highlight liquid %}{% raw %}{% include echo content="This is the content argument" bracket="what if I pass {}?" gorilla="Why do we have a gorilla argument?" %}{% endraw %}{% endhighlight %}
1818
{% include echo content="This is the content argument" bracket="what if I pass {}?" gorilla="Why do we have a gorilla argument?" %}
19+
20+
### What's in a `page`?
21+
22+
{% include notice icon="tech" content="Ever wonder what all is part of the `page` data structure? Let's find out!
23+
24+
(You can also do this with the `site` data structure, but be warned: the output will include every page body across the whole site!)" %}
25+
26+
{% highlight liquid %}{% raw %}{% include echo p=page %}{% endraw %}{% endhighlight %}
27+
{% include echo p=page %}

0 commit comments

Comments
 (0)