Sha256: 07161e5e3df2558c94e6bed4b2959a34db2e8c95ef56e8824d5a9b2432ab186b

Contents?: true

Size: 784 Bytes

Versions: 32

Compression:

Stored size: 784 Bytes

Contents

---
layout: nil
date: 2013-07-21 18:59
people:
  - { name: Bill }
  - { name: Bob }
---
{% assign foo = 'bar' %}

## Simple return
bar → {% return foo %}

## Conditional return
bar → {% return foo if foo %}
'' → '{% return foo unless foo == 'bar' %}'

## Ternary return
nope → {% return (foo == 'baz' ? foo : 'nope') %}

## Cascading return
nope → {% return bingo || fez || 'nope' %}
bar → {% return bingo || fez || foo %}

## Test local variables
yep → {% for person in page.people %}{% return 'yep' if person.name == 'Bill' %}{% endfor %}

## Returns with filters
2013-07-21T18:59:00-05:00 → {% return post.date or page.date | datetime | date_to_xmlschema %}
2013-07-21T18:59:00-05:00 → {% return (false ? post.date : page.date) | datetime | date_to_xmlschema %}

Version data entries

32 entries across 32 versions & 2 rubygems

Version Path
octopress-return-tag-1.0.0 test/index.html
octopress-ink-1.0.0.rc.11 test/source/test_tags/return.html
octopress-ink-1.0.0.rc.10 test/source/test_tags/return.html
octopress-ink-1.0.0.rc.9 test/source/test_tags/return.html
octopress-ink-1.0.0.rc.8 test/source/test_tags/return.html
octopress-ink-1.0.0.rc.7 test/source/test_tags/return.html
octopress-ink-1.0.0.rc.6 test/source/test_tags/return.html
octopress-ink-1.0.0.rc.5 test/source/test_tags/return.html
octopress-ink-1.0.0.rc.3 test/source/test_tags/return.html
octopress-ink-1.0.0.rc.2 test/source/test_tags/return.html
octopress-ink-1.0.0.rc.1 test/source/test_tags/return.html
octopress-ink-1.0.0.alpha.45 test/source/test_tags/return.html
octopress-ink-1.0.0.alpha.44 test/source/test_tags/return.html
octopress-ink-1.0.0.alpha.43 test/source/test_tags/return.html
octopress-ink-1.0.0.alpha.42 test/source/test_tags/return.html
octopress-ink-1.0.0.alpha.41 test/source/test_tags/return.html
octopress-ink-1.0.0.alpha.40 test/source/test_tags/return.html
octopress-ink-1.0.0.alpha.39 test/source/test_tags/return.html
octopress-ink-1.0.0.alpha.38 test/source/test_tags/return.html
octopress-ink-1.0.0.alpha.37 test/source/test_tags/return.html