commit
df3c0fd9f3
Binary file not shown.
After Width: | Height: | Size: 5.7 KiB |
|
@ -20,7 +20,7 @@ contents:
|
||||||
complex and beautiful websites out of flat files — for people who do
|
complex and beautiful websites out of flat files — for people who do
|
||||||
not want to make a compromise between a CMS and a static blog engine.
|
not want to make a compromise between a CMS and a static blog engine.
|
||||||
<p>
|
<p>
|
||||||
Getting your ideas implemented is as easy as making breakfast eggs.
|
Getting your ideas implemented is as easy as frying an egg.
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-4 visible-md-block visible-lg-block">
|
<div class="col-md-4 visible-md-block visible-lg-block">
|
||||||
<div class="download-btn"><a href="downloads/"
|
<div class="download-btn"><a href="downloads/"
|
||||||
|
@ -38,15 +38,18 @@ text:
|
||||||
<li><a href="https://twitter.com/getlektor"
|
<li><a href="https://twitter.com/getlektor"
|
||||||
class="twitter-follow-button" data-show-count="false"
|
class="twitter-follow-button" data-show-count="false"
|
||||||
data-size="large" data-dnt="true">Follow @getlektor</a>
|
data-size="large" data-dnt="true">Follow @getlektor</a>
|
||||||
|
</li>
|
||||||
<li><a class="github-button" href="https://github.com/lektor/lektor"
|
<li><a class="github-button" href="https://github.com/lektor/lektor"
|
||||||
data-style="mega" data-count-href="/lektor/lektor/stargazers"
|
data-style="mega" data-count-href="/lektor/lektor/stargazers"
|
||||||
data-count-api="/repos/lektor/lektor#stargazers_count"
|
data-count-api="/repos/lektor/lektor#stargazers_count"
|
||||||
data-count-aria-label="# stargazers on GitHub"
|
data-count-aria-label="# stargazers on GitHub"
|
||||||
aria-label="Star lektor/lektor on GitHub">Star</a>
|
aria-label="Star lektor/lektor on GitHub">Star</a>
|
||||||
|
</li>
|
||||||
<li><a href="https://gitter.im/lektor/lektor"
|
<li><a href="https://gitter.im/lektor/lektor"
|
||||||
class="js-gitter-toggle-chat-button"><img
|
class="js-gitter-toggle-chat-button"><img
|
||||||
src="https://badges.gitter.im/lektor/lektor.svg"
|
src="https://badges.gitter.im/lektor/lektor.svg"
|
||||||
alt="Join the chat at https://gitter.im/lektor/lektor"></a>
|
alt="Join the chat at https://gitter.im/lektor/lektor"></a>
|
||||||
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
#### text-block ####
|
#### text-block ####
|
||||||
|
@ -95,7 +98,7 @@ image: edit-post.png
|
||||||
description:
|
description:
|
||||||
|
|
||||||
The project files are neatly laid out in the filesystem and allow tracking
|
The project files are neatly laid out in the filesystem and allow tracking
|
||||||
via cloud storage or version control.
|
via cloud storage like Dropbox or version control.
|
||||||
-----
|
-----
|
||||||
image: filesystem.png
|
image: filesystem.png
|
||||||
##### slide #####
|
##### slide #####
|
||||||
|
|
|
@ -20,7 +20,7 @@ differs between Python and templates. In templates you have to use the
|
||||||
<ul>
|
<ul>
|
||||||
{% for item in this.children.filter(
|
{% for item in this.children.filter(
|
||||||
(F.type == 'hotel').and(F.stars >= 3)) %}
|
(F.type == 'hotel').and(F.stars >= 3)) %}
|
||||||
<li>{{ item.name }}: {{ item.stars }} stars
|
<li>{{ item.name }}: {{ item.stars }} stars</li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
</ul>
|
||||||
```
|
```
|
||||||
|
|
|
@ -19,7 +19,7 @@ contained in another string or a item can be contained within a list.
|
||||||
<h3>Projects Tagged 'amazing'</h3>
|
<h3>Projects Tagged 'amazing'</h3>
|
||||||
<ul>
|
<ul>
|
||||||
{% for item in this.children.filter(F.tags.contains('amazing')) %}
|
{% for item in this.children.filter(F.tags.contains('amazing')) %}
|
||||||
<li>{{ item.name }}
|
<li>{{ item.name }}</li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
</ul>
|
||||||
```
|
```
|
||||||
|
|
|
@ -18,7 +18,7 @@ see [endswith :ref](../endswith/).
|
||||||
```html+jinja
|
```html+jinja
|
||||||
<ul>
|
<ul>
|
||||||
{% for item in this.children.filter(F.name.endswith_cs('House')) %}
|
{% for item in this.children.filter(F.name.endswith_cs('House')) %}
|
||||||
<li>{{ item.name }}
|
<li>{{ item.name }}</li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
</ul>
|
||||||
```
|
```
|
||||||
|
|
|
@ -18,7 +18,7 @@ see [endswith_cs :ref](../endswith-cs/).
|
||||||
```html+jinja
|
```html+jinja
|
||||||
<ul>
|
<ul>
|
||||||
{% for item in this.children.filter(F.name.endswith('house')) %}
|
{% for item in this.children.filter(F.name.endswith('house')) %}
|
||||||
<li>{{ item.name }}
|
<li>{{ item.name }}</li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
</ul>
|
||||||
```
|
```
|
||||||
|
|
|
@ -15,7 +15,7 @@ Typically it compares if a value matches a specific value exactly:
|
||||||
<h2>Our Houses</h2>
|
<h2>Our Houses</h2>
|
||||||
<ul>
|
<ul>
|
||||||
{% for project in this.children.filter(F.type == 'house') %}
|
{% for project in this.children.filter(F.type == 'house') %}
|
||||||
<li>{{ project.name }}
|
<li>{{ project.name }}</li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
</ul>
|
||||||
```
|
```
|
||||||
|
|
|
@ -16,7 +16,7 @@ or equal to it. This behavior works best with [integers
|
||||||
<h3>3 or more Stars</h3>
|
<h3>3 or more Stars</h3>
|
||||||
<ul>
|
<ul>
|
||||||
{% for item in this.children.filter(F.stars >= 3) %}
|
{% for item in this.children.filter(F.stars >= 3) %}
|
||||||
<li>{{ item.name }}: {{ item.stars }} stars
|
<li>{{ item.name }}: {{ item.stars }} stars</li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
</ul>
|
||||||
```
|
```
|
||||||
|
|
|
@ -16,7 +16,7 @@ or [floats :ref](../../types/float/).
|
||||||
<h3>Well Rated Items</h3>
|
<h3>Well Rated Items</h3>
|
||||||
<ul>
|
<ul>
|
||||||
{% for item in this.children.filter(F.stars > 3) %}
|
{% for item in this.children.filter(F.stars > 3) %}
|
||||||
<li>{{ item.name }}: {{ item.stars }} stars
|
<li>{{ item.name }}: {{ item.stars }} stars</li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
</ul>
|
||||||
```
|
```
|
||||||
|
|
|
@ -16,7 +16,7 @@ or equal to it. This behavior works best with [integers
|
||||||
<h3>Projects From Before Including 2000</h3>
|
<h3>Projects From Before Including 2000</h3>
|
||||||
<ul>
|
<ul>
|
||||||
{% for item in this.children.filter(F.year <= 2000) %}
|
{% for item in this.children.filter(F.year <= 2000) %}
|
||||||
<li>{{ item.name }} ({{ item.year }})
|
<li>{{ item.name }} ({{ item.year }})</li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
</ul>
|
||||||
```
|
```
|
||||||
|
|
|
@ -16,7 +16,7 @@ or equal to it. This behavior works best with [integers
|
||||||
<h3>Projects From Before 2000</h3>
|
<h3>Projects From Before 2000</h3>
|
||||||
<ul>
|
<ul>
|
||||||
{% for item in this.children.filter(F.year < 2000) %}
|
{% for item in this.children.filter(F.year < 2000) %}
|
||||||
<li>{{ item.name }} ({{ item.year }})
|
<li>{{ item.name }} ({{ item.year }})</li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
</ul>
|
||||||
```
|
```
|
||||||
|
|
|
@ -15,7 +15,7 @@ by doing an exact comparison:
|
||||||
<h2>Everything Other Than Houses</h2>
|
<h2>Everything Other Than Houses</h2>
|
||||||
<ul>
|
<ul>
|
||||||
{% for project in this.children.filter(F.type != 'house') %}
|
{% for project in this.children.filter(F.type != 'house') %}
|
||||||
<li>{{ project.name }}
|
<li>{{ project.name }}</li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
</ul>
|
||||||
```
|
```
|
||||||
|
|
|
@ -20,7 +20,7 @@ differs between Python and templates. In templates you have to use the
|
||||||
<ul>
|
<ul>
|
||||||
{% for item in this.children.filter(
|
{% for item in this.children.filter(
|
||||||
(F.type == 'hotel').or(F.type == 'apartment')) %}
|
(F.type == 'hotel').or(F.type == 'apartment')) %}
|
||||||
<li>{{ item.name }} ({{ item.type}})
|
<li>{{ item.name }} ({{ item.type}})</li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
</ul>
|
||||||
```
|
```
|
||||||
|
|
|
@ -19,7 +19,7 @@ see [startswith :ref](../startswith/).
|
||||||
<h1>A</h1>
|
<h1>A</h1>
|
||||||
<ul>
|
<ul>
|
||||||
{% for item in this.children.filter(F.name.startswith_cs('A')) %}
|
{% for item in this.children.filter(F.name.startswith_cs('A')) %}
|
||||||
<li>{{ item.name }}
|
<li>{{ item.name }}</li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
</ul>
|
||||||
```
|
```
|
||||||
|
|
|
@ -19,7 +19,7 @@ see [startswith_cs :ref](../startswith-cs/).
|
||||||
<h1>A</h1>
|
<h1>A</h1>
|
||||||
<ul>
|
<ul>
|
||||||
{% for item in this.children.filter(F.name.startswith('a')) %}
|
{% for item in this.children.filter(F.name.startswith('a')) %}
|
||||||
<li>{{ item.name }}
|
<li>{{ item.name }}</li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
</ul>
|
||||||
```
|
```
|
||||||
|
|
|
@ -22,7 +22,7 @@ Accessing an attributes creates an [Expression :ref](../expression/).
|
||||||
```html+jinja
|
```html+jinja
|
||||||
<ul>
|
<ul>
|
||||||
{% for item in this.children.filter(F.status == 'published') %}
|
{% for item in this.children.filter(F.status == 'published') %}
|
||||||
<li>{{ item.title }}
|
<li>{{ item.title }}</li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
</ul>
|
||||||
```
|
```
|
||||||
|
|
|
@ -28,7 +28,7 @@ used to provide alts with a humand readable title.
|
||||||
<p>Other languages:
|
<p>Other languages:
|
||||||
<ul>
|
<ul>
|
||||||
{% for alt in get_alts(this) %}
|
{% for alt in get_alts(this) %}
|
||||||
<li><a href="{{ '.'|url(alt=alt) }}">{{ alt|title }}</a>
|
<li><a href="{{ '.'|url(alt=alt) }}">{{ alt|title }}</a></li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
</ul>
|
||||||
```
|
```
|
||||||
|
|
|
@ -18,7 +18,7 @@ and will also include hidden pages.
|
||||||
```html+jinja
|
```html+jinja
|
||||||
<ul>
|
<ul>
|
||||||
{% for project in site.query('/projects') %}
|
{% for project in site.query('/projects') %}
|
||||||
<li>{{ project.name }}: {{ project.year }}
|
<li>{{ project.name }}: {{ project.year }}</li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
</ul>
|
||||||
```
|
```
|
||||||
|
|
|
@ -18,7 +18,7 @@ handy.
|
||||||
{% if items %}
|
{% if items %}
|
||||||
<ul>
|
<ul>
|
||||||
{% for item in items %}
|
{% for item in items %}
|
||||||
<li>{{ item.name }}
|
<li>{{ item.name }}</li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
</ul>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
|
@ -22,7 +22,7 @@ Here a basic example of how to filter something in a template:
|
||||||
```html+jinja
|
```html+jinja
|
||||||
<ul>
|
<ul>
|
||||||
{% for item in this.children.filter(F.status == 'published') %}
|
{% for item in this.children.filter(F.status == 'published') %}
|
||||||
<li>{{ item.title }}
|
<li>{{ item.title }}</li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
</ul>
|
||||||
```
|
```
|
||||||
|
|
|
@ -22,7 +22,7 @@ Here a basic example of how to filter something in a template:
|
||||||
```html+jinja
|
```html+jinja
|
||||||
<ul>
|
<ul>
|
||||||
{% for item in this.children.filter(F.status == 'published') %}
|
{% for item in this.children.filter(F.status == 'published') %}
|
||||||
<li>{{ item.title }}
|
<li>{{ item.title }}</li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
</ul>
|
||||||
```
|
```
|
||||||
|
|
|
@ -24,7 +24,7 @@ Here a basic example of how to filter something in a template:
|
||||||
```html+jinja
|
```html+jinja
|
||||||
<ul>
|
<ul>
|
||||||
{% for item in this.children.include_hidden(true) %}
|
{% for item in this.children.include_hidden(true) %}
|
||||||
<li>{{ item.title }}{% if item.is_hidden %} (hidden){% endif %}
|
<li>{{ item.title }}{% if item.is_hidden %} (hidden){% endif %}</li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
</ul>
|
||||||
```
|
```
|
||||||
|
|
|
@ -25,7 +25,7 @@ Here a basic example of how to filter something in a template:
|
||||||
```html+jinja
|
```html+jinja
|
||||||
<ul>
|
<ul>
|
||||||
{% for item in this.children.include_undiscoverable(true) %}
|
{% for item in this.children.include_undiscoverable(true) %}
|
||||||
<li>{{ item.title }}
|
<li>{{ item.title }}</li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
</ul>
|
||||||
```
|
```
|
||||||
|
|
|
@ -17,7 +17,7 @@ of matching records.
|
||||||
<h3>Our Top 3</h3>
|
<h3>Our Top 3</h3>
|
||||||
<ul>
|
<ul>
|
||||||
{% for item in this.children.order_by('-rating').limit(3) %}
|
{% for item in this.children.order_by('-rating').limit(3) %}
|
||||||
<li>{{ item.title }}
|
<li>{{ item.title }}</li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
</ul>
|
||||||
```
|
```
|
||||||
|
|
|
@ -23,7 +23,7 @@ order by year and within a year it will order by name.
|
||||||
```html+jinja
|
```html+jinja
|
||||||
<ul>
|
<ul>
|
||||||
{% for project in this.children.order_by('-year', 'name') %}
|
{% for project in this.children.order_by('-year', 'name') %}
|
||||||
<li>{{ project.year }}: {{ project.name }}
|
<li>{{ project.year }}: {{ project.name }}</li>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</ul>
|
</ul>
|
||||||
```
|
```
|
||||||
|
|
|
@ -25,6 +25,7 @@ there is a good reason to use it.
|
||||||
<li>
|
<li>
|
||||||
Items on the first page of {{ child.title }}:
|
Items on the first page of {{ child.title }}:
|
||||||
{{ child.pagination.items.count() }}
|
{{ child.pagination.items.count() }}
|
||||||
|
</li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
</ul>
|
||||||
```
|
```
|
||||||
|
|
|
@ -27,7 +27,7 @@ via the [query :ref](../../pad/query/) method of the pad.
|
||||||
```html+jinja
|
```html+jinja
|
||||||
<ul>
|
<ul>
|
||||||
{% for child in this.children %}
|
{% for child in this.children %}
|
||||||
<li>{{ child.title }}
|
<li>{{ child.title }}</li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
</ul>
|
||||||
```
|
```
|
||||||
|
|
|
@ -19,7 +19,7 @@ The following attributes exist on the pagination object:
|
||||||
| ------------ | ------------
|
| ------------ | ------------
|
||||||
| `current` | The current record
|
| `current` | The current record
|
||||||
| `prev` | The record for the last page (might be `None`)
|
| `prev` | The record for the last page (might be `None`)
|
||||||
| `next` | The record for the net page (might be `None`)
|
| `next` | The record for the next page (might be `None`)
|
||||||
| `total` | The total number of items across all pages
|
| `total` | The total number of items across all pages
|
||||||
| `pages` | The total number of pages
|
| `pages` | The total number of pages
|
||||||
| `page` | The number of current page
|
| `page` | The number of current page
|
||||||
|
@ -42,7 +42,7 @@ page:
|
||||||
```html+jinja
|
```html+jinja
|
||||||
<ul>
|
<ul>
|
||||||
{% for child in this.pagination.items %}
|
{% for child in this.pagination.items %}
|
||||||
<li>{{ child.title }}
|
<li>{{ child.title }}</li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
</ul>
|
||||||
```
|
```
|
||||||
|
|
|
@ -17,7 +17,7 @@ a page that might use different independent models.
|
||||||
```html+jinja
|
```html+jinja
|
||||||
<ul>
|
<ul>
|
||||||
{% for child in this.children %}
|
{% for child in this.children %}
|
||||||
<li><a href="{{ child|url }}">{{ child.record_label }}</a>
|
<li><a href="{{ child|url }}">{{ child.record_label }}</a></li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
</ul>
|
||||||
```
|
```
|
||||||
|
|
|
@ -17,7 +17,7 @@ This field is most useful for filtering when operating on mixed collections.
|
||||||
```html+jinja
|
```html+jinja
|
||||||
<ul class="projects">
|
<ul class="projects">
|
||||||
{% for child in this.children.filter(F._model == 'project') %}
|
{% for child in this.children.filter(F._model == 'project') %}
|
||||||
<li>{{ child.name }}
|
<li>{{ child.name }}</li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
</ul>
|
||||||
```
|
```
|
||||||
|
|
|
@ -28,7 +28,7 @@ description = A list of things that would be good to buy
|
||||||
<h2>Shopping List</h2>
|
<h2>Shopping List</h2>
|
||||||
<ul>
|
<ul>
|
||||||
{% for item in this.things_to_buy %}
|
{% for item in this.things_to_buy %}
|
||||||
<li>{{ item }}
|
<li>{{ item }}</li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
</ul>
|
||||||
```
|
```
|
||||||
|
|
|
@ -32,8 +32,8 @@ the website.
|
||||||
|
|
||||||
```html+jinja
|
```html+jinja
|
||||||
<ul class="nav">
|
<ul class="nav">
|
||||||
<li><a href="{{ '/'|url }}">Index</a>
|
<li><a href="{{ '/'|url }}">Index</a></li>
|
||||||
<li><a href="{{ '/about'|url }}">About</a>
|
<li><a href="{{ '/about'|url }}">About</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
|
@ -102,6 +102,7 @@ page.
|
||||||
<a href="{{ post|url }}">{{ post.title }}</a> —
|
<a href="{{ post|url }}">{{ post.title }}</a> —
|
||||||
by {{ post.author }}
|
by {{ post.author }}
|
||||||
on {{ post.pub_date|dateformat }}
|
on {{ post.pub_date|dateformat }}
|
||||||
|
</li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
|
|
|
@ -197,7 +197,7 @@ markup that appears on multiple pages.
|
||||||
<ul>
|
<ul>
|
||||||
{% for category in site.query('/project-categories') %}
|
{% for category in site.query('/project-categories') %}
|
||||||
<li{% if category._id == active %} class="active"{% endif
|
<li{% if category._id == active %} class="active"{% endif
|
||||||
%}><a href="{{ category|url }}">{{ category.name }}</a>
|
%}><a href="{{ category|url }}">{{ category.name }}</a></li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
</ul>
|
||||||
{% endmacro %}
|
{% endmacro %}
|
||||||
|
@ -205,7 +205,7 @@ markup that appears on multiple pages.
|
||||||
{% macro render_project_list(projects) %}
|
{% macro render_project_list(projects) %}
|
||||||
<ul>
|
<ul>
|
||||||
{% for project in projects %}
|
{% for project in projects %}
|
||||||
<li><a href="{{ project|url }}">{{ project.name }}</a>
|
<li><a href="{{ project|url }}">{{ project.name }}</a></li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
</ul>
|
||||||
{% endmacro %}
|
{% endmacro %}
|
||||||
|
|
|
@ -65,6 +65,7 @@ create a `sitemap/contents.lr` file instead and use a template like
|
||||||
{% if page.children %}
|
{% if page.children %}
|
||||||
<ul>{{ loop(page.children) }}</ul>
|
<ul>{{ loop(page.children) }}</ul>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
</li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
</ul>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
|
@ -43,9 +43,14 @@ a flow.
|
||||||
## Templates
|
## Templates
|
||||||
|
|
||||||
Now that we have a model for our flow block, we need to create a template
|
Now that we have a model for our flow block, we need to create a template
|
||||||
for it. When a flow block is added to a Flow, it will automatically
|
for it. Templates for blocks are stored in the `blocks` subdirectory of the
|
||||||
render it by default through the template `blocks/NAME.html` (so in our
|
`templates` folder.
|
||||||
case `blocks/text.html`). Here is a suitable template for this:
|
The name for the block template is automatically derived from the config file
|
||||||
|
that keeps the flow block definition (`templates/blocks/NAME.html`):
|
||||||
|
In our case the expected template is `templates/blocks/text.html`,
|
||||||
|
as our flow block is defined in a file called `text.ini`.
|
||||||
|
|
||||||
|
Here is a suitable template for this:
|
||||||
|
|
||||||
```html+jinja
|
```html+jinja
|
||||||
<div class="text-block text-block-{{ this.class }}">
|
<div class="text-block text-block-{{ this.class }}">
|
||||||
|
|
|
@ -43,6 +43,7 @@ so they might not keep pace with development on Lektor.
|
||||||
* [tags :ext](https://github.com/ajdavis/lektor-tags): For each tag on site, build a list of pages with that tag.
|
* [tags :ext](https://github.com/ajdavis/lektor-tags): For each tag on site, build a list of pages with that tag.
|
||||||
* [i18n :ext](https://github.com/numericube/lektor-i18n-plugin): Use GetText .PO files to translate your site **content**.
|
* [i18n :ext](https://github.com/numericube/lektor-i18n-plugin): Use GetText .PO files to translate your site **content**.
|
||||||
* [htmlmin :ext](https://github.com/vesuvium/lektor-htmlmin): Automatically minifies .html files in build directory
|
* [htmlmin :ext](https://github.com/vesuvium/lektor-htmlmin): Automatically minifies .html files in build directory
|
||||||
|
* [creative-commons :ext](https://github.com/humrochagf/lektor-creative-commons): Add Creative Commons license to your pages
|
||||||
|
|
||||||
! Have your own plugin and you want to see it here? Just [edit this page
|
! Have your own plugin and you want to see it here? Just [edit this page
|
||||||
on GitHub :ref](https://github.com/lektor/lektor-website/edit/master/content/docs/plugins/list/contents.lr),
|
on GitHub :ref](https://github.com/lektor/lektor-website/edit/master/content/docs/plugins/list/contents.lr),
|
||||||
|
|
|
@ -32,7 +32,7 @@ some basic configuration for you.
|
||||||
If you want a video walkthrough you can have a look at the screencast which
|
If you want a video walkthrough you can have a look at the screencast which
|
||||||
explains the quickstart project a bit:
|
explains the quickstart project a bit:
|
||||||
|
|
||||||
<iframe width="100%" height=410 frameborder="0" allowfullscreen="allowfullscreen"
|
<iframe width="100%" height="410" frameborder="0" allowfullscreen="allowfullscreen"
|
||||||
src="https://www.youtube.com/embed/lTWTCwuPdrU?autoplay=0&fs=1">
|
src="https://www.youtube.com/embed/lTWTCwuPdrU?autoplay=0&fs=1">
|
||||||
</iframe>
|
</iframe>
|
||||||
|
|
||||||
|
|
|
@ -27,8 +27,8 @@ Because the path starts with a slash it will be treated as absolute path:
|
||||||
|
|
||||||
```html+jinja
|
```html+jinja
|
||||||
<ul class="nav">
|
<ul class="nav">
|
||||||
<li><a href="{{ '/'|url }}">Index</a>
|
<li><a href="{{ '/'|url }}">Index</a></li>
|
||||||
<li><a href="{{ '/about'|url }}">About</a>
|
<li><a href="{{ '/about'|url }}">About</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -59,7 +59,7 @@ link to all children of a page:
|
||||||
```html+jinja
|
```html+jinja
|
||||||
<ul class="nav">
|
<ul class="nav">
|
||||||
{% for page in this.children %}
|
{% for page in this.children %}
|
||||||
<li><a href="{{ page|url }}">{{ page.title }}</a>
|
<li><a href="{{ page|url }}">{{ page.title }}</a></li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
</ul>
|
||||||
```
|
```
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
There have been posts in the following years:
|
There have been posts in the following years:
|
||||||
<ul>
|
<ul>
|
||||||
{% for archive in this.year_archives %}
|
{% for archive in this.year_archives %}
|
||||||
<li><a href="{{ archive|url }}">{{ archive.year }}</a>
|
<li><a href="{{ archive|url }}">{{ archive.year }}</a></li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
</ul>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
<a href="{{ '..'|url }}">« Back to {{ this.year }}</a>
|
<a href="{{ '..'|url }}">« Back to {{ this.year }}</a>
|
||||||
<ul>
|
<ul>
|
||||||
{% for post in this.items %}
|
{% for post in this.items %}
|
||||||
<li><a href="{{ post|url }}">{{ post.title }}</a> by {{ post.author }} on {{ post.pub_date|dateformat }}
|
<li><a href="{{ post|url }}">{{ post.title }}</a> by {{ post.author }} on {{ post.pub_date|dateformat }}</li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
</ul>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
|
@ -10,9 +10,10 @@
|
||||||
<ul>
|
<ul>
|
||||||
{% for post in items %}
|
{% for post in items %}
|
||||||
<li><a href="{{ post|url }}">{{ post.title }}</a> by {{ post.author }}
|
<li><a href="{{ post|url }}">{{ post.title }}</a> by {{ post.author }}
|
||||||
on {{ post.pub_date|dateformat }}
|
on {{ post.pub_date|dateformat }}</li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
</ul>
|
||||||
|
</li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
</ul>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
|
@ -21,12 +21,12 @@
|
||||||
Subscribe for the latest news about Lektor as well as content
|
Subscribe for the latest news about Lektor as well as content
|
||||||
management and web development.
|
management and web development.
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="{{ '@atom/transcript'|url }}">RSS Feed</a>
|
<li><a href="{{ '@atom/transcript'|url }}">RSS Feed</a></li>
|
||||||
<li><a href="https://twitter.com/getlektor">Follow us on Twitter</a>
|
<li><a href="https://twitter.com/getlektor">Follow us on Twitter</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
<h3>Missed a Post?</h3>
|
<h3>Missed a Post?</h3>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="{{ '@blog-archive'|url }}">Blog Archives</a>
|
<li><a href="{{ '@blog-archive'|url }}">Blog Archives</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
<ul class="toc">
|
<ul class="toc">
|
||||||
{% for item in this.body.toc recursive %}
|
{% for item in this.body.toc recursive %}
|
||||||
<li><a href="#{{ item.anchor }}">{{ item.title }}</a>{%
|
<li><a href="#{{ item.anchor }}">{{ item.title }}</a>{%
|
||||||
if item.children %}<ul>{{ loop(item.children) }}</ul>{% endif %}
|
if item.children %}<ul>{{ loop(item.children) }}</ul>{% endif %}</li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
@ -35,19 +35,19 @@
|
||||||
|
|
||||||
<ul class=page-meta>
|
<ul class=page-meta>
|
||||||
{% if this.type == 'method' %}
|
{% if this.type == 'method' %}
|
||||||
<li>Method of {{ get_doc_link(this.parent) }}
|
<li>Method of {{ get_doc_link(this.parent) }}</li>
|
||||||
{% elif this.type == 'property' %}
|
{% elif this.type == 'property' %}
|
||||||
<li>Property of {{ get_doc_link(this.parent) }}
|
<li>Property of {{ get_doc_link(this.parent) }}</li>
|
||||||
{% elif this.type == 'operator' %}
|
{% elif this.type == 'operator' %}
|
||||||
<li>Operator of {{ get_doc_link(this.parent) }}
|
<li>Operator of {{ get_doc_link(this.parent) }}</li>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if this.template_var %}
|
{% if this.template_var %}
|
||||||
<li>Template variable: <a href="{{ (
|
<li>Template variable: <a href="{{ (
|
||||||
'/docs/api/templates/globals/' ~ this.template_var|lower ~ '/')|url
|
'/docs/api/templates/globals/' ~ this.template_var|lower ~ '/')|url
|
||||||
}}"><code>{{ this.template_var }}</code></a>
|
}}"><code>{{ this.template_var }}</code></a></li>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if this.version_added %}
|
{% if this.version_added %}
|
||||||
<li>New in Lektor Version <em>{{ this.version_added }}</em>
|
<li>New in Lektor Version <em>{{ this.version_added }}</em></li>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
<link rel="stylesheet" href="{{ '/static/styles.css'|asseturl }}">
|
<link rel="stylesheet" href="{{ '/static/styles.css'|asseturl }}">
|
||||||
<link rel="stylesheet" href="{{ get_pygments_stylesheet()|url }}">
|
<link rel="stylesheet" href="{{ get_pygments_stylesheet()|url }}">
|
||||||
|
<link rel="shortcut icon" href="{{ '/static/favicon.png'|asseturl }}">
|
||||||
<title>{% block title %}Hello{% endblock %} | Lektor Static Content Management System</title>
|
<title>{% block title %}Hello{% endblock %} | Lektor Static Content Management System</title>
|
||||||
<body class="{% block bodyclass %}default{% endblock %}">
|
<body class="{% block bodyclass %}default{% endblock %}">
|
||||||
<nav class="navbar navbar-inverse navbar-static-top">
|
<nav class="navbar navbar-inverse navbar-static-top">
|
||||||
|
|
Loading…
Reference in New Issue