mirror of
https://github.com/moparisthebest/android.moparisthebest.org
synced 2025-01-11 13:48:37 -05:00
Fixed some bugs in the docs for puts.rb where the liquid tags were actually being fired
This commit is contained in:
parent
c8e3382345
commit
0df73625d3
@ -78,7 +78,7 @@ Puts is a Liquid block which outputs its contents to your terminal with Ruby's `
|
|||||||
|
|
||||||
{% raw %}
|
{% raw %}
|
||||||
{% for post in site.posts reverse %}
|
{% for post in site.posts reverse %}
|
||||||
{% puts %}{{ post.title }}{% endputs %}
|
{% puts %}Title: {{ post.title }}{% endputs %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% endraw %}
|
{% endraw %}
|
||||||
|
|
||||||
|
@ -10,36 +10,45 @@ Puts is a Liquid block which outputs its contents to your terminal with Ruby's `
|
|||||||
|
|
||||||
#### Syntax
|
#### Syntax
|
||||||
|
|
||||||
|
{% raw %}
|
||||||
{% puts %}Optional Text: {{ some_liquid_variable }}{% endputs %}
|
{% puts %}Optional Text: {{ some_liquid_variable }}{% endputs %}
|
||||||
|
{% endraw %}
|
||||||
|
|
||||||
This just outputs the contents of the block to the terminal. Note: Markdown, Textile and other converters run after liquid, so you'll see raw templating markup, not processed html.
|
This just outputs the contents of the block to the terminal. Note: Markdown, Textile and other converters run after liquid, so you'll see raw templating markup, not processed html.
|
||||||
|
|
||||||
#### Example 1
|
#### Example 1
|
||||||
|
|
||||||
|
{% raw %}
|
||||||
{% for post in site.posts %}
|
{% for post in site.posts %}
|
||||||
{% puts %}Title: {{ post.title }}{% endputs %}
|
{% puts %}Title: {{ post.title }}{% endputs %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
{% endraw %}
|
||||||
|
|
||||||
#### Output:
|
#### Output:
|
||||||
|
|
||||||
|
{% raw %}
|
||||||
```
|
```
|
||||||
{% puts %} Title: Hello World, I just switched to Octopress
|
{% puts %} Title: Hello World, I just switched to Octopress
|
||||||
{% puts %} Title: Zombie Ninjas Attack: A survivor's retrospective
|
{% puts %} Title: Zombie Ninjas Attack: A survivor's retrospective
|
||||||
...
|
...
|
||||||
```
|
```
|
||||||
|
{% endraw %}
|
||||||
|
|
||||||
#### Example 2 - Longer content
|
#### Example 2 - Longer content
|
||||||
If a line of output is wider than 80 characters it gets output in a puts block for easier marking.
|
If a line of output is wider than 80 characters it gets output in a puts block for easier marking.
|
||||||
|
|
||||||
|
{% raw %}
|
||||||
{% for post in site.posts %}
|
{% for post in site.posts %}
|
||||||
{% puts %}
|
{% puts %}
|
||||||
Title: {{ post.title }}
|
Title: {{ post.title }}
|
||||||
Content: {{ post.content }}
|
Content: {{ post.content }}
|
||||||
{% endputs %}
|
{% endputs %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
{% endraw %}
|
||||||
|
|
||||||
#### Output
|
#### Output
|
||||||
|
|
||||||
|
{% raw %}
|
||||||
```
|
```
|
||||||
{% puts %}
|
{% puts %}
|
||||||
Title: Zombie Ninjas Attack: A survivor's retrospective
|
Title: Zombie Ninjas Attack: A survivor's retrospective
|
||||||
@ -47,7 +56,7 @@ Content: Spoiler: You don't want to survive this. So there I was, standing in li
|
|||||||
for a movie. I could hear hear some car alarms going off in the distance, but that
|
for a movie. I could hear hear some car alarms going off in the distance, but that
|
||||||
....
|
....
|
||||||
{% endputs %}
|
{% endputs %}
|
||||||
...
|
|
||||||
```
|
```
|
||||||
|
{% endraw %}
|
||||||
|
|
||||||
[« Plugins page](/docs/plugins)
|
[« Plugins page](/docs/plugins)
|
||||||
|
Loading…
Reference in New Issue
Block a user