update example to v0.9.3
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
<h2>Path: {{ this | url(absolute=True) }}</h2>
|
||||
<div>This is: {{this}}</div>
|
||||
<div>Children: {{this.children}}</div>
|
||||
<p>This is: {{this}}</p>
|
||||
<p>Custom field, desc: "{{this.desc}}"</p>
|
||||
<p>Children: {{this.children}}</p>
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
<h2>Path: {{ this | url(absolute=True) }}</h2>
|
||||
<div>This is: {{this}}</div>
|
||||
<p>This is: {{this}}</p>
|
||||
<p>Group: "{{this.group}}", Key: "{{this.key}}"</p>
|
||||
<p>Custom field title: {{this.title}}</p>
|
||||
<ul>
|
||||
{%- for child, extras in this.children.items() %}
|
||||
<li>Page: {{ child.path }}, Tags: {{ extras }}</li>
|
||||
{%- endfor %}
|
||||
{%- for child in this.children %}
|
||||
<li>Child: <a href="{{child|url}}">{{child.title}}</a> ({{child.path}})</li>
|
||||
{%- endfor %}
|
||||
</ul>
|
||||
@@ -1,12 +1,9 @@
|
||||
<h2>Path: {{ this | url(absolute=True) }}</h2>
|
||||
<div>This is: {{this}}</div>
|
||||
<p>This is: {{this}}</p>
|
||||
<p>Custom field date: {{this.date}}</p>
|
||||
<ul>
|
||||
{%- for child, extras in this.children.items() %}
|
||||
<li>Page: {{ child.path }}</li>
|
||||
<ul>
|
||||
{%- for extra in extras %}
|
||||
Name: {{ extra.val }}, Tag count: {{ extra.tags_in_page }}
|
||||
{%- endfor %}
|
||||
</ul>
|
||||
{%- endfor %}
|
||||
{%- for child, extras in this.children.items() -%}
|
||||
{%- set etxra = (extras|first).tags_in_page %}
|
||||
<li>{{etxra|length}} tags on page "{{child.path}}": {{etxra}}</li>
|
||||
{%- endfor %}
|
||||
</ul>
|
||||
@@ -18,20 +18,12 @@ main { margin: 3em; }
|
||||
{% block body %}{{ this.body }}{% endblock %}
|
||||
</main>
|
||||
<footer>
|
||||
<div>Simple Tags:
|
||||
{% for tag in ['blog','directory','blog-post','initial','samegroup'] %}
|
||||
<a href="/blog/simple/{{tag}}/">({{tag}})</a>
|
||||
{% endfor %}
|
||||
</div>
|
||||
<div>Config Tags:
|
||||
{% for tag in ['root','blog','directory','blog-post','initial','samegroup'] %}
|
||||
<a href="/config/{{tag}}.html">({{tag}})</a>
|
||||
{% endfor %}
|
||||
</div>
|
||||
<div>Advanced Tags:
|
||||
{% for tag in ['tag','two','blog'] %}
|
||||
<a href="/advanced/{{tag}}/">({{tag}})</a>
|
||||
{% endfor %}
|
||||
{%- for k, v in [('testA','Config'),('testB','Simple'),('testC','Advanced')] %}
|
||||
<div>{{v}} Tags:
|
||||
{%- for x in this|groupby(k, recursive=True)|list|unique|sort %}
|
||||
<a href="{{ x|url }}">({{x.key}})</a>
|
||||
{%- endfor %}
|
||||
</div>
|
||||
{%- endfor %}
|
||||
</footer>
|
||||
</body>
|
||||
|
||||
Reference in New Issue
Block a user