Synchronized build

This commit is contained in:
Lektor Bot 2022-02-22 16:16:10 -08:00
parent c89085297a
commit 262af813cf
393 changed files with 1134 additions and 1222 deletions

View File

@ -4,7 +4,7 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link rel="stylesheet" href="static/styles.css?h=ca3aba42">
<link rel="stylesheet" href="static/styles.css?h=7041cc50">
<link rel="stylesheet" href="static/pygments.css">
<link rel="shortcut icon" href="static/favicon.png?h=fa09bedd">
<title>Page Not Found | Lektor Static Content Management System</title>
@ -117,7 +117,7 @@ is a mistake you can <a href="https://github.com/lektor/lektor-website/issues/ne
</footer>
<script type=text/javascript src="static/app.js?h=bb1b933a" charset="utf-8"></script>
<script type=text/javascript src="static/app.js?h=d85eb4b1" charset="utf-8"></script>
<script>
((window.gitter = {}).chat = {}).options = {
room: 'lektor/lektor',

View File

@ -4,7 +4,7 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link rel="stylesheet" href="../../../../static/styles.css?h=ca3aba42">
<link rel="stylesheet" href="../../../../static/styles.css?h=7041cc50">
<link rel="stylesheet" href="../../../../static/pygments.css">
<link rel="shortcut icon" href="../../../../static/favicon.png?h=fa09bedd">
<title>Hello Lektor! | The Transcript | Lektor Static Content Management System</title>
@ -223,7 +223,7 @@ about it.</p>
</footer>
<script type=text/javascript src="../../../../static/app.js?h=bb1b933a" charset="utf-8"></script>
<script type=text/javascript src="../../../../static/app.js?h=d85eb4b1" charset="utf-8"></script>
<script>
((window.gitter = {}).chat = {}).options = {
room: 'lektor/lektor',

View File

@ -4,7 +4,7 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link rel="stylesheet" href="../../../static/styles.css?h=ca3aba42">
<link rel="stylesheet" href="../../../static/styles.css?h=7041cc50">
<link rel="stylesheet" href="../../../static/pygments.css">
<link rel="shortcut icon" href="../../../static/favicon.png?h=fa09bedd">
<title>December 2015 Archive | The Transcript | Lektor Static Content Management System</title>
@ -122,7 +122,7 @@
</footer>
<script type=text/javascript src="../../../static/app.js?h=bb1b933a" charset="utf-8"></script>
<script type=text/javascript src="../../../static/app.js?h=d85eb4b1" charset="utf-8"></script>
<script>
((window.gitter = {}).chat = {}).options = {
room: 'lektor/lektor',

View File

@ -4,7 +4,7 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link rel="stylesheet" href="../../../../static/styles.css?h=ca3aba42">
<link rel="stylesheet" href="../../../../static/styles.css?h=7041cc50">
<link rel="stylesheet" href="../../../../static/pygments.css">
<link rel="shortcut icon" href="../../../../static/favicon.png?h=fa09bedd">
<title>Lektor Loves Travis-CI and GitHub Pages | The Transcript | Lektor Static Content Management System</title>
@ -157,7 +157,7 @@ a screencast that goes with it:</p>
</footer>
<script type=text/javascript src="../../../../static/app.js?h=bb1b933a" charset="utf-8"></script>
<script type=text/javascript src="../../../../static/app.js?h=d85eb4b1" charset="utf-8"></script>
<script>
((window.gitter = {}).chat = {}).options = {
room: 'lektor/lektor',

View File

@ -4,7 +4,7 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link rel="stylesheet" href="../../static/styles.css?h=ca3aba42">
<link rel="stylesheet" href="../../static/styles.css?h=7041cc50">
<link rel="stylesheet" href="../../static/pygments.css">
<link rel="shortcut icon" href="../../static/favicon.png?h=fa09bedd">
<title>2015 Archive | The Transcript | Lektor Static Content Management System</title>
@ -130,7 +130,7 @@
</footer>
<script type=text/javascript src="../../static/app.js?h=bb1b933a" charset="utf-8"></script>
<script type=text/javascript src="../../static/app.js?h=d85eb4b1" charset="utf-8"></script>
<script>
((window.gitter = {}).chat = {}).options = {
room: 'lektor/lektor',

View File

@ -4,7 +4,7 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link rel="stylesheet" href="../../../static/styles.css?h=ca3aba42">
<link rel="stylesheet" href="../../../static/styles.css?h=7041cc50">
<link rel="stylesheet" href="../../../static/pygments.css">
<link rel="shortcut icon" href="../../../static/favicon.png?h=fa09bedd">
<title>March 2016 Archive | The Transcript | Lektor Static Content Management System</title>
@ -122,7 +122,7 @@
</footer>
<script type=text/javascript src="../../../static/app.js?h=bb1b933a" charset="utf-8"></script>
<script type=text/javascript src="../../../static/app.js?h=d85eb4b1" charset="utf-8"></script>
<script>
((window.gitter = {}).chat = {}).options = {
room: 'lektor/lektor',

View File

@ -4,7 +4,7 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link rel="stylesheet" href="../../../../static/styles.css?h=ca3aba42">
<link rel="stylesheet" href="../../../../static/styles.css?h=7041cc50">
<link rel="stylesheet" href="../../../../static/pygments.css">
<link rel="shortcut icon" href="../../../../static/favicon.png?h=fa09bedd">
<title>Lektor at Rails Girls Summer of Code 2016 | The Transcript | Lektor Static Content Management System</title>
@ -166,7 +166,7 @@ class="js-gitter-toggle-chat-button">Gitter</a>.</p>
</footer>
<script type=text/javascript src="../../../../static/app.js?h=bb1b933a" charset="utf-8"></script>
<script type=text/javascript src="../../../../static/app.js?h=d85eb4b1" charset="utf-8"></script>
<script>
((window.gitter = {}).chat = {}).options = {
room: 'lektor/lektor',

View File

@ -4,7 +4,7 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link rel="stylesheet" href="../../../../static/styles.css?h=ca3aba42">
<link rel="stylesheet" href="../../../../static/styles.css?h=7041cc50">
<link rel="stylesheet" href="../../../../static/pygments.css">
<link rel="shortcut icon" href="../../../../static/favicon.png?h=fa09bedd">
<title>Road to Lektor 2.0 | The Transcript | Lektor Static Content Management System</title>
@ -185,7 +185,7 @@ source tree. For instance you can build feeds, blog archives etc.</li>
</footer>
<script type=text/javascript src="../../../../static/app.js?h=bb1b933a" charset="utf-8"></script>
<script type=text/javascript src="../../../../static/app.js?h=d85eb4b1" charset="utf-8"></script>
<script>
((window.gitter = {}).chat = {}).options = {
room: 'lektor/lektor',

View File

@ -4,7 +4,7 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link rel="stylesheet" href="../../../static/styles.css?h=ca3aba42">
<link rel="stylesheet" href="../../../static/styles.css?h=7041cc50">
<link rel="stylesheet" href="../../../static/pygments.css">
<link rel="shortcut icon" href="../../../static/favicon.png?h=fa09bedd">
<title>April 2016 Archive | The Transcript | Lektor Static Content Management System</title>
@ -120,7 +120,7 @@
</footer>
<script type=text/javascript src="../../../static/app.js?h=bb1b933a" charset="utf-8"></script>
<script type=text/javascript src="../../../static/app.js?h=d85eb4b1" charset="utf-8"></script>
<script>
((window.gitter = {}).chat = {}).options = {
room: 'lektor/lektor',

View File

@ -4,7 +4,7 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link rel="stylesheet" href="../../../../static/styles.css?h=ca3aba42">
<link rel="stylesheet" href="../../../../static/styles.css?h=7041cc50">
<link rel="stylesheet" href="../../../../static/pygments.css">
<link rel="shortcut icon" href="../../../../static/favicon.png?h=fa09bedd">
<title>Lektor 2.0 Released | The Transcript | Lektor Static Content Management System</title>
@ -206,7 +206,7 @@ the already existing one.</p>
</footer>
<script type=text/javascript src="../../../../static/app.js?h=bb1b933a" charset="utf-8"></script>
<script type=text/javascript src="../../../../static/app.js?h=d85eb4b1" charset="utf-8"></script>
<script>
((window.gitter = {}).chat = {}).options = {
room: 'lektor/lektor',

View File

@ -4,7 +4,7 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link rel="stylesheet" href="../../static/styles.css?h=ca3aba42">
<link rel="stylesheet" href="../../static/styles.css?h=7041cc50">
<link rel="stylesheet" href="../../static/pygments.css">
<link rel="shortcut icon" href="../../static/favicon.png?h=fa09bedd">
<title>2016 Archive | The Transcript | Lektor Static Content Management System</title>
@ -139,7 +139,7 @@
</footer>
<script type=text/javascript src="../../static/app.js?h=bb1b933a" charset="utf-8"></script>
<script type=text/javascript src="../../static/app.js?h=d85eb4b1" charset="utf-8"></script>
<script>
((window.gitter = {}).chat = {}).options = {
room: 'lektor/lektor',

View File

@ -4,7 +4,7 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link rel="stylesheet" href="../../../static/styles.css?h=ca3aba42">
<link rel="stylesheet" href="../../../static/styles.css?h=7041cc50">
<link rel="stylesheet" href="../../../static/pygments.css">
<link rel="shortcut icon" href="../../../static/favicon.png?h=fa09bedd">
<title>January 2018 Archive | The Transcript | Lektor Static Content Management System</title>
@ -120,7 +120,7 @@
</footer>
<script type=text/javascript src="../../../static/app.js?h=bb1b933a" charset="utf-8"></script>
<script type=text/javascript src="../../../static/app.js?h=d85eb4b1" charset="utf-8"></script>
<script>
((window.gitter = {}).chat = {}).options = {
room: 'lektor/lektor',

View File

@ -4,7 +4,7 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link rel="stylesheet" href="../../../../static/styles.css?h=ca3aba42">
<link rel="stylesheet" href="../../../../static/styles.css?h=7041cc50">
<link rel="stylesheet" href="../../../../static/pygments.css">
<link rel="shortcut icon" href="../../../../static/favicon.png?h=fa09bedd">
<title>Lektor 3.1 Released | The Transcript | Lektor Static Content Management System</title>
@ -162,7 +162,7 @@
</footer>
<script type=text/javascript src="../../../../static/app.js?h=bb1b933a" charset="utf-8"></script>
<script type=text/javascript src="../../../../static/app.js?h=d85eb4b1" charset="utf-8"></script>
<script>
((window.gitter = {}).chat = {}).options = {
room: 'lektor/lektor',

View File

@ -4,7 +4,7 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link rel="stylesheet" href="../../../static/styles.css?h=ca3aba42">
<link rel="stylesheet" href="../../../static/styles.css?h=7041cc50">
<link rel="stylesheet" href="../../../static/pygments.css">
<link rel="shortcut icon" href="../../../static/favicon.png?h=fa09bedd">
<title>May 2018 Archive | The Transcript | Lektor Static Content Management System</title>
@ -120,7 +120,7 @@
</footer>
<script type=text/javascript src="../../../static/app.js?h=bb1b933a" charset="utf-8"></script>
<script type=text/javascript src="../../../static/app.js?h=d85eb4b1" charset="utf-8"></script>
<script>
((window.gitter = {}).chat = {}).options = {
room: 'lektor/lektor',

View File

@ -4,7 +4,7 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link rel="stylesheet" href="../../../../static/styles.css?h=ca3aba42">
<link rel="stylesheet" href="../../../../static/styles.css?h=7041cc50">
<link rel="stylesheet" href="../../../../static/pygments.css">
<link rel="shortcut icon" href="../../../../static/favicon.png?h=fa09bedd">
<title>Plugin Play | The Transcript | Lektor Static Content Management System</title>
@ -151,7 +151,7 @@
</footer>
<script type=text/javascript src="../../../../static/app.js?h=bb1b933a" charset="utf-8"></script>
<script type=text/javascript src="../../../../static/app.js?h=d85eb4b1" charset="utf-8"></script>
<script>
((window.gitter = {}).chat = {}).options = {
room: 'lektor/lektor',

View File

@ -4,7 +4,7 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link rel="stylesheet" href="../../static/styles.css?h=ca3aba42">
<link rel="stylesheet" href="../../static/styles.css?h=7041cc50">
<link rel="stylesheet" href="../../static/pygments.css">
<link rel="shortcut icon" href="../../static/favicon.png?h=fa09bedd">
<title>2018 Archive | The Transcript | Lektor Static Content Management System</title>
@ -136,7 +136,7 @@
</footer>
<script type=text/javascript src="../../static/app.js?h=bb1b933a" charset="utf-8"></script>
<script type=text/javascript src="../../static/app.js?h=d85eb4b1" charset="utf-8"></script>
<script>
((window.gitter = {}).chat = {}).options = {
room: 'lektor/lektor',

View File

@ -4,7 +4,7 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link rel="stylesheet" href="../../../static/styles.css?h=ca3aba42">
<link rel="stylesheet" href="../../../static/styles.css?h=7041cc50">
<link rel="stylesheet" href="../../../static/pygments.css">
<link rel="shortcut icon" href="../../../static/favicon.png?h=fa09bedd">
<title>August 2020 Archive | The Transcript | Lektor Static Content Management System</title>
@ -120,7 +120,7 @@
</footer>
<script type=text/javascript src="../../../static/app.js?h=bb1b933a" charset="utf-8"></script>
<script type=text/javascript src="../../../static/app.js?h=d85eb4b1" charset="utf-8"></script>
<script>
((window.gitter = {}).chat = {}).options = {
room: 'lektor/lektor',

View File

@ -4,7 +4,7 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link rel="stylesheet" href="../../../../static/styles.css?h=ca3aba42">
<link rel="stylesheet" href="../../../../static/styles.css?h=7041cc50">
<link rel="stylesheet" href="../../../../static/pygments.css">
<link rel="shortcut icon" href="../../../../static/favicon.png?h=fa09bedd">
<title>Lektor 3.2 Released | The Transcript | Lektor Static Content Management System</title>
@ -180,7 +180,7 @@
</footer>
<script type=text/javascript src="../../../../static/app.js?h=bb1b933a" charset="utf-8"></script>
<script type=text/javascript src="../../../../static/app.js?h=d85eb4b1" charset="utf-8"></script>
<script>
((window.gitter = {}).chat = {}).options = {
room: 'lektor/lektor',

View File

@ -4,7 +4,7 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link rel="stylesheet" href="../../static/styles.css?h=ca3aba42">
<link rel="stylesheet" href="../../static/styles.css?h=7041cc50">
<link rel="stylesheet" href="../../static/pygments.css">
<link rel="shortcut icon" href="../../static/favicon.png?h=fa09bedd">
<title>2020 Archive | The Transcript | Lektor Static Content Management System</title>
@ -127,7 +127,7 @@
</footer>
<script type=text/javascript src="../../static/app.js?h=bb1b933a" charset="utf-8"></script>
<script type=text/javascript src="../../static/app.js?h=d85eb4b1" charset="utf-8"></script>
<script>
((window.gitter = {}).chat = {}).options = {
room: 'lektor/lektor',

View File

@ -4,7 +4,7 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link rel="stylesheet" href="../../static/styles.css?h=ca3aba42">
<link rel="stylesheet" href="../../static/styles.css?h=7041cc50">
<link rel="stylesheet" href="../../static/pygments.css">
<link rel="shortcut icon" href="../../static/favicon.png?h=fa09bedd">
<title>Archive | The Transcript | Lektor Static Content Management System</title>
@ -128,7 +128,7 @@
</footer>
<script type=text/javascript src="../../static/app.js?h=bb1b933a" charset="utf-8"></script>
<script type=text/javascript src="../../static/app.js?h=d85eb4b1" charset="utf-8"></script>
<script>
((window.gitter = {}).chat = {}).options = {
room: 'lektor/lektor',

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom"><title>The Transcript</title><link href="https://www.getlektor.com/blog/" rel="alternate"></link><link href="https://www.getlektor.com/blog/feed.xml" rel="self"></link><id>urn:uuid:ba2c0c5f-e742-36a4-a184-2b9e5f2282bb</id><updated>2020-08-20T00:00:00Z</updated><author><name></name></author><subtitle>Lektor's blog</subtitle><entry><title>Lektor 3.2 Released</title><link href="https://www.getlektor.com/blog/2020/8/lektor-32-released/" rel="alternate"></link><updated>2020-08-20T00:00:00Z</updated><author><name>Andreas Runfalk</name></author><id>urn:uuid:c70ce082-4b32-3a99-9052-691daaf6033a</id><content type="html">
<feed xmlns="http://www.w3.org/2005/Atom"><title>The Transcript</title><link href="https://www.getlektor.com/blog/" rel="alternate"></link><link href="https://www.getlektor.com/blog/feed.xml" rel="self"></link><id>urn:uuid:518bb905-3b5d-3e7f-a077-0fe42e244643</id><updated>2020-08-20T00:00:00Z</updated><author><name></name></author><subtitle>Lektor's blog</subtitle><entry><title>Lektor 3.2 Released</title><link href="https://www.getlektor.com/blog/2020/8/lektor-32-released/" rel="alternate"></link><updated>2020-08-20T00:00:00Z</updated><author><name>Andreas Runfalk</name></author><id>urn:uuid:bda34097-438e-31f2-89cb-ced8bbb15d42</id><content type="html">
&lt;div class="page-banner page-banner-500" style="background-image: url(coffee-ground-1171092-1599x1066.jpg)"&gt;&lt;/div&gt;
&lt;div class="text-block text-block-default"&gt;
@ -43,7 +43,7 @@
&lt;li&gt;Changed default slug creation to use &lt;a href="https://github.com/un33k/python-slugify"&gt;python-slugify&lt;/a&gt;. This should mean greater language support, but this may produce slightly different results than before for some users (thank you &lt;a href="https://github.com/nixjdm"&gt;Joseph Nix&lt;/a&gt; and &lt;a href="https://github.com/xlotlu"&gt;Ionuț Ciocîrlan&lt;/a&gt;)&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;</content></entry><entry><title>Plugin Play</title><link href="https://www.getlektor.com/blog/2018/5/plugin-play/" rel="alternate"></link><updated>2018-05-15T00:00:00Z</updated><author><name>Joseph Nix</name></author><id>urn:uuid:a10aa9d1-b8c4-381e-ae4f-17e101f15466</id><content type="html">
&lt;/div&gt;</content></entry><entry><title>Plugin Play</title><link href="https://www.getlektor.com/blog/2018/5/plugin-play/" rel="alternate"></link><updated>2018-05-15T00:00:00Z</updated><author><name>Joseph Nix</name></author><id>urn:uuid:8d30b004-241d-316f-ac13-f8b883a9c127</id><content type="html">
&lt;div class="page-banner page-banner-300" style="background-image: url(spices.jpg)"&gt;&lt;/div&gt;
&lt;div class="text-block text-block-default"&gt;
@ -54,7 +54,7 @@
&lt;p&gt;I think this is especially useful for plugin development when the tag is an event that the plugin hooks. This allows you to quickly find the source code of plugins that depend on the same Lektor plugin events, so that you can see many quick examples to help you write your own plugin. For instance, you can find all of the plugins that hook the &lt;code&gt;before-build-all&lt;/code&gt; event by looking at it's tag page &lt;a href="/plugins/tag/before-build-all/"&gt;here&lt;/a&gt;. Tag pages for events also have links back to the plugin documentation pages, including the page for that specific event.&lt;/p&gt;
&lt;p&gt;Now go check out some &lt;a href="/plugins"&gt;plugins&lt;/a&gt;!&lt;/p&gt;
&lt;/div&gt;</content></entry><entry><title>Lektor 3.1 Released</title><link href="https://www.getlektor.com/blog/2018/1/lektor-31-released/" rel="alternate"></link><updated>2018-01-29T00:00:00Z</updated><author><name>Joseph Nix</name></author><id>urn:uuid:eff20a81-ee57-3c93-ad4b-13ef7b6369cf</id><content type="html">
&lt;/div&gt;</content></entry><entry><title>Lektor 3.1 Released</title><link href="https://www.getlektor.com/blog/2018/1/lektor-31-released/" rel="alternate"></link><updated>2018-01-29T00:00:00Z</updated><author><name>Joseph Nix</name></author><id>urn:uuid:69465c44-ef86-3fd7-8939-ba9870ae5d0e</id><content type="html">
&lt;div class="page-banner page-banner-500-tall" style="background-image: url(pancakes-2020863.jpg)"&gt;&lt;/div&gt;
&lt;div class="text-block text-block-default"&gt;
@ -76,7 +76,7 @@
&lt;h2 id="want-to-contribute"&gt;Want to Contribute?&lt;/h2&gt;&lt;p&gt;Open Source Software lives and dies by the communities that use them, love them, and support them. If you're a developer looking to get your feet wet in OSS, we'd love to review your pull request. &amp;lt;3&lt;/p&gt;
&lt;p&gt;A larger task, if you're someone with React (and Python) knowledge, is our admin interface. It has served us pretty well so far, but it also has &lt;a href="https://github.com/lektor/lektor/issues/458"&gt;some issues&lt;/a&gt;. It could use some TLC.&lt;/p&gt;
&lt;/div&gt;</content></entry><entry><title>Lektor 2.0 Released</title><link href="https://www.getlektor.com/blog/2016/4/lektor-2-released/" rel="alternate"></link><updated>2016-04-11T00:00:00Z</updated><author><name>Armin Ronacher</name></author><id>urn:uuid:5588c5e7-cabd-3118-b6e8-b20b9324f814</id><content type="html">
&lt;/div&gt;</content></entry><entry><title>Lektor 2.0 Released</title><link href="https://www.getlektor.com/blog/2016/4/lektor-2-released/" rel="alternate"></link><updated>2016-04-11T00:00:00Z</updated><author><name>Armin Ronacher</name></author><id>urn:uuid:3f52ad2e-4cac-3199-a947-33ea8e54c28e</id><content type="html">
&lt;div class="page-banner page-banner-500" style="background-image: url(banner.jpg)"&gt;&lt;/div&gt;
&lt;div class="text-block text-block-default"&gt;
@ -142,7 +142,7 @@ If you had a previous version of Lektor the install process should auto
upgrade. If you use the OS X desktop build, just drag the new application over
the already existing one.&lt;/p&gt;
&lt;/div&gt;</content></entry><entry><title>Lektor at Rails Girls Summer of Code 2016</title><link href="https://www.getlektor.com/blog/2016/3/lektor-at-rails-girls-summer-of-code/" rel="alternate"></link><updated>2016-03-17T00:00:00Z</updated><author><name>Armin Ronacher</name></author><id>urn:uuid:e50b8ae4-067c-3841-9d45-5abad5c5455a</id><content type="html">
&lt;/div&gt;</content></entry><entry><title>Lektor at Rails Girls Summer of Code 2016</title><link href="https://www.getlektor.com/blog/2016/3/lektor-at-rails-girls-summer-of-code/" rel="alternate"></link><updated>2016-03-17T00:00:00Z</updated><author><name>Armin Ronacher</name></author><id>urn:uuid:66064267-4071-3a00-9ca3-afbb0ce6d809</id><content type="html">
&lt;div class="page-banner page-banner-500" style="background-image: url(banner.jpg)"&gt;&lt;/div&gt;
&lt;div class="text-block text-block-default"&gt;
@ -168,7 +168,7 @@ Twitter at &lt;a href="https://twitter.com/getlektor"&gt;@getlektor&lt;/a&gt; or
&lt;a href="https://gitter.im/lektor/lektor"
class="js-gitter-toggle-chat-button"&gt;Gitter&lt;/a&gt;.&lt;/p&gt;
&lt;/div&gt;</content></entry><entry><title>Road to Lektor 2.0</title><link href="https://www.getlektor.com/blog/2016/3/road-to-lektor-2/" rel="alternate"></link><updated>2016-03-10T00:00:00Z</updated><author><name>Armin Ronacher</name></author><id>urn:uuid:c3f89a5c-5503-3f0d-9725-933145c96f57</id><content type="html">
&lt;/div&gt;</content></entry><entry><title>Road to Lektor 2.0</title><link href="https://www.getlektor.com/blog/2016/3/road-to-lektor-2/" rel="alternate"></link><updated>2016-03-10T00:00:00Z</updated><author><name>Armin Ronacher</name></author><id>urn:uuid:743bf9a7-c69a-3dd8-b929-efe3459717a8</id><content type="html">
&lt;div class="page-banner page-banner-500" style="background-image: url(header.jpg)"&gt;&lt;/div&gt;
&lt;div class="text-block text-block-default"&gt;
@ -213,7 +213,7 @@ now build custom build programs that build things that do not exist in the
source tree. For instance you can build feeds, blog archives etc.&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;</content></entry><entry><title>Lektor Loves Travis-CI and GitHub Pages</title><link href="https://www.getlektor.com/blog/2015/12/travis-and-ghpages/" rel="alternate"></link><updated>2015-12-23T00:00:00Z</updated><author><name>Armin Ronacher</name></author><id>urn:uuid:269329ed-591d-3721-9d49-924dccec040e</id><content type="html">
&lt;/div&gt;</content></entry><entry><title>Lektor Loves Travis-CI and GitHub Pages</title><link href="https://www.getlektor.com/blog/2015/12/travis-and-ghpages/" rel="alternate"></link><updated>2015-12-23T00:00:00Z</updated><author><name>Armin Ronacher</name></author><id>urn:uuid:39db4502-8f95-316b-b168-c46e804f08bd</id><content type="html">
&lt;div class="page-banner page-banner-500" style="background-image: url(header.jpg)"&gt;&lt;/div&gt;
&lt;div class="text-block text-block-default"&gt;
@ -230,7 +230,7 @@ a screencast that goes with it:&lt;/p&gt;
&lt;iframe width="100%" height=410 frameborder="0" allowfullscreen="allowfullscreen"
src="https://www.youtube.com/embed/3pj_EyZIL5A?autoplay=0&amp;fs=1"&gt;
&lt;/iframe&gt;
&lt;/div&gt;</content></entry><entry><title>Hello Lektor!</title><link href="https://www.getlektor.com/blog/2015/12/hello-lektor/" rel="alternate"></link><updated>2015-12-21T00:00:00Z</updated><author><name>Armin Ronacher</name></author><id>urn:uuid:7bca6045-8f90-31b1-9ed8-5757a4c665c6</id><content type="html">
&lt;/div&gt;</content></entry><entry><title>Hello Lektor!</title><link href="https://www.getlektor.com/blog/2015/12/hello-lektor/" rel="alternate"></link><updated>2015-12-21T00:00:00Z</updated><author><name>Armin Ronacher</name></author><id>urn:uuid:a546fbfc-f76c-370c-8cde-6e378c9b0683</id><content type="html">
&lt;div class="page-banner page-banner-500" style="background-image: url(banner.jpg)"&gt;&lt;/div&gt;
&lt;div class="text-block text-block-default"&gt;

View File

@ -4,7 +4,7 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link rel="stylesheet" href="../static/styles.css?h=ca3aba42">
<link rel="stylesheet" href="../static/styles.css?h=7041cc50">
<link rel="stylesheet" href="../static/pygments.css">
<link rel="shortcut icon" href="../static/favicon.png?h=fa09bedd">
<title>The Transcript | Lektor Static Content Management System</title>
@ -229,7 +229,7 @@ new paradigm for developing beautiful websites.
</footer>
<script type=text/javascript src="../static/app.js?h=bb1b933a" charset="utf-8"></script>
<script type=text/javascript src="../static/app.js?h=d85eb4b1" charset="utf-8"></script>
<script>
((window.gitter = {}).chat = {}).options = {
room: 'lektor/lektor',

View File

@ -4,7 +4,7 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link rel="stylesheet" href="../static/styles.css?h=ca3aba42">
<link rel="stylesheet" href="../static/styles.css?h=7041cc50">
<link rel="stylesheet" href="../static/pygments.css">
<link rel="shortcut icon" href="../static/favicon.png?h=fa09bedd">
<title>Community | Lektor Static Content Management System</title>
@ -132,7 +132,7 @@
</footer>
<script type=text/javascript src="../static/app.js?h=bb1b933a" charset="utf-8"></script>
<script type=text/javascript src="../static/app.js?h=d85eb4b1" charset="utf-8"></script>
<script>
((window.gitter = {}).chat = {}).options = {
room: 'lektor/lektor',

View File

@ -4,7 +4,7 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link rel="stylesheet" href="../static/styles.css?h=ca3aba42">
<link rel="stylesheet" href="../static/styles.css?h=7041cc50">
<link rel="stylesheet" href="../static/pygments.css">
<link rel="shortcut icon" href="../static/favicon.png?h=fa09bedd">
<title>Contact | Lektor Static Content Management System</title>
@ -122,7 +122,7 @@ E-Mail: <a href="mailto:armin@ronacher.eu">armin@ronacher.eu</a></p>
</footer>
<script type=text/javascript src="../static/app.js?h=bb1b933a" charset="utf-8"></script>
<script type=text/javascript src="../static/app.js?h=d85eb4b1" charset="utf-8"></script>
<script>
((window.gitter = {}).chat = {}).options = {
room: 'lektor/lektor',

View File

@ -4,7 +4,7 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link rel="stylesheet" href="../../../../../static/styles.css?h=ca3aba42">
<link rel="stylesheet" href="../../../../../static/styles.css?h=7041cc50">
<link rel="stylesheet" href="../../../../../static/pygments.css">
<link rel="shortcut icon" href="../../../../../static/favicon.png?h=fa09bedd">
<title>artifact_name | Documentation | Lektor Static Content Management System</title>
@ -250,7 +250,7 @@ the artifact name from different sources.</p>
</footer>
<script type=text/javascript src="../../../../../static/app.js?h=bb1b933a" charset="utf-8"></script>
<script type=text/javascript src="../../../../../static/app.js?h=d85eb4b1" charset="utf-8"></script>
<script>
((window.gitter = {}).chat = {}).options = {
room: 'lektor/lektor',

View File

@ -4,7 +4,7 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link rel="stylesheet" href="../../../../static/styles.css?h=ca3aba42">
<link rel="stylesheet" href="../../../../static/styles.css?h=7041cc50">
<link rel="stylesheet" href="../../../../static/pygments.css">
<link rel="shortcut icon" href="../../../../static/favicon.png?h=fa09bedd">
<title>Artifact | Documentation | Lektor Static Content Management System</title>
@ -196,7 +196,7 @@ instances.</p>
<p>The most important function of an artifact is <a href="open/" class="ref">open</a> which can
open the artifact for reading or writing. If the build goes well, Lektor
will commit those changes and persist them.</p>
<h2 id="example">Example</h2><div class="hll"><pre><span></span><span class="n">ctx</span> <span class="o">=</span> <span class="n">get_ctx</span><span class="p">()</span>
<h2 id="example">Example</h2><div class="highlight"><pre><span></span><span class="n">ctx</span> <span class="o">=</span> <span class="n">get_ctx</span><span class="p">()</span>
<span class="nd">@ctx</span><span class="o">.</span><span class="n">sub_artifact</span><span class="p">(</span><span class="s1">&#39;artifact.txt&#39;</span><span class="p">)</span>
<span class="k">def</span> <span class="nf">build_stylesheet</span><span class="p">(</span><span class="n">artifact</span><span class="p">):</span>
<span class="k">with</span> <span class="n">artifact</span><span class="o">.</span><span class="n">open</span><span class="p">(</span><span class="s1">&#39;w&#39;</span><span class="p">)</span> <span class="k">as</span> <span class="n">f</span><span class="p">:</span>
@ -345,7 +345,7 @@ will commit those changes and persist them.</p>
</footer>
<script type=text/javascript src="../../../../static/app.js?h=bb1b933a" charset="utf-8"></script>
<script type=text/javascript src="../../../../static/app.js?h=d85eb4b1" charset="utf-8"></script>
<script>
((window.gitter = {}).chat = {}).options = {
room: 'lektor/lektor',

View File

@ -4,7 +4,7 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link rel="stylesheet" href="../../../../../static/styles.css?h=ca3aba42">
<link rel="stylesheet" href="../../../../../static/styles.css?h=7041cc50">
<link rel="stylesheet" href="../../../../../static/pygments.css">
<link rel="shortcut icon" href="../../../../../static/favicon.png?h=fa09bedd">
<title>is_current | Documentation | Lektor Static Content Management System</title>
@ -251,7 +251,7 @@ artifact is not current.</p>
</footer>
<script type=text/javascript src="../../../../../static/app.js?h=bb1b933a" charset="utf-8"></script>
<script type=text/javascript src="../../../../../static/app.js?h=d85eb4b1" charset="utf-8"></script>
<script>
((window.gitter = {}).chat = {}).options = {
room: 'lektor/lektor',

View File

@ -4,7 +4,7 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link rel="stylesheet" href="../../../../../static/styles.css?h=ca3aba42">
<link rel="stylesheet" href="../../../../../static/styles.css?h=7041cc50">
<link rel="stylesheet" href="../../../../../static/pygments.css">
<link rel="shortcut icon" href="../../../../../static/favicon.png?h=fa09bedd">
<title>open | Documentation | Lektor Static Content Management System</title>
@ -196,7 +196,7 @@ automatically is created. This can be disabled or enabled with the
<p>If the artifact is opened for writing, a copy will be created and only
committed when the entire build process goes through smoothly and the
changes are committed by the builder.</p>
<h2 id="example">Example</h2><div class="hll"><pre><span></span><span class="n">ctx</span> <span class="o">=</span> <span class="n">get_ctx</span><span class="p">()</span>
<h2 id="example">Example</h2><div class="highlight"><pre><span></span><span class="n">ctx</span> <span class="o">=</span> <span class="n">get_ctx</span><span class="p">()</span>
<span class="nd">@ctx</span><span class="o">.</span><span class="n">sub_artifact</span><span class="p">(</span><span class="s1">&#39;artifact.txt&#39;</span><span class="p">)</span>
<span class="k">def</span> <span class="nf">build_stylesheet</span><span class="p">(</span><span class="n">artifact</span><span class="p">):</span>
<span class="k">with</span> <span class="n">artifact</span><span class="o">.</span><span class="n">open</span><span class="p">(</span><span class="s1">&#39;w&#39;</span><span class="p">)</span> <span class="k">as</span> <span class="n">f</span><span class="p">:</span>
@ -269,7 +269,7 @@ changes are committed by the builder.</p>
</footer>
<script type=text/javascript src="../../../../../static/app.js?h=bb1b933a" charset="utf-8"></script>
<script type=text/javascript src="../../../../../static/app.js?h=d85eb4b1" charset="utf-8"></script>
<script>
((window.gitter = {}).chat = {}).options = {
room: 'lektor/lektor',

View File

@ -4,7 +4,7 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link rel="stylesheet" href="../../../../../static/styles.css?h=ca3aba42">
<link rel="stylesheet" href="../../../../../static/styles.css?h=7041cc50">
<link rel="stylesheet" href="../../../../../static/pygments.css">
<link rel="shortcut icon" href="../../../../../static/favicon.png?h=fa09bedd">
<title>render_template_into | Documentation | Lektor Static Content Management System</title>
@ -194,7 +194,7 @@ catch the error and render it into the template with a failure marker. This
can be changed with the <code>fail</code> parameter. This is similar to the behavior of
the <a href="../../../environment/render-template/" class="ref">render_template</a> method of the
environment.</p>
<h2 id="example">Example</h2><div class="hll"><pre><span></span><span class="k">class</span> <span class="nc">MyBuildProgram</span><span class="p">(</span><span class="n">BuildProgram</span><span class="p">):</span>
<h2 id="example">Example</h2><div class="highlight"><pre><span></span><span class="k">class</span> <span class="nc">MyBuildProgram</span><span class="p">(</span><span class="n">BuildProgram</span><span class="p">):</span>
<span class="o">...</span>
<span class="k">def</span> <span class="nf">build_artifact</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">artifact</span><span class="p">):</span>
@ -268,7 +268,7 @@ environment.</p>
</footer>
<script type=text/javascript src="../../../../../static/app.js?h=bb1b933a" charset="utf-8"></script>
<script type=text/javascript src="../../../../../static/app.js?h=d85eb4b1" charset="utf-8"></script>
<script>
((window.gitter = {}).chat = {}).options = {
room: 'lektor/lektor',

View File

@ -4,7 +4,7 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link rel="stylesheet" href="../../../../../static/styles.css?h=ca3aba42">
<link rel="stylesheet" href="../../../../../static/styles.css?h=7041cc50">
<link rel="stylesheet" href="../../../../../static/pygments.css">
<link rel="shortcut icon" href="../../../../../static/favicon.png?h=fa09bedd">
<title>replace_with_file | Documentation | Lektor Static Content Management System</title>
@ -193,7 +193,7 @@
on commit. This is useful when you are dealing with external applications
that create temporaries. By default the file is moved as this is what's
common with temporaries but this can be changed into a copy with <code>copy=True</code>.</p>
<h2 id="example">Example</h2><div class="hll"><pre><span></span><span class="n">ctx</span> <span class="o">=</span> <span class="n">get_ctx</span><span class="p">()</span>
<h2 id="example">Example</h2><div class="highlight"><pre><span></span><span class="n">ctx</span> <span class="o">=</span> <span class="n">get_ctx</span><span class="p">()</span>
<span class="nd">@ctx</span><span class="o">.</span><span class="n">sub_artifact</span><span class="p">(</span><span class="s1">&#39;artifact.txt&#39;</span><span class="p">)</span>
<span class="k">def</span> <span class="nf">build_stylesheet</span><span class="p">(</span><span class="n">artifact</span><span class="p">):</span>
<span class="n">temporary_file</span> <span class="o">=</span> <span class="n">invoke_external_program</span><span class="p">()</span>
@ -266,7 +266,7 @@ common with temporaries but this can be changed into a copy with <code>copy=True
</footer>
<script type=text/javascript src="../../../../../static/app.js?h=bb1b933a" charset="utf-8"></script>
<script type=text/javascript src="../../../../../static/app.js?h=d85eb4b1" charset="utf-8"></script>
<script>
((window.gitter = {}).chat = {}).options = {
room: 'lektor/lektor',

View File

@ -4,7 +4,7 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link rel="stylesheet" href="../../../../../static/styles.css?h=ca3aba42">
<link rel="stylesheet" href="../../../../../static/styles.css?h=7041cc50">
<link rel="stylesheet" href="../../../../../static/pygments.css">
<link rel="shortcut icon" href="../../../../../static/favicon.png?h=fa09bedd">
<title>source_obj | Documentation | Lektor Static Content Management System</title>
@ -251,7 +251,7 @@ here.</p>
</footer>
<script type=text/javascript src="../../../../../static/app.js?h=bb1b933a" charset="utf-8"></script>
<script type=text/javascript src="../../../../../static/app.js?h=d85eb4b1" charset="utf-8"></script>
<script>
((window.gitter = {}).chat = {}).options = {
room: 'lektor/lektor',

View File

@ -4,7 +4,7 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link rel="stylesheet" href="../../../../../static/styles.css?h=ca3aba42">
<link rel="stylesheet" href="../../../../../static/styles.css?h=7041cc50">
<link rel="stylesheet" href="../../../../../static/pygments.css">
<link rel="shortcut icon" href="../../../../../static/favicon.png?h=fa09bedd">
<title>changed_base_url | Documentation | Lektor Static Content Management System</title>
@ -199,7 +199,7 @@
but in some cases this can lead to issues when plugins attempt more complex
operations. In these cases the base URL can temporarily be overridden
with this method.</p>
<h2 id="example">Example</h2><div class="hll"><pre><span></span><span class="k">with</span> <span class="n">get_ctx</span><span class="p">()</span><span class="o">.</span><span class="n">changed_base_url</span><span class="p">(</span><span class="s1">&#39;/downloads/&#39;</span><span class="p">):</span>
<h2 id="example">Example</h2><div class="highlight"><pre><span></span><span class="k">with</span> <span class="n">get_ctx</span><span class="p">()</span><span class="o">.</span><span class="n">changed_base_url</span><span class="p">(</span><span class="s1">&#39;/downloads/&#39;</span><span class="p">):</span>
<span class="n">url</span> <span class="o">=</span> <span class="n">url_to</span><span class="p">(</span><span class="s1">&#39;/&#39;</span><span class="p">)</span>
</pre></div>
@ -269,7 +269,7 @@ with this method.</p>
</footer>
<script type=text/javascript src="../../../../../static/app.js?h=bb1b933a" charset="utf-8"></script>
<script type=text/javascript src="../../../../../static/app.js?h=d85eb4b1" charset="utf-8"></script>
<script>
((window.gitter = {}).chat = {}).options = {
room: 'lektor/lektor',

View File

@ -4,7 +4,7 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link rel="stylesheet" href="../../../../../static/styles.css?h=ca3aba42">
<link rel="stylesheet" href="../../../../../static/styles.css?h=7041cc50">
<link rel="stylesheet" href="../../../../../static/pygments.css">
<link rel="shortcut icon" href="../../../../../static/favicon.png?h=fa09bedd">
<title>gather_dependencies | Documentation | Lektor Static Content Management System</title>
@ -200,7 +200,7 @@ automatically track dependencies. However in some cases it might be
useful for a plugin to know exactly which dependencies are recorded.</p>
<p>In this case this method can be used as a context manager. Whenever Lektor
encounters a dependency it will invoke the passed function.</p>
<h2 id="example">Example</h2><div class="hll"><pre><span></span><span class="n">deps</span> <span class="o">=</span> <span class="nb">set</span><span class="p">()</span>
<h2 id="example">Example</h2><div class="highlight"><pre><span></span><span class="n">deps</span> <span class="o">=</span> <span class="nb">set</span><span class="p">()</span>
<span class="k">with</span> <span class="n">get_ctx</span><span class="p">()</span><span class="o">.</span><span class="n">gather_dependencies</span><span class="p">(</span><span class="n">deps</span><span class="o">.</span><span class="n">add</span><span class="p">):</span>
<span class="n">items</span> <span class="o">=</span> <span class="n">pad</span><span class="o">.</span><span class="n">query</span><span class="p">(</span><span class="s1">&#39;/path/to/some/pages&#39;</span><span class="p">)</span><span class="o">.</span><span class="n">all</span><span class="p">()</span>
<span class="nb">print</span><span class="p">(</span><span class="s1">&#39;The dependencies are: </span><span class="si">%s</span><span class="s1">&#39;</span> <span class="o">%</span> <span class="n">deps</span><span class="p">)</span>
@ -272,7 +272,7 @@ encounters a dependency it will invoke the passed function.</p>
</footer>
<script type=text/javascript src="../../../../../static/app.js?h=bb1b933a" charset="utf-8"></script>
<script type=text/javascript src="../../../../../static/app.js?h=d85eb4b1" charset="utf-8"></script>
<script>
((window.gitter = {}).chat = {}).options = {
room: 'lektor/lektor',

View File

@ -4,7 +4,7 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link rel="stylesheet" href="../../../../static/styles.css?h=ca3aba42">
<link rel="stylesheet" href="../../../../static/styles.css?h=7041cc50">
<link rel="stylesheet" href="../../../../static/pygments.css">
<link rel="shortcut icon" href="../../../../static/favicon.png?h=fa09bedd">
<title>Context | Documentation | Lektor Static Content Management System</title>
@ -200,7 +200,7 @@ will look at the context to decide on further operations to perform.</p>
<p>The current context can be discovered by calling the <a href="../get-ctx/" class="ref">get_ctx</a>
function which will return it. If there is no artifact build ongoing then
the return value will be <code>None</code>.</p>
<h2 id="basic-example">Basic Example</h2><div class="hll"><pre><span></span><span class="kn">from</span> <span class="nn">lektor.context</span> <span class="kn">import</span> <span class="n">get_ctx</span>
<h2 id="basic-example">Basic Example</h2><div class="highlight"><pre><span></span><span class="kn">from</span> <span class="nn">lektor.context</span> <span class="kn">import</span> <span class="n">get_ctx</span>
<span class="n">ctx</span> <span class="o">=</span> <span class="n">get_ctx</span><span class="p">()</span>
<span class="nb">print</span><span class="p">(</span><span class="s1">&#39;The current source is </span><span class="si">%s</span><span class="s1">&#39;</span> <span class="o">%</span> <span class="n">ctx</span><span class="o">.</span><span class="n">source</span><span class="p">)</span>
@ -372,7 +372,7 @@ the return value will be <code>None</code>.</p>
</footer>
<script type=text/javascript src="../../../../static/app.js?h=bb1b933a" charset="utf-8"></script>
<script type=text/javascript src="../../../../static/app.js?h=d85eb4b1" charset="utf-8"></script>
<script>
((window.gitter = {}).chat = {}).options = {
room: 'lektor/lektor',

View File

@ -4,7 +4,7 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link rel="stylesheet" href="../../../../../static/styles.css?h=ca3aba42">
<link rel="stylesheet" href="../../../../../static/styles.css?h=7041cc50">
<link rel="stylesheet" href="../../../../../static/pygments.css">
<link rel="shortcut icon" href="../../../../../static/favicon.png?h=fa09bedd">
<title>locale | Documentation | Lektor Static Content Management System</title>
@ -200,7 +200,7 @@ term for language and territory) the context provides this information. It's
automatically resolved based on configuration from the current alt.</p>
<p>This is primarily useful for plugins that want to change their behavior based
on the current requested language.</p>
<h2 id="example">Example</h2><div class="hll"><pre><span></span><span class="nb">print</span> <span class="n">get_ctx</span><span class="p">()</span><span class="o">.</span><span class="n">locale</span>
<h2 id="example">Example</h2><div class="highlight"><pre><span></span><span class="nb">print</span> <span class="n">get_ctx</span><span class="p">()</span><span class="o">.</span><span class="n">locale</span>
</pre></div>
@ -269,7 +269,7 @@ on the current requested language.</p>
</footer>
<script type=text/javascript src="../../../../../static/app.js?h=bb1b933a" charset="utf-8"></script>
<script type=text/javascript src="../../../../../static/app.js?h=d85eb4b1" charset="utf-8"></script>
<script>
((window.gitter = {}).chat = {}).options = {
room: 'lektor/lektor',

View File

@ -4,7 +4,7 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link rel="stylesheet" href="../../../../../static/styles.css?h=ca3aba42">
<link rel="stylesheet" href="../../../../../static/styles.css?h=7041cc50">
<link rel="stylesheet" href="../../../../../static/pygments.css">
<link rel="shortcut icon" href="../../../../../static/favicon.png?h=fa09bedd">
<title>pad | Documentation | Lektor Static Content Management System</title>
@ -197,7 +197,7 @@
<p>To access the current pad from the context, this attribute can be used. It
refers to the active <a href="../../../db/pad/" class="ref">Pad</a>.</p>
<h2 id="example">Example</h2><div class="hll"><pre><span></span><span class="kn">from</span> <span class="nn">lektor.context</span> <span class="kn">import</span> <span class="n">get_ctx</span>
<h2 id="example">Example</h2><div class="highlight"><pre><span></span><span class="kn">from</span> <span class="nn">lektor.context</span> <span class="kn">import</span> <span class="n">get_ctx</span>
<span class="n">ctx</span> <span class="o">=</span> <span class="n">get_ctx</span><span class="p">()</span>
<span class="k">for</span> <span class="n">child</span> <span class="ow">in</span> <span class="n">ctx</span><span class="o">.</span><span class="n">pad</span><span class="o">.</span><span class="n">root</span><span class="o">.</span><span class="n">children</span><span class="p">:</span>
@ -270,7 +270,7 @@ refers to the active <a href="../../../db/pad/" class="ref">Pad</a>.</p>
</footer>
<script type=text/javascript src="../../../../../static/app.js?h=bb1b933a" charset="utf-8"></script>
<script type=text/javascript src="../../../../../static/app.js?h=d85eb4b1" charset="utf-8"></script>
<script>
((window.gitter = {}).chat = {}).options = {
room: 'lektor/lektor',

View File

@ -4,7 +4,7 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link rel="stylesheet" href="../../../../../static/styles.css?h=ca3aba42">
<link rel="stylesheet" href="../../../../../static/styles.css?h=7041cc50">
<link rel="stylesheet" href="../../../../../static/pygments.css">
<link rel="shortcut icon" href="../../../../../static/favicon.png?h=fa09bedd">
<title>record_dependency | Documentation | Lektor Static Content Management System</title>
@ -208,7 +208,7 @@ to record this as a dependency.</p>
is possible to dependend to things outside of it, but the automatic watch
system of the builder will not track files there so they will not show up
unless a manual build is instructed.</p>
<h2 id="example">Example</h2><div class="hll"><pre><span></span><span class="kn">import</span> <span class="nn">os</span>
<h2 id="example">Example</h2><div class="highlight"><pre><span></span><span class="kn">import</span> <span class="nn">os</span>
<span class="kn">from</span> <span class="nn">lektor.pluginsystem</span> <span class="kn">import</span> <span class="n">Plugin</span>
<span class="k">class</span> <span class="nc">IncludeFilePlugin</span><span class="p">(</span><span class="n">Plugin</span><span class="p">):</span>
@ -288,7 +288,7 @@ unless a manual build is instructed.</p>
</footer>
<script type=text/javascript src="../../../../../static/app.js?h=bb1b933a" charset="utf-8"></script>
<script type=text/javascript src="../../../../../static/app.js?h=d85eb4b1" charset="utf-8"></script>
<script>
((window.gitter = {}).chat = {}).options = {
room: 'lektor/lektor',

View File

@ -4,7 +4,7 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link rel="stylesheet" href="../../../../../static/styles.css?h=ca3aba42">
<link rel="stylesheet" href="../../../../../static/styles.css?h=7041cc50">
<link rel="stylesheet" href="../../../../../static/pygments.css">
<link rel="shortcut icon" href="../../../../../static/favicon.png?h=fa09bedd">
<title>record | Documentation | Lektor Static Content Management System</title>
@ -198,7 +198,7 @@
<p>This works almost exactly like the <a href="../source/" class="ref">source</a> property but the
difference is that it is <code>None</code> if the source object is not a
<a href="../../../db/record/" class="ref">Record</a>.</p>
<h2 id="example">Example</h2><div class="hll"><pre><span></span><span class="kn">from</span> <span class="nn">lektor.context</span> <span class="kn">import</span> <span class="n">get_ctx</span>
<h2 id="example">Example</h2><div class="highlight"><pre><span></span><span class="kn">from</span> <span class="nn">lektor.context</span> <span class="kn">import</span> <span class="n">get_ctx</span>
<span class="n">ctx</span> <span class="o">=</span> <span class="n">get_ctx</span><span class="p">()</span>
<span class="nb">print</span> <span class="n">ctx</span><span class="o">.</span><span class="n">record</span><span class="o">.</span><span class="n">record_label</span>
@ -270,7 +270,7 @@ difference is that it is <code>None</code> if the source object is not a
</footer>
<script type=text/javascript src="../../../../../static/app.js?h=bb1b933a" charset="utf-8"></script>
<script type=text/javascript src="../../../../../static/app.js?h=d85eb4b1" charset="utf-8"></script>
<script>
((window.gitter = {}).chat = {}).options = {
room: 'lektor/lektor',

View File

@ -4,7 +4,7 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link rel="stylesheet" href="../../../../../static/styles.css?h=ca3aba42">
<link rel="stylesheet" href="../../../../../static/styles.css?h=7041cc50">
<link rel="stylesheet" href="../../../../../static/pygments.css">
<link rel="shortcut icon" href="../../../../../static/favicon.png?h=fa09bedd">
<title>source | Documentation | Lektor Static Content Management System</title>
@ -199,7 +199,7 @@
created from <a href="../../../db/obj/" class="ref">Source Objects</a>, it's typically possible
to refer back to it. Note that there are situations in which artifacts are
created but no source is available. In this case the value will be <code>None</code>.</p>
<h2 id="example">Example</h2><div class="hll"><pre><span></span><span class="kn">from</span> <span class="nn">lektor.context</span> <span class="kn">import</span> <span class="n">get_ctx</span>
<h2 id="example">Example</h2><div class="highlight"><pre><span></span><span class="kn">from</span> <span class="nn">lektor.context</span> <span class="kn">import</span> <span class="n">get_ctx</span>
<span class="n">ctx</span> <span class="o">=</span> <span class="n">get_ctx</span><span class="p">()</span>
<span class="nb">print</span> <span class="n">ctx</span><span class="o">.</span><span class="n">source</span><span class="o">.</span><span class="n">source_filename</span>
@ -271,7 +271,7 @@ created but no source is available. In this case the value will be <code>None</
</footer>
<script type=text/javascript src="../../../../../static/app.js?h=bb1b933a" charset="utf-8"></script>
<script type=text/javascript src="../../../../../static/app.js?h=d85eb4b1" charset="utf-8"></script>
<script>
((window.gitter = {}).chat = {}).options = {
room: 'lektor/lektor',

View File

@ -4,7 +4,7 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link rel="stylesheet" href="../../../../../static/styles.css?h=ca3aba42">
<link rel="stylesheet" href="../../../../../static/styles.css?h=7041cc50">
<link rel="stylesheet" href="../../../../../static/pygments.css">
<link rel="shortcut icon" href="../../../../../static/favicon.png?h=fa09bedd">
<title>sub_artifact | Documentation | Lektor Static Content Management System</title>
@ -213,7 +213,7 @@ artifact is already considered up to date.</p>
provided it can identify the configuration that the artifact was created
from. If the hash changes the artifact will be rebuilt. Such a hash
can for instance be generated with <a href="../../../utils/get-structure-hash/" class="ref">get_structure_hash</a>.</p>
<h2 id="example">Example</h2><div class="hll"><pre><span></span><span class="kn">import</span> <span class="nn">os</span>
<h2 id="example">Example</h2><div class="highlight"><pre><span></span><span class="kn">import</span> <span class="nn">os</span>
<span class="kn">from</span> <span class="nn">lektor.pluginsystem</span> <span class="kn">import</span> <span class="n">Plugin</span>
<span class="k">class</span> <span class="nc">IncludeFilePlugin</span><span class="p">(</span><span class="n">Plugin</span><span class="p">):</span>
@ -229,7 +229,7 @@ can for instance be generated with <a href="../../../utils/get-structure-hash/"
<span class="bp">self</span><span class="o">.</span><span class="n">env</span><span class="o">.</span><span class="n">jinja_env</span><span class="o">.</span><span class="n">globals</span><span class="p">[</span><span class="s1">&#39;get_demo_css&#39;</span><span class="p">]</span> <span class="o">=</span> <span class="n">get_css</span>
</pre></div>
<p>Inside a template it can be used like this:</p>
<div class="hll"><pre><span></span><span class="p">&lt;</span><span class="nt">link</span> <span class="na">rel</span><span class="o">=</span><span class="s">stylesheet</span> <span class="na">href</span><span class="o">=</span><span class="s">&quot;</span><span class="cp">{{</span> <span class="nv">get_demo_css</span><span class="o">()|</span><span class="nf">url</span> <span class="cp">}}</span><span class="s">&quot;</span><span class="p">&gt;</span>
<div class="highlight"><pre><span></span><span class="p">&lt;</span><span class="nt">link</span> <span class="na">rel</span><span class="o">=</span><span class="s">stylesheet</span> <span class="na">href</span><span class="o">=</span><span class="s">&quot;</span><span class="cp">{{</span> <span class="nv">get_demo_css</span><span class="o">()|</span><span class="nf">url</span> <span class="cp">}}</span><span class="s">&quot;</span><span class="p">&gt;</span>
</pre></div>
@ -298,7 +298,7 @@ can for instance be generated with <a href="../../../utils/get-structure-hash/"
</footer>
<script type=text/javascript src="../../../../../static/app.js?h=bb1b933a" charset="utf-8"></script>
<script type=text/javascript src="../../../../../static/app.js?h=d85eb4b1" charset="utf-8"></script>
<script>
((window.gitter = {}).chat = {}).options = {
room: 'lektor/lektor',

View File

@ -4,7 +4,7 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link rel="stylesheet" href="../../../../static/styles.css?h=ca3aba42">
<link rel="stylesheet" href="../../../../static/styles.css?h=7041cc50">
<link rel="stylesheet" href="../../../../static/pygments.css">
<link rel="shortcut icon" href="../../../../static/favicon.png?h=fa09bedd">
<title>get_ctx | Documentation | Lektor Static Content Management System</title>
@ -174,7 +174,7 @@ if not. This means that if plugins only call that method in places where
they know a build is access it's not necessary to check if the context is
available.</p>
<p>For more information: <a href="../context/" class="ref">Context</a>.</p>
<h2 id="example">Example</h2><div class="hll"><pre><span></span><span class="kn">from</span> <span class="nn">lektor.context</span> <span class="kn">import</span> <span class="n">get_ctx</span>
<h2 id="example">Example</h2><div class="highlight"><pre><span></span><span class="kn">from</span> <span class="nn">lektor.context</span> <span class="kn">import</span> <span class="n">get_ctx</span>
<span class="n">ctx</span> <span class="o">=</span> <span class="n">get_ctx</span><span class="p">()</span>
</pre></div>
@ -245,7 +245,7 @@ available.</p>
</footer>
<script type=text/javascript src="../../../../static/app.js?h=bb1b933a" charset="utf-8"></script>
<script type=text/javascript src="../../../../static/app.js?h=d85eb4b1" charset="utf-8"></script>
<script>
((window.gitter = {}).chat = {}).options = {
room: 'lektor/lektor',

View File

@ -4,7 +4,7 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link rel="stylesheet" href="../../../static/styles.css?h=ca3aba42">
<link rel="stylesheet" href="../../../static/styles.css?h=7041cc50">
<link rel="stylesheet" href="../../../static/pygments.css">
<link rel="shortcut icon" href="../../../static/favicon.png?h=fa09bedd">
<title>Build System | Documentation | Lektor Static Content Management System</title>
@ -278,7 +278,7 @@ the plugin system can interact with it.</p>
</footer>
<script type=text/javascript src="../../../static/app.js?h=bb1b933a" charset="utf-8"></script>
<script type=text/javascript src="../../../static/app.js?h=d85eb4b1" charset="utf-8"></script>
<script>
((window.gitter = {}).chat = {}).options = {
room: 'lektor/lektor',

View File

@ -4,7 +4,7 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link rel="stylesheet" href="../../../../../static/styles.css?h=ca3aba42">
<link rel="stylesheet" href="../../../../../static/styles.css?h=7041cc50">
<link rel="stylesheet" href="../../../../../static/pygments.css">
<link rel="shortcut icon" href="../../../../../static/favicon.png?h=fa09bedd">
<title>build_artifact | Documentation | Lektor Static Content Management System</title>
@ -248,7 +248,7 @@ artifact is outdated based on the information at hand.</p>
</footer>
<script type=text/javascript src="../../../../../static/app.js?h=bb1b933a" charset="utf-8"></script>
<script type=text/javascript src="../../../../../static/app.js?h=d85eb4b1" charset="utf-8"></script>
<script>
((window.gitter = {}).chat = {}).options = {
room: 'lektor/lektor',

View File

@ -4,7 +4,7 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link rel="stylesheet" href="../../../../../static/styles.css?h=ca3aba42">
<link rel="stylesheet" href="../../../../../static/styles.css?h=7041cc50">
<link rel="stylesheet" href="../../../../../static/pygments.css">
<link rel="shortcut icon" href="../../../../../static/favicon.png?h=fa09bedd">
<title>declare_artifact | Documentation | Lektor Static Content Management System</title>
@ -256,7 +256,7 @@ that <a href="../build-artifact/" class="ref">build_artifact</a> can use it.</li
</footer>
<script type=text/javascript src="../../../../../static/app.js?h=bb1b933a" charset="utf-8"></script>
<script type=text/javascript src="../../../../../static/app.js?h=d85eb4b1" charset="utf-8"></script>
<script>
((window.gitter = {}).chat = {}).options = {
room: 'lektor/lektor',

View File

@ -4,7 +4,7 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link rel="stylesheet" href="../../../../static/styles.css?h=ca3aba42">
<link rel="stylesheet" href="../../../../static/styles.css?h=7041cc50">
<link rel="stylesheet" href="../../../../static/pygments.css">
<link rel="shortcut icon" href="../../../../static/favicon.png?h=fa09bedd">
<title>BuildProgram | Documentation | Lektor Static Content Management System</title>
@ -314,7 +314,7 @@ artifacts if the builder determiend that the artifact needs to be built.</p>
</footer>
<script type=text/javascript src="../../../../static/app.js?h=bb1b933a" charset="utf-8"></script>
<script type=text/javascript src="../../../../static/app.js?h=d85eb4b1" charset="utf-8"></script>
<script>
((window.gitter = {}).chat = {}).options = {
room: 'lektor/lektor',

View File

@ -4,7 +4,7 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link rel="stylesheet" href="../../../../../static/styles.css?h=ca3aba42">
<link rel="stylesheet" href="../../../../../static/styles.css?h=7041cc50">
<link rel="stylesheet" href="../../../../../static/pygments.css">
<link rel="shortcut icon" href="../../../../../static/favicon.png?h=fa09bedd">
<title>iter_child_sources | Documentation | Lektor Static Content Management System</title>
@ -189,7 +189,7 @@
<p>Optionally a builder can yield further sources that are then picked up by the
builder and processed normally. This is how the recursive build process in
Lektor is implemented for normal records.</p>
<h2 id="example">Example</h2><div class="hll"><pre><span></span><span class="k">def</span> <span class="nf">iter_child_sources</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
<h2 id="example">Example</h2><div class="highlight"><pre><span></span><span class="k">def</span> <span class="nf">iter_child_sources</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
<span class="k">for</span> <span class="n">child</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="n">sources</span><span class="o">.</span><span class="n">children</span><span class="p">:</span>
<span class="k">yield</span> <span class="n">child</span>
</pre></div>
@ -260,7 +260,7 @@ Lektor is implemented for normal records.</p>
</footer>
<script type=text/javascript src="../../../../../static/app.js?h=bb1b933a" charset="utf-8"></script>
<script type=text/javascript src="../../../../../static/app.js?h=d85eb4b1" charset="utf-8"></script>
<script>
((window.gitter = {}).chat = {}).options = {
room: 'lektor/lektor',

View File

@ -4,7 +4,7 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link rel="stylesheet" href="../../../../../static/styles.css?h=ca3aba42">
<link rel="stylesheet" href="../../../../../static/styles.css?h=7041cc50">
<link rel="stylesheet" href="../../../../../static/pygments.css">
<link rel="shortcut icon" href="../../../../../static/favicon.png?h=fa09bedd">
<title>produce_artifacts | Documentation | Lektor Static Content Management System</title>
@ -251,7 +251,7 @@ builder determined that the artifact needs to be rebuild.</p>
</footer>
<script type=text/javascript src="../../../../../static/app.js?h=bb1b933a" charset="utf-8"></script>
<script type=text/javascript src="../../../../../static/app.js?h=d85eb4b1" charset="utf-8"></script>
<script>
((window.gitter = {}).chat = {}).options = {
room: 'lektor/lektor',

View File

@ -4,7 +4,7 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link rel="stylesheet" href="../../../../../static/styles.css?h=ca3aba42">
<link rel="stylesheet" href="../../../../../static/styles.css?h=7041cc50">
<link rel="stylesheet" href="../../../../../static/pygments.css">
<link rel="shortcut icon" href="../../../../../static/favicon.png?h=fa09bedd">
<title>source | Documentation | Lektor Static Content Management System</title>
@ -246,7 +246,7 @@ use is to build the artifact in <a href="../build-artifact/" class="ref">build_a
</footer>
<script type=text/javascript src="../../../../../static/app.js?h=bb1b933a" charset="utf-8"></script>
<script type=text/javascript src="../../../../../static/app.js?h=d85eb4b1" charset="utf-8"></script>
<script>
((window.gitter = {}).chat = {}).options = {
room: 'lektor/lektor',

View File

@ -4,7 +4,7 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link rel="stylesheet" href="../../../../static/styles.css?h=ca3aba42">
<link rel="stylesheet" href="../../../../static/styles.css?h=7041cc50">
<link rel="stylesheet" href="../../../../static/pygments.css">
<link rel="shortcut icon" href="../../../../static/favicon.png?h=fa09bedd">
<title>get_bag | Documentation | Lektor Static Content Management System</title>
@ -224,7 +224,7 @@ intents and purposes <code>lookup</code> is what you want.</p>
</footer>
<script type=text/javascript src="../../../../static/app.js?h=bb1b933a" charset="utf-8"></script>
<script type=text/javascript src="../../../../static/app.js?h=d85eb4b1" charset="utf-8"></script>
<script>
((window.gitter = {}).chat = {}).options = {
room: 'lektor/lektor',

View File

@ -4,7 +4,7 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link rel="stylesheet" href="../../../static/styles.css?h=ca3aba42">
<link rel="stylesheet" href="../../../static/styles.css?h=7041cc50">
<link rel="stylesheet" href="../../../static/pygments.css">
<link rel="shortcut icon" href="../../../static/favicon.png?h=fa09bedd">
<title>Databags | Documentation | Lektor Static Content Management System</title>
@ -197,11 +197,11 @@ which can for instance be used with the <a href="../templates/filters/tojson/" c
filter.</p>
<h2 id="example-databag">Example Databag</h2><p>This is a basic example of a data bag that contains configuration values
for google maps. It's stored in <code>databags/gmaps.ini</code>:</p>
<div class="hll"><pre><span></span><span class="na">key</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">1233456ABCDEFG</span><span class="w"></span>
<div class="highlight"><pre><span></span><span class="na">key</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">1233456ABCDEFG</span><span class="w"></span>
<span class="na">api_url</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">https://www.google.com/maps/embed/v1/</span><span class="w"></span>
</pre></div>
<p>This can then be usde to good effect in templates:</p>
<div class="hll"><pre><span></span><span class="cp">{%</span> <span class="k">macro</span> <span class="nv">render_map</span><span class="o">(</span><span class="nv">location</span><span class="o">,</span> <span class="nv">width</span><span class="o">=</span><span class="m">600</span><span class="o">,</span> <span class="nv">height</span><span class="o">=</span><span class="m">450</span><span class="o">)</span> <span class="cp">%}</span>
<div class="highlight"><pre><span></span><span class="cp">{%</span> <span class="k">macro</span> <span class="nv">render_map</span><span class="o">(</span><span class="nv">location</span><span class="o">,</span> <span class="nv">width</span><span class="o">=</span><span class="m">600</span><span class="o">,</span> <span class="nv">height</span><span class="o">=</span><span class="m">450</span><span class="o">)</span> <span class="cp">%}</span>
<span class="p">&lt;</span><span class="nt">iframe</span>
<span class="na">width</span><span class="o">=</span><span class="s">&quot;</span><span class="cp">{{</span> <span class="nv">width</span> <span class="cp">}}</span><span class="s">&quot;</span> <span class="na">height</span><span class="o">=</span><span class="s">&quot;</span><span class="cp">{{</span> <span class="nv">height</span> <span class="cp">}}</span><span class="s">&quot;</span>
<span class="na">frameborder</span><span class="o">=</span><span class="s">&quot;0&quot;</span> <span class="na">style</span><span class="o">=</span><span class="s">&quot;border:0&quot;</span>
@ -305,7 +305,7 @@ for google maps. It's stored in <code>databags/gmaps.ini</code>:</p>
</footer>
<script type=text/javascript src="../../../static/app.js?h=bb1b933a" charset="utf-8"></script>
<script type=text/javascript src="../../../static/app.js?h=d85eb4b1" charset="utf-8"></script>
<script>
((window.gitter = {}).chat = {}).options = {
room: 'lektor/lektor',

View File

@ -4,7 +4,7 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link rel="stylesheet" href="../../../../static/styles.css?h=ca3aba42">
<link rel="stylesheet" href="../../../../static/styles.css?h=7041cc50">
<link rel="stylesheet" href="../../../../static/pygments.css">
<link rel="shortcut icon" href="../../../../static/favicon.png?h=fa09bedd">
<title>lookup | Documentation | Lektor Static Content Management System</title>
@ -167,7 +167,7 @@
Python code. Within templates you can also use the <a href="../../templates/globals/bag/" class="ref">bag</a> function which is easier to call.</p>
<p>The key is in dotted notation. For more information about this refer
to the main <a href="../" class="ref">databags</a> documentation.</p>
<h2 id="example">Example</h2><div class="hll"><pre><span></span><span class="k">def</span> <span class="nf">translate</span><span class="p">(</span><span class="n">pad</span><span class="p">,</span> <span class="n">alt</span><span class="p">,</span> <span class="n">key</span><span class="p">):</span>
<h2 id="example">Example</h2><div class="highlight"><pre><span></span><span class="k">def</span> <span class="nf">translate</span><span class="p">(</span><span class="n">pad</span><span class="p">,</span> <span class="n">alt</span><span class="p">,</span> <span class="n">key</span><span class="p">):</span>
<span class="k">return</span> <span class="n">pad</span><span class="o">.</span><span class="n">databags</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s1">&#39;i18n.</span><span class="si">%s</span><span class="s1">.</span><span class="si">%s</span><span class="s1">&#39;</span> <span class="o">%</span> <span class="p">(</span><span class="n">alt</span><span class="p">,</span> <span class="n">key</span><span class="p">),</span> <span class="n">key</span><span class="p">)</span>
</pre></div>
@ -237,7 +237,7 @@ to the main <a href="../" class="ref">databags</a> documentation.</p>
</footer>
<script type=text/javascript src="../../../../static/app.js?h=bb1b933a" charset="utf-8"></script>
<script type=text/javascript src="../../../../static/app.js?h=d85eb4b1" charset="utf-8"></script>
<script>
((window.gitter = {}).chat = {}).options = {
room: 'lektor/lektor',

View File

@ -4,7 +4,7 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link rel="stylesheet" href="../../../../../static/styles.css?h=ca3aba42">
<link rel="stylesheet" href="../../../../../static/styles.css?h=7041cc50">
<link rel="stylesheet" href="../../../../../static/pygments.css">
<link rel="shortcut icon" href="../../../../../static/favicon.png?h=fa09bedd">
<title>and | Documentation | Lektor Static Content Management System</title>
@ -234,7 +234,7 @@
expression on the right are true. This is one of the few operators that
differs between Python and templates. In templates you have to use the
<code>and</code> method whereas in Python have to use the <code>&amp;</code> operator.</p>
<h2 id="template-example">Template Example</h2><div class="hll"><pre><span></span><span class="p">&lt;</span><span class="nt">h3</span><span class="p">&gt;</span>3 Star or Higher<span class="p">&lt;/</span><span class="nt">h3</span><span class="p">&gt;</span>
<h2 id="template-example">Template Example</h2><div class="highlight"><pre><span></span><span class="p">&lt;</span><span class="nt">h3</span><span class="p">&gt;</span>3 Star or Higher<span class="p">&lt;/</span><span class="nt">h3</span><span class="p">&gt;</span>
<span class="p">&lt;</span><span class="nt">ul</span><span class="p">&gt;</span>
<span class="cp">{%</span> <span class="k">for</span> <span class="nv">item</span> <span class="k">in</span> <span class="nv">this.children.filter</span><span class="o">(</span>
<span class="o">(</span><span class="nv">F.type</span> <span class="o">==</span> <span class="s1">&#39;hotel&#39;</span><span class="o">)</span><span class="nv">.and</span><span class="o">(</span><span class="nv">F.stars</span> <span class="o">&gt;=</span> <span class="m">3</span><span class="o">))</span> <span class="cp">%}</span>
@ -242,7 +242,7 @@ differs between Python and templates. In templates you have to use the
<span class="cp">{%</span> <span class="k">endfor</span> <span class="cp">%}</span>
<span class="p">&lt;/</span><span class="nt">ul</span><span class="p">&gt;</span>
</pre></div>
<h2 id="python-example">Python Example</h2><div class="hll"><pre><span></span><span class="k">def</span> <span class="nf">get_hotels</span><span class="p">(</span><span class="n">page</span><span class="p">):</span>
<h2 id="python-example">Python Example</h2><div class="highlight"><pre><span></span><span class="k">def</span> <span class="nf">get_hotels</span><span class="p">(</span><span class="n">page</span><span class="p">):</span>
<span class="k">return</span> <span class="n">page</span><span class="o">.</span><span class="n">children</span><span class="o">.</span><span class="n">filter</span><span class="p">(</span>
<span class="p">(</span><span class="n">F</span><span class="o">.</span><span class="n">type</span> <span class="o">==</span> <span class="s1">&#39;hotel&#39;</span><span class="p">)</span> <span class="o">&amp;</span> <span class="p">(</span><span class="n">F</span><span class="o">.</span><span class="n">stars</span> <span class="o">&gt;=</span> <span class="mi">3</span><span class="p">))</span>
</pre></div>
@ -313,7 +313,7 @@ differs between Python and templates. In templates you have to use the
</footer>
<script type=text/javascript src="../../../../../static/app.js?h=bb1b933a" charset="utf-8"></script>
<script type=text/javascript src="../../../../../static/app.js?h=d85eb4b1" charset="utf-8"></script>
<script>
((window.gitter = {}).chat = {}).options = {
room: 'lektor/lektor',

View File

@ -4,7 +4,7 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link rel="stylesheet" href="../../../../../static/styles.css?h=ca3aba42">
<link rel="stylesheet" href="../../../../../static/styles.css?h=7041cc50">
<link rel="stylesheet" href="../../../../../static/pygments.css">
<link rel="shortcut icon" href="../../../../../static/favicon.png?h=fa09bedd">
<title>contains | Documentation | Lektor Static Content Management System</title>
@ -231,7 +231,7 @@
<p>This expression evaluates to true if an item is contained within a field.
This works with fields that are lists in nature or <a href="../../types/string/" class="ref">strings</a>. For instance a string can be
contained in another string or a item can be contained within a list.</p>
<h2 id="template-example">Template Example</h2><div class="hll"><pre><span></span><span class="p">&lt;</span><span class="nt">h3</span><span class="p">&gt;</span>Projects Tagged &#39;amazing&#39;<span class="p">&lt;/</span><span class="nt">h3</span><span class="p">&gt;</span>
<h2 id="template-example">Template Example</h2><div class="highlight"><pre><span></span><span class="p">&lt;</span><span class="nt">h3</span><span class="p">&gt;</span>Projects Tagged &#39;amazing&#39;<span class="p">&lt;/</span><span class="nt">h3</span><span class="p">&gt;</span>
<span class="p">&lt;</span><span class="nt">ul</span><span class="p">&gt;</span>
<span class="cp">{%</span> <span class="k">for</span> <span class="nv">item</span> <span class="k">in</span> <span class="nv">this.children.filter</span><span class="o">(</span><span class="nv">F.tags.contains</span><span class="o">(</span><span class="s1">&#39;amazing&#39;</span><span class="o">))</span> <span class="cp">%}</span>
<span class="p">&lt;</span><span class="nt">li</span><span class="p">&gt;</span><span class="cp">{{</span> <span class="nv">item.name</span> <span class="cp">}}</span><span class="p">&lt;/</span><span class="nt">li</span><span class="p">&gt;</span>
@ -305,7 +305,7 @@ contained in another string or a item can be contained within a list.</p>
</footer>
<script type=text/javascript src="../../../../../static/app.js?h=bb1b933a" charset="utf-8"></script>
<script type=text/javascript src="../../../../../static/app.js?h=d85eb4b1" charset="utf-8"></script>
<script>
((window.gitter = {}).chat = {}).options = {
room: 'lektor/lektor',

View File

@ -4,7 +4,7 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link rel="stylesheet" href="../../../../../static/styles.css?h=ca3aba42">
<link rel="stylesheet" href="../../../../../static/styles.css?h=7041cc50">
<link rel="stylesheet" href="../../../../../static/pygments.css">
<link rel="shortcut icon" href="../../../../../static/favicon.png?h=fa09bedd">
<title>endswith_cs | Documentation | Lektor Static Content Management System</title>
@ -232,7 +232,7 @@
on the left side ends with the string on the right side. This method
operates in a case-sensitive manner. For the case-insensitive method
see <a href="../endswith/" class="ref">endswith</a>.</p>
<h2 id="example">Example</h2><div class="hll"><pre><span></span><span class="p">&lt;</span><span class="nt">ul</span><span class="p">&gt;</span>
<h2 id="example">Example</h2><div class="highlight"><pre><span></span><span class="p">&lt;</span><span class="nt">ul</span><span class="p">&gt;</span>
<span class="cp">{%</span> <span class="k">for</span> <span class="nv">item</span> <span class="k">in</span> <span class="nv">this.children.filter</span><span class="o">(</span><span class="nv">F.name.endswith_cs</span><span class="o">(</span><span class="s1">&#39;House&#39;</span><span class="o">))</span> <span class="cp">%}</span>
<span class="p">&lt;</span><span class="nt">li</span><span class="p">&gt;</span><span class="cp">{{</span> <span class="nv">item.name</span> <span class="cp">}}</span><span class="p">&lt;/</span><span class="nt">li</span><span class="p">&gt;</span>
<span class="cp">{%</span> <span class="k">endfor</span> <span class="cp">%}</span>
@ -305,7 +305,7 @@ see <a href="../endswith/" class="ref">endswith</a>.</p>
</footer>
<script type=text/javascript src="../../../../../static/app.js?h=bb1b933a" charset="utf-8"></script>
<script type=text/javascript src="../../../../../static/app.js?h=d85eb4b1" charset="utf-8"></script>
<script>
((window.gitter = {}).chat = {}).options = {
room: 'lektor/lektor',

View File

@ -4,7 +4,7 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link rel="stylesheet" href="../../../../../static/styles.css?h=ca3aba42">
<link rel="stylesheet" href="../../../../../static/styles.css?h=7041cc50">
<link rel="stylesheet" href="../../../../../static/pygments.css">
<link rel="shortcut icon" href="../../../../../static/favicon.png?h=fa09bedd">
<title>endswith | Documentation | Lektor Static Content Management System</title>
@ -232,7 +232,7 @@
on the left side ends with the string on the right side. This method
operates in a case-insensitive manner. For the case-sensitive method
see <a href="../endswith-cs/" class="ref">endswith_cs</a>.</p>
<h2 id="example">Example</h2><div class="hll"><pre><span></span><span class="p">&lt;</span><span class="nt">ul</span><span class="p">&gt;</span>
<h2 id="example">Example</h2><div class="highlight"><pre><span></span><span class="p">&lt;</span><span class="nt">ul</span><span class="p">&gt;</span>
<span class="cp">{%</span> <span class="k">for</span> <span class="nv">item</span> <span class="k">in</span> <span class="nv">this.children.filter</span><span class="o">(</span><span class="nv">F.name.endswith</span><span class="o">(</span><span class="s1">&#39;house&#39;</span><span class="o">))</span> <span class="cp">%}</span>
<span class="p">&lt;</span><span class="nt">li</span><span class="p">&gt;</span><span class="cp">{{</span> <span class="nv">item.name</span> <span class="cp">}}</span><span class="p">&lt;/</span><span class="nt">li</span><span class="p">&gt;</span>
<span class="cp">{%</span> <span class="k">endfor</span> <span class="cp">%}</span>
@ -305,7 +305,7 @@ see <a href="../endswith-cs/" class="ref">endswith_cs</a>.</p>
</footer>
<script type=text/javascript src="../../../../../static/app.js?h=bb1b933a" charset="utf-8"></script>
<script type=text/javascript src="../../../../../static/app.js?h=d85eb4b1" charset="utf-8"></script>
<script>
((window.gitter = {}).chat = {}).options = {
room: 'lektor/lektor',

View File

@ -4,7 +4,7 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link rel="stylesheet" href="../../../../../static/styles.css?h=ca3aba42">
<link rel="stylesheet" href="../../../../../static/styles.css?h=7041cc50">
<link rel="stylesheet" href="../../../../../static/pygments.css">
<link rel="shortcut icon" href="../../../../../static/favicon.png?h=fa09bedd">
<title>== | Documentation | Lektor Static Content Management System</title>
@ -230,7 +230,7 @@
<p>This checks if the left side of the expression matches the right side.
Typically it compares if a value matches a specific value exactly:</p>
<h2 id="example">Example</h2><div class="hll"><pre><span></span><span class="p">&lt;</span><span class="nt">h2</span><span class="p">&gt;</span>Our Houses<span class="p">&lt;/</span><span class="nt">h2</span><span class="p">&gt;</span>
<h2 id="example">Example</h2><div class="highlight"><pre><span></span><span class="p">&lt;</span><span class="nt">h2</span><span class="p">&gt;</span>Our Houses<span class="p">&lt;/</span><span class="nt">h2</span><span class="p">&gt;</span>
<span class="p">&lt;</span><span class="nt">ul</span><span class="p">&gt;</span>
<span class="cp">{%</span> <span class="k">for</span> <span class="nv">project</span> <span class="k">in</span> <span class="nv">this.children.filter</span><span class="o">(</span><span class="nv">F.type</span> <span class="o">==</span> <span class="s1">&#39;house&#39;</span><span class="o">)</span> <span class="cp">%}</span>
<span class="p">&lt;</span><span class="nt">li</span><span class="p">&gt;</span><span class="cp">{{</span> <span class="nv">project.name</span> <span class="cp">}}</span><span class="p">&lt;/</span><span class="nt">li</span><span class="p">&gt;</span>
@ -304,7 +304,7 @@ Typically it compares if a value matches a specific value exactly:</p>
</footer>
<script type=text/javascript src="../../../../../static/app.js?h=bb1b933a" charset="utf-8"></script>
<script type=text/javascript src="../../../../../static/app.js?h=d85eb4b1" charset="utf-8"></script>
<script>
((window.gitter = {}).chat = {}).options = {
room: 'lektor/lektor',

View File

@ -4,7 +4,7 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link rel="stylesheet" href="../../../../../static/styles.css?h=ca3aba42">
<link rel="stylesheet" href="../../../../../static/styles.css?h=7041cc50">
<link rel="stylesheet" href="../../../../../static/pygments.css">
<link rel="shortcut icon" href="../../../../../static/favicon.png?h=fa09bedd">
<title>&gt;= | Documentation | Lektor Static Content Management System</title>
@ -230,7 +230,7 @@
<p>This evaluates to true if the left side compares larger than the right side
or equal to it. This behavior works best with <a href="../../types/integer/" class="ref">integers</a> or <a href="../../types/float/" class="ref">floats</a>.</p>
<h2 id="template-example">Template Example</h2><div class="hll"><pre><span></span><span class="p">&lt;</span><span class="nt">h3</span><span class="p">&gt;</span>3 or more Stars<span class="p">&lt;/</span><span class="nt">h3</span><span class="p">&gt;</span>
<h2 id="template-example">Template Example</h2><div class="highlight"><pre><span></span><span class="p">&lt;</span><span class="nt">h3</span><span class="p">&gt;</span>3 or more Stars<span class="p">&lt;/</span><span class="nt">h3</span><span class="p">&gt;</span>
<span class="p">&lt;</span><span class="nt">ul</span><span class="p">&gt;</span>
<span class="cp">{%</span> <span class="k">for</span> <span class="nv">item</span> <span class="k">in</span> <span class="nv">this.children.filter</span><span class="o">(</span><span class="nv">F.stars</span> <span class="o">&gt;=</span> <span class="m">3</span><span class="o">)</span> <span class="cp">%}</span>
<span class="p">&lt;</span><span class="nt">li</span><span class="p">&gt;</span><span class="cp">{{</span> <span class="nv">item.name</span> <span class="cp">}}</span>: <span class="cp">{{</span> <span class="nv">item.stars</span> <span class="cp">}}</span> stars<span class="p">&lt;/</span><span class="nt">li</span><span class="p">&gt;</span>
@ -304,7 +304,7 @@ or equal to it. This behavior works best with <a href="../../types/integer/" cl
</footer>
<script type=text/javascript src="../../../../../static/app.js?h=bb1b933a" charset="utf-8"></script>
<script type=text/javascript src="../../../../../static/app.js?h=d85eb4b1" charset="utf-8"></script>
<script>
((window.gitter = {}).chat = {}).options = {
room: 'lektor/lektor',

View File

@ -4,7 +4,7 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link rel="stylesheet" href="../../../../../static/styles.css?h=ca3aba42">
<link rel="stylesheet" href="../../../../../static/styles.css?h=7041cc50">
<link rel="stylesheet" href="../../../../../static/pygments.css">
<link rel="shortcut icon" href="../../../../../static/favicon.png?h=fa09bedd">
<title>&gt; | Documentation | Lektor Static Content Management System</title>
@ -231,7 +231,7 @@
<p>This evaluates to true if the left side compares larger than the right side.
This behavior works best with <a href="../../types/integer/" class="ref">integers</a>
or <a href="../../types/float/" class="ref">floats</a>.</p>
<h2 id="template-example">Template Example</h2><div class="hll"><pre><span></span><span class="p">&lt;</span><span class="nt">h3</span><span class="p">&gt;</span>Well Rated Items<span class="p">&lt;/</span><span class="nt">h3</span><span class="p">&gt;</span>
<h2 id="template-example">Template Example</h2><div class="highlight"><pre><span></span><span class="p">&lt;</span><span class="nt">h3</span><span class="p">&gt;</span>Well Rated Items<span class="p">&lt;/</span><span class="nt">h3</span><span class="p">&gt;</span>
<span class="p">&lt;</span><span class="nt">ul</span><span class="p">&gt;</span>
<span class="cp">{%</span> <span class="k">for</span> <span class="nv">item</span> <span class="k">in</span> <span class="nv">this.children.filter</span><span class="o">(</span><span class="nv">F.stars</span> <span class="o">&gt;</span> <span class="m">3</span><span class="o">)</span> <span class="cp">%}</span>
<span class="p">&lt;</span><span class="nt">li</span><span class="p">&gt;</span><span class="cp">{{</span> <span class="nv">item.name</span> <span class="cp">}}</span>: <span class="cp">{{</span> <span class="nv">item.stars</span> <span class="cp">}}</span> stars<span class="p">&lt;/</span><span class="nt">li</span><span class="p">&gt;</span>
@ -305,7 +305,7 @@ or <a href="../../types/float/" class="ref">floats</a>.</p>
</footer>
<script type=text/javascript src="../../../../../static/app.js?h=bb1b933a" charset="utf-8"></script>
<script type=text/javascript src="../../../../../static/app.js?h=d85eb4b1" charset="utf-8"></script>
<script>
((window.gitter = {}).chat = {}).options = {
room: 'lektor/lektor',

View File

@ -4,7 +4,7 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link rel="stylesheet" href="../../../../static/styles.css?h=ca3aba42">
<link rel="stylesheet" href="../../../../static/styles.css?h=7041cc50">
<link rel="stylesheet" href="../../../../static/pygments.css">
<link rel="shortcut icon" href="../../../../static/favicon.png?h=fa09bedd">
<title>Expression | Documentation | Lektor Static Content Management System</title>
@ -232,7 +232,7 @@ of it can create more expressive expressions. <code>F.name</code> literally jus
that a field by that name exists and is set to a value.</p>
<p>The query syntax is mostly the same in Python as well as in the Jinja 2
templates, the main difference are <a href="../and/" class="ref">and</a> and <a href="../or/" class="ref">or</a>.</p>
<h2 id="example">Example</h2><div class="hll"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="n">p</span><span class="o">.</span><span class="n">children</span><span class="o">.</span><span class="n">filter</span><span class="p">((</span><span class="n">F</span><span class="o">.</span><span class="n">name</span> <span class="o">==</span> <span class="s1">&#39;foo&#39;</span><span class="p">)</span> <span class="o">|</span> <span class="p">(</span><span class="n">F</span><span class="o">.</span><span class="n">name</span> <span class="o">==</span> <span class="s1">&#39;bar&#39;</span><span class="p">))</span><span class="o">.</span><span class="n">all</span><span class="p">()</span>
<h2 id="example">Example</h2><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="n">p</span><span class="o">.</span><span class="n">children</span><span class="o">.</span><span class="n">filter</span><span class="p">((</span><span class="n">F</span><span class="o">.</span><span class="n">name</span> <span class="o">==</span> <span class="s1">&#39;foo&#39;</span><span class="p">)</span> <span class="o">|</span> <span class="p">(</span><span class="n">F</span><span class="o">.</span><span class="n">name</span> <span class="o">==</span> <span class="s1">&#39;bar&#39;</span><span class="p">))</span><span class="o">.</span><span class="n">all</span><span class="p">()</span>
<span class="go">[&lt;Page model=u&#39;page&#39; id=u&#39;bar&#39;&gt;, &lt;Page model=u&#39;page&#39; id=u&#39;foo&#39;&gt;]</span>
</pre></div>
@ -464,7 +464,7 @@ templates, the main difference are <a href="../and/" class="ref">and</a> and <a
</footer>
<script type=text/javascript src="../../../../static/app.js?h=bb1b933a" charset="utf-8"></script>
<script type=text/javascript src="../../../../static/app.js?h=d85eb4b1" charset="utf-8"></script>
<script>
((window.gitter = {}).chat = {}).options = {
room: 'lektor/lektor',

View File

@ -4,7 +4,7 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link rel="stylesheet" href="../../../../../static/styles.css?h=ca3aba42">
<link rel="stylesheet" href="../../../../../static/styles.css?h=7041cc50">
<link rel="stylesheet" href="../../../../../static/pygments.css">
<link rel="shortcut icon" href="../../../../../static/favicon.png?h=fa09bedd">
<title>&lt;= | Documentation | Lektor Static Content Management System</title>
@ -230,7 +230,7 @@
<p>This evaluates to true if the left side compares smaller than the right side
or equal to it. This behavior works best with <a href="../../types/integer/" class="ref">integers</a> or <a href="../../types/float/" class="ref">floats</a>.</p>
<h2 id="template-example">Template Example</h2><div class="hll"><pre><span></span><span class="p">&lt;</span><span class="nt">h3</span><span class="p">&gt;</span>Projects From Before Including 2000<span class="p">&lt;/</span><span class="nt">h3</span><span class="p">&gt;</span>
<h2 id="template-example">Template Example</h2><div class="highlight"><pre><span></span><span class="p">&lt;</span><span class="nt">h3</span><span class="p">&gt;</span>Projects From Before Including 2000<span class="p">&lt;/</span><span class="nt">h3</span><span class="p">&gt;</span>
<span class="p">&lt;</span><span class="nt">ul</span><span class="p">&gt;</span>
<span class="cp">{%</span> <span class="k">for</span> <span class="nv">item</span> <span class="k">in</span> <span class="nv">this.children.filter</span><span class="o">(</span><span class="nv">F.year</span> <span class="o">&lt;=</span> <span class="m">2000</span><span class="o">)</span> <span class="cp">%}</span>
<span class="p">&lt;</span><span class="nt">li</span><span class="p">&gt;</span><span class="cp">{{</span> <span class="nv">item.name</span> <span class="cp">}}</span> (<span class="cp">{{</span> <span class="nv">item.year</span> <span class="cp">}}</span>)<span class="p">&lt;/</span><span class="nt">li</span><span class="p">&gt;</span>
@ -304,7 +304,7 @@ or equal to it. This behavior works best with <a href="../../types/integer/" cl
</footer>
<script type=text/javascript src="../../../../../static/app.js?h=bb1b933a" charset="utf-8"></script>
<script type=text/javascript src="../../../../../static/app.js?h=d85eb4b1" charset="utf-8"></script>
<script>
((window.gitter = {}).chat = {}).options = {
room: 'lektor/lektor',

View File

@ -4,7 +4,7 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link rel="stylesheet" href="../../../../../static/styles.css?h=ca3aba42">
<link rel="stylesheet" href="../../../../../static/styles.css?h=7041cc50">
<link rel="stylesheet" href="../../../../../static/pygments.css">
<link rel="shortcut icon" href="../../../../../static/favicon.png?h=fa09bedd">
<title>&lt; | Documentation | Lektor Static Content Management System</title>
@ -230,7 +230,7 @@
<p>This evaluates to true if the left side compares smaller than the right side
or equal to it. This behavior works best with <a href="../../types/integer/" class="ref">integers</a> or <a href="../../types/float/" class="ref">floats</a>.</p>
<h2 id="template-example">Template Example</h2><div class="hll"><pre><span></span><span class="p">&lt;</span><span class="nt">h3</span><span class="p">&gt;</span>Projects From Before 2000<span class="p">&lt;/</span><span class="nt">h3</span><span class="p">&gt;</span>
<h2 id="template-example">Template Example</h2><div class="highlight"><pre><span></span><span class="p">&lt;</span><span class="nt">h3</span><span class="p">&gt;</span>Projects From Before 2000<span class="p">&lt;/</span><span class="nt">h3</span><span class="p">&gt;</span>
<span class="p">&lt;</span><span class="nt">ul</span><span class="p">&gt;</span>
<span class="cp">{%</span> <span class="k">for</span> <span class="nv">item</span> <span class="k">in</span> <span class="nv">this.children.filter</span><span class="o">(</span><span class="nv">F.year</span> <span class="o">&lt;</span> <span class="m">2000</span><span class="o">)</span> <span class="cp">%}</span>
<span class="p">&lt;</span><span class="nt">li</span><span class="p">&gt;</span><span class="cp">{{</span> <span class="nv">item.name</span> <span class="cp">}}</span> (<span class="cp">{{</span> <span class="nv">item.year</span> <span class="cp">}}</span>)<span class="p">&lt;/</span><span class="nt">li</span><span class="p">&gt;</span>
@ -304,7 +304,7 @@ or equal to it. This behavior works best with <a href="../../types/integer/" cl
</footer>
<script type=text/javascript src="../../../../../static/app.js?h=bb1b933a" charset="utf-8"></script>
<script type=text/javascript src="../../../../../static/app.js?h=d85eb4b1" charset="utf-8"></script>
<script>
((window.gitter = {}).chat = {}).options = {
room: 'lektor/lektor',

View File

@ -4,7 +4,7 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link rel="stylesheet" href="../../../../../static/styles.css?h=ca3aba42">
<link rel="stylesheet" href="../../../../../static/styles.css?h=7041cc50">
<link rel="stylesheet" href="../../../../../static/pygments.css">
<link rel="shortcut icon" href="../../../../../static/favicon.png?h=fa09bedd">
<title>!= | Documentation | Lektor Static Content Management System</title>
@ -230,7 +230,7 @@
<p>This checks if the left side of the expression does not match the right side
by doing an exact comparison:</p>
<h2 id="example">Example</h2><div class="hll"><pre><span></span><span class="p">&lt;</span><span class="nt">h2</span><span class="p">&gt;</span>Everything Other Than Houses<span class="p">&lt;/</span><span class="nt">h2</span><span class="p">&gt;</span>
<h2 id="example">Example</h2><div class="highlight"><pre><span></span><span class="p">&lt;</span><span class="nt">h2</span><span class="p">&gt;</span>Everything Other Than Houses<span class="p">&lt;/</span><span class="nt">h2</span><span class="p">&gt;</span>
<span class="p">&lt;</span><span class="nt">ul</span><span class="p">&gt;</span>
<span class="cp">{%</span> <span class="k">for</span> <span class="nv">project</span> <span class="k">in</span> <span class="nv">this.children.filter</span><span class="o">(</span><span class="nv">F.type</span> <span class="o">!=</span> <span class="s1">&#39;house&#39;</span><span class="o">)</span> <span class="cp">%}</span>
<span class="p">&lt;</span><span class="nt">li</span><span class="p">&gt;</span><span class="cp">{{</span> <span class="nv">project.name</span> <span class="cp">}}</span><span class="p">&lt;/</span><span class="nt">li</span><span class="p">&gt;</span>
@ -304,7 +304,7 @@ by doing an exact comparison:</p>
</footer>
<script type=text/javascript src="../../../../../static/app.js?h=bb1b933a" charset="utf-8"></script>
<script type=text/javascript src="../../../../../static/app.js?h=d85eb4b1" charset="utf-8"></script>
<script>
((window.gitter = {}).chat = {}).options = {
room: 'lektor/lektor',

View File

@ -4,7 +4,7 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link rel="stylesheet" href="../../../../../static/styles.css?h=ca3aba42">
<link rel="stylesheet" href="../../../../../static/styles.css?h=7041cc50">
<link rel="stylesheet" href="../../../../../static/pygments.css">
<link rel="shortcut icon" href="../../../../../static/favicon.png?h=fa09bedd">
<title>or | Documentation | Lektor Static Content Management System</title>
@ -234,7 +234,7 @@
expression on the right are true. This is one of the few operators that
differs between Python and templates. In templates you have to use the
<code>or</code> method whereas in Python have to use the <code>|</code> operator.</p>
<h2 id="template-example">Template Example</h2><div class="hll"><pre><span></span><span class="p">&lt;</span><span class="nt">h3</span><span class="p">&gt;</span>Hotels or Apartments<span class="p">&lt;/</span><span class="nt">h3</span><span class="p">&gt;</span>
<h2 id="template-example">Template Example</h2><div class="highlight"><pre><span></span><span class="p">&lt;</span><span class="nt">h3</span><span class="p">&gt;</span>Hotels or Apartments<span class="p">&lt;/</span><span class="nt">h3</span><span class="p">&gt;</span>
<span class="p">&lt;</span><span class="nt">ul</span><span class="p">&gt;</span>
<span class="cp">{%</span> <span class="k">for</span> <span class="nv">item</span> <span class="k">in</span> <span class="nv">this.children.filter</span><span class="o">(</span>
<span class="o">(</span><span class="nv">F.type</span> <span class="o">==</span> <span class="s1">&#39;hotel&#39;</span><span class="o">)</span><span class="nv">.or</span><span class="o">(</span><span class="nv">F.type</span> <span class="o">==</span> <span class="s1">&#39;apartment&#39;</span><span class="o">))</span> <span class="cp">%}</span>
@ -242,7 +242,7 @@ differs between Python and templates. In templates you have to use the
<span class="cp">{%</span> <span class="k">endfor</span> <span class="cp">%}</span>
<span class="p">&lt;/</span><span class="nt">ul</span><span class="p">&gt;</span>
</pre></div>
<h2 id="python-example">Python Example</h2><div class="hll"><pre><span></span><span class="k">def</span> <span class="nf">get_hotels_or_apartments</span><span class="p">(</span><span class="n">page</span><span class="p">):</span>
<h2 id="python-example">Python Example</h2><div class="highlight"><pre><span></span><span class="k">def</span> <span class="nf">get_hotels_or_apartments</span><span class="p">(</span><span class="n">page</span><span class="p">):</span>
<span class="k">return</span> <span class="n">page</span><span class="o">.</span><span class="n">children</span><span class="o">.</span><span class="n">filter</span><span class="p">(</span>
<span class="p">(</span><span class="n">F</span><span class="o">.</span><span class="n">type</span> <span class="o">==</span> <span class="s1">&#39;hotel&#39;</span><span class="p">)</span> <span class="o">|</span> <span class="p">(</span><span class="n">F</span><span class="o">.</span><span class="n">type</span> <span class="o">==</span> <span class="s1">&#39;apartment&#39;</span><span class="p">))</span>
</pre></div>
@ -313,7 +313,7 @@ differs between Python and templates. In templates you have to use the
</footer>
<script type=text/javascript src="../../../../../static/app.js?h=bb1b933a" charset="utf-8"></script>
<script type=text/javascript src="../../../../../static/app.js?h=d85eb4b1" charset="utf-8"></script>
<script>
((window.gitter = {}).chat = {}).options = {
room: 'lektor/lektor',

View File

@ -4,7 +4,7 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link rel="stylesheet" href="../../../../../static/styles.css?h=ca3aba42">
<link rel="stylesheet" href="../../../../../static/styles.css?h=7041cc50">
<link rel="stylesheet" href="../../../../../static/pygments.css">
<link rel="shortcut icon" href="../../../../../static/favicon.png?h=fa09bedd">
<title>startswith_cs | Documentation | Lektor Static Content Management System</title>
@ -232,7 +232,7 @@
on the left side starts with the string on the right side. This method
operates in a case-sensitive manner. For the case-insensitive method
see <a href="../startswith/" class="ref">startswith</a>.</p>
<h2 id="example">Example</h2><div class="hll"><pre><span></span><span class="p">&lt;</span><span class="nt">h1</span><span class="p">&gt;</span>A<span class="p">&lt;/</span><span class="nt">h1</span><span class="p">&gt;</span>
<h2 id="example">Example</h2><div class="highlight"><pre><span></span><span class="p">&lt;</span><span class="nt">h1</span><span class="p">&gt;</span>A<span class="p">&lt;/</span><span class="nt">h1</span><span class="p">&gt;</span>
<span class="p">&lt;</span><span class="nt">ul</span><span class="p">&gt;</span>
<span class="cp">{%</span> <span class="k">for</span> <span class="nv">item</span> <span class="k">in</span> <span class="nv">this.children.filter</span><span class="o">(</span><span class="nv">F.name.startswith_cs</span><span class="o">(</span><span class="s1">&#39;A&#39;</span><span class="o">))</span> <span class="cp">%}</span>
<span class="p">&lt;</span><span class="nt">li</span><span class="p">&gt;</span><span class="cp">{{</span> <span class="nv">item.name</span> <span class="cp">}}</span><span class="p">&lt;/</span><span class="nt">li</span><span class="p">&gt;</span>
@ -306,7 +306,7 @@ see <a href="../startswith/" class="ref">startswith</a>.</p>
</footer>
<script type=text/javascript src="../../../../../static/app.js?h=bb1b933a" charset="utf-8"></script>
<script type=text/javascript src="../../../../../static/app.js?h=d85eb4b1" charset="utf-8"></script>
<script>
((window.gitter = {}).chat = {}).options = {
room: 'lektor/lektor',

View File

@ -4,7 +4,7 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link rel="stylesheet" href="../../../../../static/styles.css?h=ca3aba42">
<link rel="stylesheet" href="../../../../../static/styles.css?h=7041cc50">
<link rel="stylesheet" href="../../../../../static/pygments.css">
<link rel="shortcut icon" href="../../../../../static/favicon.png?h=fa09bedd">
<title>startswith | Documentation | Lektor Static Content Management System</title>
@ -232,7 +232,7 @@
on the left side starts with the string on the right side. This method
operates in a case-insensitive manner. For the case-sensitive method
see <a href="../startswith-cs/" class="ref">startswith_cs</a>.</p>
<h2 id="example">Example</h2><div class="hll"><pre><span></span><span class="p">&lt;</span><span class="nt">h1</span><span class="p">&gt;</span>A<span class="p">&lt;/</span><span class="nt">h1</span><span class="p">&gt;</span>
<h2 id="example">Example</h2><div class="highlight"><pre><span></span><span class="p">&lt;</span><span class="nt">h1</span><span class="p">&gt;</span>A<span class="p">&lt;/</span><span class="nt">h1</span><span class="p">&gt;</span>
<span class="p">&lt;</span><span class="nt">ul</span><span class="p">&gt;</span>
<span class="cp">{%</span> <span class="k">for</span> <span class="nv">item</span> <span class="k">in</span> <span class="nv">this.children.filter</span><span class="o">(</span><span class="nv">F.name.startswith</span><span class="o">(</span><span class="s1">&#39;a&#39;</span><span class="o">))</span> <span class="cp">%}</span>
<span class="p">&lt;</span><span class="nt">li</span><span class="p">&gt;</span><span class="cp">{{</span> <span class="nv">item.name</span> <span class="cp">}}</span><span class="p">&lt;/</span><span class="nt">li</span><span class="p">&gt;</span>
@ -306,7 +306,7 @@ see <a href="../startswith-cs/" class="ref">startswith_cs</a>.</p>
</footer>
<script type=text/javascript src="../../../../../static/app.js?h=bb1b933a" charset="utf-8"></script>
<script type=text/javascript src="../../../../../static/app.js?h=d85eb4b1" charset="utf-8"></script>
<script>
((window.gitter = {}).chat = {}).options = {
room: 'lektor/lektor',

View File

@ -4,7 +4,7 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link rel="stylesheet" href="../../../../static/styles.css?h=ca3aba42">
<link rel="stylesheet" href="../../../../static/styles.css?h=7041cc50">
<link rel="stylesheet" href="../../../../static/pygments.css">
<link rel="shortcut icon" href="../../../../static/favicon.png?h=fa09bedd">
<title>F | Documentation | Lektor Static Content Management System</title>
@ -192,7 +192,7 @@ field of an arbitrary record. This can be achieved with the <code>F</code> obje
attribute of it refers to a field in the record. To make this clearer, have a
look at the example below.</p>
<p>Accessing an attributes creates an <a href="../expression/" class="ref">Expression</a>.</p>
<h2 id="example">Example</h2><div class="hll"><pre><span></span><span class="p">&lt;</span><span class="nt">ul</span><span class="p">&gt;</span>
<h2 id="example">Example</h2><div class="highlight"><pre><span></span><span class="p">&lt;</span><span class="nt">ul</span><span class="p">&gt;</span>
<span class="cp">{%</span> <span class="k">for</span> <span class="nv">item</span> <span class="k">in</span> <span class="nv">this.children.filter</span><span class="o">(</span><span class="nv">F.status</span> <span class="o">==</span> <span class="s1">&#39;published&#39;</span><span class="o">)</span> <span class="cp">%}</span>
<span class="p">&lt;</span><span class="nt">li</span><span class="p">&gt;</span><span class="cp">{{</span> <span class="nv">item.title</span> <span class="cp">}}</span><span class="p">&lt;/</span><span class="nt">li</span><span class="p">&gt;</span>
<span class="cp">{%</span> <span class="k">endfor</span> <span class="cp">%}</span>
@ -265,7 +265,7 @@ look at the example below.</p>
</footer>
<script type=text/javascript src="../../../../static/app.js?h=bb1b933a" charset="utf-8"></script>
<script type=text/javascript src="../../../../static/app.js?h=d85eb4b1" charset="utf-8"></script>
<script>
((window.gitter = {}).chat = {}).options = {
room: 'lektor/lektor',

View File

@ -4,7 +4,7 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link rel="stylesheet" href="../../../../static/styles.css?h=ca3aba42">
<link rel="stylesheet" href="../../../../static/styles.css?h=7041cc50">
<link rel="stylesheet" href="../../../../static/pygments.css">
<link rel="shortcut icon" href="../../../../static/favicon.png?h=fa09bedd">
<title>get_alts | Documentation | Lektor Static Content Management System</title>
@ -194,7 +194,7 @@ value is an empty list.</p>
<p>This returns only the list of alt short IDs. Access to the configured name
of the alt within the project config is not available. Databags should be
used to provide alts with a humand readable title.</p>
<h2 id="example">Example</h2><div class="hll"><pre><span></span><span class="p">&lt;</span><span class="nt">p</span><span class="p">&gt;</span>Other languages:
<h2 id="example">Example</h2><div class="highlight"><pre><span></span><span class="p">&lt;</span><span class="nt">p</span><span class="p">&gt;</span>Other languages:
<span class="p">&lt;</span><span class="nt">ul</span><span class="p">&gt;</span>
<span class="cp">{%</span> <span class="k">for</span> <span class="nv">alt</span> <span class="k">in</span> <span class="nv">get_alts</span><span class="o">(</span><span class="nv">this</span><span class="o">)</span> <span class="cp">%}</span>
<span class="p">&lt;</span><span class="nt">li</span><span class="p">&gt;&lt;</span><span class="nt">a</span> <span class="na">href</span><span class="o">=</span><span class="s">&quot;</span><span class="cp">{{</span> <span class="s1">&#39;.&#39;</span><span class="o">|</span><span class="nf">url</span><span class="o">(</span><span class="nv">alt</span><span class="o">=</span><span class="nv">alt</span><span class="o">)</span> <span class="cp">}}</span><span class="s">&quot;</span><span class="p">&gt;</span><span class="cp">{{</span> <span class="nv">alt</span><span class="o">|</span><span class="nf">title</span> <span class="cp">}}</span><span class="p">&lt;/</span><span class="nt">a</span><span class="p">&gt;&lt;/</span><span class="nt">li</span><span class="p">&gt;</span>
@ -268,7 +268,7 @@ used to provide alts with a humand readable title.</p>
</footer>
<script type=text/javascript src="../../../../static/app.js?h=bb1b933a" charset="utf-8"></script>
<script type=text/javascript src="../../../../static/app.js?h=d85eb4b1" charset="utf-8"></script>
<script>
((window.gitter = {}).chat = {}).options = {
room: 'lektor/lektor',

View File

@ -4,7 +4,7 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link rel="stylesheet" href="../../../static/styles.css?h=ca3aba42">
<link rel="stylesheet" href="../../../static/styles.css?h=7041cc50">
<link rel="stylesheet" href="../../../static/pygments.css">
<link rel="shortcut icon" href="../../../static/favicon.png?h=fa09bedd">
<title>Database | Documentation | Lektor Static Content Management System</title>
@ -369,7 +369,7 @@ the <code>shell</code> command as well as from within the templates.</p>
</footer>
<script type=text/javascript src="../../../static/app.js?h=bb1b933a" charset="utf-8"></script>
<script type=text/javascript src="../../../static/app.js?h=d85eb4b1" charset="utf-8"></script>
<script>
((window.gitter = {}).chat = {}).options = {
room: 'lektor/lektor',

View File

@ -4,7 +4,7 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link rel="stylesheet" href="../../../../../static/styles.css?h=ca3aba42">
<link rel="stylesheet" href="../../../../../static/styles.css?h=7041cc50">
<link rel="stylesheet" href="../../../../../static/pygments.css">
<link rel="shortcut icon" href="../../../../../static/favicon.png?h=fa09bedd">
<title>alt | Documentation | Lektor Static Content Management System</title>
@ -227,7 +227,7 @@
<p>For most source records there will be an associated <a href="../../../../content/alts/" class="ref">alt</a>. This attribute points to it. If the content
is not associated with an alt this can be <code>None</code>.</p>
<h2 id="example">Example</h2><div class="hll"><pre><span></span><span class="cm">&lt;!-- generated from alt </span><span class="cp">{{</span> <span class="nv">this.alt</span> <span class="cp">}}</span><span class="cm"> --&gt;</span>
<h2 id="example">Example</h2><div class="highlight"><pre><span></span><span class="cm">&lt;!-- generated from alt </span><span class="cp">{{</span> <span class="nv">this.alt</span> <span class="cp">}}</span><span class="cm"> --&gt;</span>
</pre></div>
@ -296,7 +296,7 @@ is not associated with an alt this can be <code>None</code>.</p>
</footer>
<script type=text/javascript src="../../../../../static/app.js?h=bb1b933a" charset="utf-8"></script>
<script type=text/javascript src="../../../../../static/app.js?h=d85eb4b1" charset="utf-8"></script>
<script>
((window.gitter = {}).chat = {}).options = {
room: 'lektor/lektor',

View File

@ -4,7 +4,7 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link rel="stylesheet" href="../../../../static/styles.css?h=ca3aba42">
<link rel="stylesheet" href="../../../../static/styles.css?h=7041cc50">
<link rel="stylesheet" href="../../../../static/pygments.css">
<link rel="shortcut icon" href="../../../../static/favicon.png?h=fa09bedd">
<title>SourceObject | Documentation | Lektor Static Content Management System</title>
@ -245,7 +245,7 @@ in the path. The part after the at sign is called the “virtual path”.</p>
the record's path + <code>@source</code>. So if the record was <code>/hello</code> then the
path would be <code>/hello@source</code>. The true base record it belongs to can be
referenced from the <a href="record/" class="ref">record</a> property.</p>
<div class="hll"><pre><span></span><span class="kn">from</span> <span class="nn">lektor.sourceobj</span> <span class="kn">import</span> <span class="n">VirtualSourceObject</span>
<div class="highlight"><pre><span></span><span class="kn">from</span> <span class="nn">lektor.sourceobj</span> <span class="kn">import</span> <span class="n">VirtualSourceObject</span>
<span class="kn">from</span> <span class="nn">lektor.utils</span> <span class="kn">import</span> <span class="n">build_url</span>
<span class="k">class</span> <span class="nc">Source</span><span class="p">(</span><span class="n">VirtualSourceObject</span><span class="p">):</span>
@ -480,7 +480,7 @@ referenced from the <a href="record/" class="ref">record</a> property.</p>
</footer>
<script type=text/javascript src="../../../../static/app.js?h=bb1b933a" charset="utf-8"></script>
<script type=text/javascript src="../../../../static/app.js?h=d85eb4b1" charset="utf-8"></script>
<script>
((window.gitter = {}).chat = {}).options = {
room: 'lektor/lektor',

View File

@ -4,7 +4,7 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link rel="stylesheet" href="../../../../../static/styles.css?h=ca3aba42">
<link rel="stylesheet" href="../../../../../static/styles.css?h=7041cc50">
<link rel="stylesheet" href="../../../../../static/pygments.css">
<link rel="shortcut icon" href="../../../../../static/favicon.png?h=fa09bedd">
<title>is_child_of | Documentation | Lektor Static Content Management System</title>
@ -230,7 +230,7 @@ page or not. The default behavior is to consider a page to be a child of
itself as this is more convenient in most situations but this can be
changed with the <code>strict</code> parameter. This method is particularly useful
when building a navigation.</p>
<h2 id="example">Example</h2><div class="hll"><pre><span></span><span class="p">&lt;</span><span class="nt">a</span> <span class="na">href</span><span class="o">=</span><span class="s">&quot;</span><span class="cp">{{</span> <span class="s1">&#39;/projects&#39;</span><span class="o">|</span><span class="nf">url</span> <span class="cp">}}</span><span class="s">&quot;</span><span class="cp">{%</span> <span class="k">if</span> <span class="nv">this.is_child_of</span><span class="o">(</span><span class="s1">&#39;/projects&#39;</span><span class="o">)</span>
<h2 id="example">Example</h2><div class="highlight"><pre><span></span><span class="p">&lt;</span><span class="nt">a</span> <span class="na">href</span><span class="o">=</span><span class="s">&quot;</span><span class="cp">{{</span> <span class="s1">&#39;/projects&#39;</span><span class="o">|</span><span class="nf">url</span> <span class="cp">}}</span><span class="s">&quot;</span><span class="cp">{%</span> <span class="k">if</span> <span class="nv">this.is_child_of</span><span class="o">(</span><span class="s1">&#39;/projects&#39;</span><span class="o">)</span>
<span class="cp">%}</span> <span class="na">class</span><span class="o">=</span><span class="s">&quot;active&quot;</span><span class="cp">{%</span> <span class="k">endif</span> <span class="cp">%}</span><span class="p">&gt;</span>Projects<span class="p">&lt;/</span><span class="nt">a</span><span class="p">&gt;</span>
</pre></div>
@ -300,7 +300,7 @@ when building a navigation.</p>
</footer>
<script type=text/javascript src="../../../../../static/app.js?h=bb1b933a" charset="utf-8"></script>
<script type=text/javascript src="../../../../../static/app.js?h=d85eb4b1" charset="utf-8"></script>
<script>
((window.gitter = {}).chat = {}).options = {
room: 'lektor/lektor',

View File

@ -4,7 +4,7 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link rel="stylesheet" href="../../../../../static/styles.css?h=ca3aba42">
<link rel="stylesheet" href="../../../../../static/styles.css?h=7041cc50">
<link rel="stylesheet" href="../../../../../static/pygments.css">
<link rel="shortcut icon" href="../../../../../static/favicon.png?h=fa09bedd">
<title>is_discoverable | Documentation | Lektor Static Content Management System</title>
@ -238,7 +238,7 @@ to implement drafts of blog posts or similar things.</p>
<p>This property is implemented on the level of source objects to make it
possible to use this API in all cases. The default implementation of
source objects will always return <code>true</code> for discoverability checks.</p>
<h2 id="example">Example</h2><div class="hll"><pre><span></span><span class="cp">{%</span> <span class="k">set</span> <span class="nv">downloads</span> <span class="o">=</span> <span class="nv">site.get</span><span class="o">(</span><span class="s1">&#39;/downloads&#39;</span><span class="o">)</span> <span class="cp">%}</span>
<h2 id="example">Example</h2><div class="highlight"><pre><span></span><span class="cp">{%</span> <span class="k">set</span> <span class="nv">downloads</span> <span class="o">=</span> <span class="nv">site.get</span><span class="o">(</span><span class="s1">&#39;/downloads&#39;</span><span class="o">)</span> <span class="cp">%}</span>
<span class="cp">{%</span> <span class="k">if</span> <span class="nv">downloads.is_discoverable</span> <span class="cp">%}</span>
<span class="p">&lt;</span><span class="nt">p</span><span class="p">&gt;&lt;</span><span class="nt">a</span> <span class="na">href</span><span class="o">=</span><span class="s">&quot;</span><span class="cp">{{</span> <span class="nv">downloads</span><span class="o">|</span><span class="nf">url</span> <span class="cp">}}</span><span class="s">&quot;</span><span class="p">&gt;</span>Go to downloads<span class="p">&lt;/</span><span class="nt">a</span><span class="p">&gt;</span>
<span class="cp">{%</span> <span class="k">endif</span> <span class="cp">%}</span>
@ -310,7 +310,7 @@ source objects will always return <code>true</code> for discoverability checks.<
</footer>
<script type=text/javascript src="../../../../../static/app.js?h=bb1b933a" charset="utf-8"></script>
<script type=text/javascript src="../../../../../static/app.js?h=d85eb4b1" charset="utf-8"></script>
<script>
((window.gitter = {}).chat = {}).options = {
room: 'lektor/lektor',

View File

@ -4,7 +4,7 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link rel="stylesheet" href="../../../../../static/styles.css?h=ca3aba42">
<link rel="stylesheet" href="../../../../../static/styles.css?h=7041cc50">
<link rel="stylesheet" href="../../../../../static/pygments.css">
<link rel="shortcut icon" href="../../../../../static/favicon.png?h=fa09bedd">
<title>is_hidden | Documentation | Lektor Static Content Management System</title>
@ -235,7 +235,7 @@ instance hidden pages can be used to store configuration values.</p>
<p>This property is implemented on the level of source objects to make it
possible to use this API in all cases though the default implementation for
source objects is that they are always visible.</p>
<h2 id="example">Example</h2><div class="hll"><pre><span></span><span class="cp">{%</span> <span class="k">set</span> <span class="nv">downloads</span> <span class="o">=</span> <span class="nv">site.get</span><span class="o">(</span><span class="s1">&#39;/downloads&#39;</span><span class="o">)</span> <span class="cp">%}</span>
<h2 id="example">Example</h2><div class="highlight"><pre><span></span><span class="cp">{%</span> <span class="k">set</span> <span class="nv">downloads</span> <span class="o">=</span> <span class="nv">site.get</span><span class="o">(</span><span class="s1">&#39;/downloads&#39;</span><span class="o">)</span> <span class="cp">%}</span>
<span class="cp">{%</span> <span class="k">if</span> <span class="nv">downloads.is_hidden</span> <span class="cp">%}</span>
<span class="p">&lt;</span><span class="nt">p</span><span class="p">&gt;</span>Downloads are currently unavailable
<span class="cp">{%</span> <span class="k">endif</span> <span class="cp">%}</span>
@ -307,7 +307,7 @@ source objects is that they are always visible.</p>
</footer>
<script type=text/javascript src="../../../../../static/app.js?h=bb1b933a" charset="utf-8"></script>
<script type=text/javascript src="../../../../../static/app.js?h=d85eb4b1" charset="utf-8"></script>
<script>
((window.gitter = {}).chat = {}).options = {
room: 'lektor/lektor',

View File

@ -4,7 +4,7 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link rel="stylesheet" href="../../../../../static/styles.css?h=ca3aba42">
<link rel="stylesheet" href="../../../../../static/styles.css?h=7041cc50">
<link rel="stylesheet" href="../../../../../static/pygments.css">
<link rel="shortcut icon" href="../../../../../static/favicon.png?h=fa09bedd">
<title>is_undiscoverable | Documentation | Lektor Static Content Management System</title>
@ -288,7 +288,7 @@ bit nicer in some places.</p>
</footer>
<script type=text/javascript src="../../../../../static/app.js?h=bb1b933a" charset="utf-8"></script>
<script type=text/javascript src="../../../../../static/app.js?h=d85eb4b1" charset="utf-8"></script>
<script>
((window.gitter = {}).chat = {}).options = {
room: 'lektor/lektor',

View File

@ -4,7 +4,7 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link rel="stylesheet" href="../../../../../static/styles.css?h=ca3aba42">
<link rel="stylesheet" href="../../../../../static/styles.css?h=7041cc50">
<link rel="stylesheet" href="../../../../../static/pygments.css">
<link rel="shortcut icon" href="../../../../../static/favicon.png?h=fa09bedd">
<title>is_visible | Documentation | Lektor Static Content Management System</title>
@ -226,7 +226,7 @@
</ul>
<p>This is exactly the opposite of <a href="../is-hidden/" class="ref">is_hidden</a>.</p>
<h2 id="example">Example</h2><div class="hll"><pre><span></span><span class="cp">{%</span> <span class="k">set</span> <span class="nv">downloads</span> <span class="o">=</span> <span class="nv">site.get</span><span class="o">(</span><span class="s1">&#39;/downloads&#39;</span><span class="o">)</span> <span class="cp">%}</span>
<h2 id="example">Example</h2><div class="highlight"><pre><span></span><span class="cp">{%</span> <span class="k">set</span> <span class="nv">downloads</span> <span class="o">=</span> <span class="nv">site.get</span><span class="o">(</span><span class="s1">&#39;/downloads&#39;</span><span class="o">)</span> <span class="cp">%}</span>
<span class="cp">{%</span> <span class="k">if</span> <span class="nv">downloads.is_visible</span> <span class="cp">%}</span>
<span class="p">&lt;</span><span class="nt">p</span><span class="p">&gt;&lt;</span><span class="nt">a</span> <span class="na">href</span><span class="o">=</span><span class="s">&quot;</span><span class="cp">{{</span> <span class="nv">downloads</span><span class="o">|</span><span class="nf">url</span> <span class="cp">}}</span><span class="s">&quot;</span><span class="p">&gt;</span>go to downloads<span class="p">&lt;/</span><span class="nt">a</span><span class="p">&gt;</span>
<span class="cp">{%</span> <span class="k">endif</span> <span class="cp">%}</span>
@ -298,7 +298,7 @@
</footer>
<script type=text/javascript src="../../../../../static/app.js?h=bb1b933a" charset="utf-8"></script>
<script type=text/javascript src="../../../../../static/app.js?h=d85eb4b1" charset="utf-8"></script>
<script>
((window.gitter = {}).chat = {}).options = {
room: 'lektor/lektor',

View File

@ -4,7 +4,7 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link rel="stylesheet" href="../../../../../static/styles.css?h=ca3aba42">
<link rel="stylesheet" href="../../../../../static/styles.css?h=7041cc50">
<link rel="stylesheet" href="../../../../../static/pygments.css">
<link rel="shortcut icon" href="../../../../../static/favicon.png?h=fa09bedd">
<title>parent | Documentation | Lektor Static Content Management System</title>
@ -229,7 +229,7 @@
this property. It's not a requirement that this property is implemented but
most will have it. In particular it's useful for virtual source objects
where this property can be used to discover the associated parent object.</p>
<h2 id="example">Example</h2><div class="hll"><pre><span></span><span class="p">&lt;</span><span class="nt">p</span><span class="p">&gt;</span>My parent is: <span class="cp">{{</span> <span class="nv">this.parent.path</span> <span class="cp">}}</span>
<h2 id="example">Example</h2><div class="highlight"><pre><span></span><span class="p">&lt;</span><span class="nt">p</span><span class="p">&gt;</span>My parent is: <span class="cp">{{</span> <span class="nv">this.parent.path</span> <span class="cp">}}</span>
</pre></div>
@ -298,7 +298,7 @@ where this property can be used to discover the associated parent object.</p>
</footer>
<script type=text/javascript src="../../../../../static/app.js?h=bb1b933a" charset="utf-8"></script>
<script type=text/javascript src="../../../../../static/app.js?h=d85eb4b1" charset="utf-8"></script>
<script>
((window.gitter = {}).chat = {}).options = {
room: 'lektor/lektor',

View File

@ -4,7 +4,7 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link rel="stylesheet" href="../../../../../static/styles.css?h=ca3aba42">
<link rel="stylesheet" href="../../../../../static/styles.css?h=7041cc50">
<link rel="stylesheet" href="../../../../../static/pygments.css">
<link rel="shortcut icon" href="../../../../../static/favicon.png?h=fa09bedd">
<title>path | Documentation | Lektor Static Content Management System</title>
@ -287,7 +287,7 @@ will be <code>None</code> as the object cannot be queried (it's virtual).</p>
</footer>
<script type=text/javascript src="../../../../../static/app.js?h=bb1b933a" charset="utf-8"></script>
<script type=text/javascript src="../../../../../static/app.js?h=d85eb4b1" charset="utf-8"></script>
<script>
((window.gitter = {}).chat = {}).options = {
room: 'lektor/lektor',

View File

@ -4,7 +4,7 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link rel="stylesheet" href="../../../../../static/styles.css?h=ca3aba42">
<link rel="stylesheet" href="../../../../../static/styles.css?h=7041cc50">
<link rel="stylesheet" href="../../../../../static/pygments.css">
<link rel="shortcut icon" href="../../../../../static/favicon.png?h=fa09bedd">
<title>record | Documentation | Lektor Static Content Management System</title>
@ -236,7 +236,7 @@ for virtual sources this refers back to the record that was associated with
the virtual source. Most of the time this matches <code>parent</code> but for nested
source objects it's useful to be able to refer back to the base in all cases
without having to walk up the parents.</p>
<h2 id="example">Example</h2><div class="hll"><pre><span></span><span class="cp">{%</span> <span class="k">if</span> <span class="nv">this</span> <span class="o">!=</span> <span class="nv">this.record</span> <span class="cp">%}</span>
<h2 id="example">Example</h2><div class="highlight"><pre><span></span><span class="cp">{%</span> <span class="k">if</span> <span class="nv">this</span> <span class="o">!=</span> <span class="nv">this.record</span> <span class="cp">%}</span>
<span class="p">&lt;</span><span class="nt">a</span> <span class="na">href</span><span class="o">=</span><span class="s">&quot;</span><span class="cp">{{</span> <span class="nv">this.record</span><span class="o">|</span><span class="nf">url</span> <span class="cp">}}</span><span class="s">&quot;</span><span class="p">&gt;</span>go back to overview<span class="p">&lt;/</span><span class="nt">a</span><span class="p">&gt;</span>
<span class="cp">{%</span> <span class="k">endif</span> <span class="cp">%}</span>
</pre></div>
@ -307,7 +307,7 @@ without having to walk up the parents.</p>
</footer>
<script type=text/javascript src="../../../../../static/app.js?h=bb1b933a" charset="utf-8"></script>
<script type=text/javascript src="../../../../../static/app.js?h=d85eb4b1" charset="utf-8"></script>
<script>
((window.gitter = {}).chat = {}).options = {
room: 'lektor/lektor',

View File

@ -4,7 +4,7 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link rel="stylesheet" href="../../../../../static/styles.css?h=ca3aba42">
<link rel="stylesheet" href="../../../../../static/styles.css?h=7041cc50">
<link rel="stylesheet" href="../../../../../static/pygments.css">
<link rel="shortcut icon" href="../../../../../static/favicon.png?h=fa09bedd">
<title>source_filename | Documentation | Lektor Static Content Management System</title>
@ -229,7 +229,7 @@
instance if this is an asset it will be the path to it, if it is a record
it will be the path to the lektor contents file. The path is relative
to the project folder.</p>
<h2 id="example">Example</h2><div class="hll"><pre><span></span><span class="p">&lt;</span><span class="nt">p</span><span class="p">&gt;</span>
<h2 id="example">Example</h2><div class="highlight"><pre><span></span><span class="p">&lt;</span><span class="nt">p</span><span class="p">&gt;</span>
Generated from <span class="cp">{{</span> <span class="nv">this.source_filename</span> <span class="cp">}}</span>
<span class="p">&lt;/</span><span class="nt">p</span><span class="p">&gt;</span>
</pre></div>
@ -300,7 +300,7 @@ to the project folder.</p>
</footer>
<script type=text/javascript src="../../../../../static/app.js?h=bb1b933a" charset="utf-8"></script>
<script type=text/javascript src="../../../../../static/app.js?h=d85eb4b1" charset="utf-8"></script>
<script>
((window.gitter = {}).chat = {}).options = {
room: 'lektor/lektor',

View File

@ -4,7 +4,7 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link rel="stylesheet" href="../../../../../static/styles.css?h=ca3aba42">
<link rel="stylesheet" href="../../../../../static/styles.css?h=7041cc50">
<link rel="stylesheet" href="../../../../../static/pygments.css">
<link rel="shortcut icon" href="../../../../../static/favicon.png?h=fa09bedd">
<title>url_path | Documentation | Lektor Static Content Management System</title>
@ -286,7 +286,7 @@ filter or the <a href="../url-to/" class="ref">url_to</a> method would be used.<
</footer>
<script type=text/javascript src="../../../../../static/app.js?h=bb1b933a" charset="utf-8"></script>
<script type=text/javascript src="../../../../../static/app.js?h=d85eb4b1" charset="utf-8"></script>
<script>
((window.gitter = {}).chat = {}).options = {
room: 'lektor/lektor',

View File

@ -4,7 +4,7 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link rel="stylesheet" href="../../../../../static/styles.css?h=ca3aba42">
<link rel="stylesheet" href="../../../../../static/styles.css?h=7041cc50">
<link rel="stylesheet" href="../../../../../static/pygments.css">
<link rel="shortcut icon" href="../../../../../static/favicon.png?h=fa09bedd">
<title>url_to | Documentation | Lektor Static Content Management System</title>
@ -236,7 +236,7 @@ domain part to the URL (if configured). The default behavior is to use the
configured URL style (which is <code>relative</code>) unless absolute or external were
explicitly provided. For more information read about this in the
<a href="../../../../project/file/#[project]" class="ref">Project Configuration</a>.</p>
<h2 id="example">Example</h2><div class="hll"><pre><span></span><span class="cp">{%</span> <span class="k">set</span> <span class="nv">downloads</span> <span class="o">=</span> <span class="nv">site.get</span><span class="o">(</span><span class="s1">&#39;/downloads&#39;</span><span class="o">)</span> <span class="cp">%}</span>
<h2 id="example">Example</h2><div class="highlight"><pre><span></span><span class="cp">{%</span> <span class="k">set</span> <span class="nv">downloads</span> <span class="o">=</span> <span class="nv">site.get</span><span class="o">(</span><span class="s1">&#39;/downloads&#39;</span><span class="o">)</span> <span class="cp">%}</span>
Path from downloads to here: <span class="cp">{{</span> <span class="nv">downloads.url_to</span><span class="o">(</span><span class="nv">this</span><span class="o">)</span> <span class="cp">}}</span>
</pre></div>
@ -306,7 +306,7 @@ Path from downloads to here: <span class="cp">{{</span> <span class="nv">downloa
</footer>
<script type=text/javascript src="../../../../../static/app.js?h=bb1b933a" charset="utf-8"></script>
<script type=text/javascript src="../../../../../static/app.js?h=d85eb4b1" charset="utf-8"></script>
<script>
((window.gitter = {}).chat = {}).options = {
room: 'lektor/lektor',

View File

@ -4,7 +4,7 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link rel="stylesheet" href="../../../../../static/styles.css?h=ca3aba42">
<link rel="stylesheet" href="../../../../../static/styles.css?h=7041cc50">
<link rel="stylesheet" href="../../../../../static/pygments.css">
<link rel="shortcut icon" href="../../../../../static/favicon.png?h=fa09bedd">
<title>databags | Documentation | Lektor Static Content Management System</title>
@ -266,7 +266,7 @@
</footer>
<script type=text/javascript src="../../../../../static/app.js?h=bb1b933a" charset="utf-8"></script>
<script type=text/javascript src="../../../../../static/app.js?h=d85eb4b1" charset="utf-8"></script>
<script>
((window.gitter = {}).chat = {}).options = {
room: 'lektor/lektor',

View File

@ -4,7 +4,7 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link rel="stylesheet" href="../../../../../static/styles.css?h=ca3aba42">
<link rel="stylesheet" href="../../../../../static/styles.css?h=7041cc50">
<link rel="stylesheet" href="../../../../../static/pygments.css">
<link rel="shortcut icon" href="../../../../../static/favicon.png?h=fa09bedd">
<title>get_root | Documentation | Lektor Static Content Management System</title>
@ -211,7 +211,7 @@
<a href="../../../../content/alts/" class="ref">Alternatives</a>. This method can be used
to target the root page of a specific one. If no alt is provided, then the
primary alt is loaded.</p>
<h2 id="example">Example</h2><div class="hll"><pre><span></span><span class="cp">{%</span> <span class="k">set</span> <span class="nv">root</span> <span class="o">=</span> <span class="nv">site.get_root</span><span class="o">(</span><span class="nv">alt</span><span class="o">=</span><span class="s1">&#39;de&#39;</span><span class="o">)</span> <span class="cp">%}</span>
<h2 id="example">Example</h2><div class="highlight"><pre><span></span><span class="cp">{%</span> <span class="k">set</span> <span class="nv">root</span> <span class="o">=</span> <span class="nv">site.get_root</span><span class="o">(</span><span class="nv">alt</span><span class="o">=</span><span class="s1">&#39;de&#39;</span><span class="o">)</span> <span class="cp">%}</span>
<span class="p">&lt;</span><span class="nt">a</span> <span class="na">href</span><span class="o">=</span><span class="s">&quot;</span><span class="cp">{{</span> <span class="nv">root</span><span class="o">|</span><span class="nf">url</span> <span class="cp">}}</span><span class="s">&quot;</span><span class="p">&gt;</span>Go to German Page<span class="p">&lt;/</span><span class="nt">a</span><span class="p">&gt;</span>
</pre></div>
@ -281,7 +281,7 @@ primary alt is loaded.</p>
</footer>
<script type=text/javascript src="../../../../../static/app.js?h=bb1b933a" charset="utf-8"></script>
<script type=text/javascript src="../../../../../static/app.js?h=d85eb4b1" charset="utf-8"></script>
<script>
((window.gitter = {}).chat = {}).options = {
room: 'lektor/lektor',

View File

@ -4,7 +4,7 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link rel="stylesheet" href="../../../../../static/styles.css?h=ca3aba42">
<link rel="stylesheet" href="../../../../../static/styles.css?h=7041cc50">
<link rel="stylesheet" href="../../../../../static/pygments.css">
<link rel="shortcut icon" href="../../../../../static/favicon.png?h=fa09bedd">
<title>get | Documentation | Lektor Static Content Management System</title>
@ -219,17 +219,17 @@ want to select a specific page for pagination, then you need to pass
<code>page_num</code> with a valid page number or you use the virtual path (<code>@1</code> for the
first page for instance).</p>
<h2 id="examples">Examples</h2><p>This is a simple example that shows how to use the method in a template:</p>
<div class="hll"><pre><span></span><span class="cp">{%</span> <span class="k">set</span> <span class="nv">root</span> <span class="o">=</span> <span class="nv">site.get</span><span class="o">(</span><span class="s1">&#39;/&#39;</span><span class="o">)</span> <span class="cp">%}</span>
<div class="highlight"><pre><span></span><span class="cp">{%</span> <span class="k">set</span> <span class="nv">root</span> <span class="o">=</span> <span class="nv">site.get</span><span class="o">(</span><span class="s1">&#39;/&#39;</span><span class="o">)</span> <span class="cp">%}</span>
<span class="p">&lt;</span><span class="nt">title</span><span class="p">&gt;</span><span class="cp">{{</span> <span class="nv">this.title</span> <span class="cp">}}</span> | <span class="cp">{{</span> <span class="nv">root.title</span> <span class="cp">}}</span><span class="p">&lt;/</span><span class="nt">title</span><span class="p">&gt;</span>
</pre></div>
<p>Here another example that loads the current page but in another language:</p>
<div class="hll"><pre><span></span><span class="cp">{%</span> <span class="k">set</span> <span class="nv">other_lang</span> <span class="o">=</span> <span class="nv">site.get</span><span class="o">(</span><span class="nv">this._path</span><span class="o">,</span> <span class="nv">alt</span><span class="o">=</span><span class="s1">&#39;ru&#39;</span><span class="o">)</span> <span class="cp">%}</span>
<div class="highlight"><pre><span></span><span class="cp">{%</span> <span class="k">set</span> <span class="nv">other_lang</span> <span class="o">=</span> <span class="nv">site.get</span><span class="o">(</span><span class="nv">this._path</span><span class="o">,</span> <span class="nv">alt</span><span class="o">=</span><span class="s1">&#39;ru&#39;</span><span class="o">)</span> <span class="cp">%}</span>
<span class="p">&lt;</span><span class="nt">p</span><span class="p">&gt;</span>This page in Russian: <span class="cp">{{</span> <span class="nv">other_lang.title</span> <span class="cp">}}</span>
</pre></div>
<h2 id="virtual-paths">Virtual Paths</h2><p>This method can also be used to look up <a href="../../../../content/paths/" class="ref">virtual paths</a>. For instance to fetch a specific version of a
pagination you can use a virtual path instead of using the <code>page_num</code>
parameter:</p>
<div class="hll"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="n">pad</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s1">&#39;/blog@3&#39;</span><span class="p">)</span>
<div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="n">pad</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s1">&#39;/blog@3&#39;</span><span class="p">)</span>
<span class="go">&lt;Page model=u&#39;blog&#39; path=&#39;/blog&#39; page_num=3&gt;</span>
</pre></div>
@ -299,7 +299,7 @@ parameter:</p>
</footer>
<script type=text/javascript src="../../../../../static/app.js?h=bb1b933a" charset="utf-8"></script>
<script type=text/javascript src="../../../../../static/app.js?h=d85eb4b1" charset="utf-8"></script>
<script>
((window.gitter = {}).chat = {}).options = {
room: 'lektor/lektor',

View File

@ -4,7 +4,7 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link rel="stylesheet" href="../../../../static/styles.css?h=ca3aba42">
<link rel="stylesheet" href="../../../../static/styles.css?h=7041cc50">
<link rel="stylesheet" href="../../../../static/pygments.css">
<link rel="shortcut icon" href="../../../../static/favicon.png?h=fa09bedd">
<title>Pad | Documentation | Lektor Static Content Management System</title>
@ -224,12 +224,12 @@ command line scripts.</p>
<h2 id="template-usage">Template Usage</h2><p>A ready-configured pad is always available under the <code>site</code> name which
allows you to easily discover other pages. Here is a basic example of
how to do this through the <a href="get/" class="ref">get</a> method:</p>
<div class="hll"><pre><span></span><span class="cp">{%</span> <span class="k">set</span> <span class="nv">root</span> <span class="o">=</span> <span class="nv">site.get</span><span class="o">(</span><span class="s1">&#39;/&#39;</span><span class="o">)</span> <span class="cp">%}</span>
<div class="highlight"><pre><span></span><span class="cp">{%</span> <span class="k">set</span> <span class="nv">root</span> <span class="o">=</span> <span class="nv">site.get</span><span class="o">(</span><span class="s1">&#39;/&#39;</span><span class="o">)</span> <span class="cp">%}</span>
<span class="p">&lt;</span><span class="nt">title</span><span class="p">&gt;</span><span class="cp">{{</span> <span class="nv">this.title</span> <span class="cp">}}</span> | <span class="cp">{{</span> <span class="nv">root.title</span> <span class="cp">}}</span><span class="p">&lt;/</span><span class="nt">title</span><span class="p">&gt;</span>
</pre></div>
<h2 id="plugin-usage">Plugin Usage</h2><p>Within plugins it's typically not a good idea to construct a new Pad.
Instead you can get access to the current pad from the active context:</p>
<div class="hll"><pre><span></span><span class="kn">from</span> <span class="nn">lektor.context</span> <span class="kn">import</span> <span class="n">get_ctx</span>
<div class="highlight"><pre><span></span><span class="kn">from</span> <span class="nn">lektor.context</span> <span class="kn">import</span> <span class="n">get_ctx</span>
<span class="n">ctx</span> <span class="o">=</span> <span class="n">get_ctx</span><span class="p">()</span>
<span class="k">if</span> <span class="n">ctx</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span><span class="p">:</span>
@ -241,7 +241,7 @@ instance.</p>
<h2 id="manual-pad-creation">Manual Pad Creation</h2><p>If you want to work with the database from a script, you can create a
pad from the <a href="../../environment/" class="ref">Environment</a> with the help of
the <a href="../../environment/new-pad/" class="ref">new_pad</a> method:</p>
<div class="hll"><pre><span></span><span class="kn">from</span> <span class="nn">lektor.project</span> <span class="kn">import</span> <span class="n">Project</span>
<div class="highlight"><pre><span></span><span class="kn">from</span> <span class="nn">lektor.project</span> <span class="kn">import</span> <span class="n">Project</span>
<span class="n">project</span> <span class="o">=</span> <span class="n">Project</span><span class="o">.</span><span class="n">discover</span><span class="p">()</span>
<span class="n">env</span> <span class="o">=</span> <span class="n">project</span><span class="o">.</span><span class="n">make_env</span><span class="p">()</span>
@ -391,7 +391,7 @@ the <a href="../../environment/new-pad/" class="ref">new_pad</a> method:</p>
</footer>
<script type=text/javascript src="../../../../static/app.js?h=bb1b933a" charset="utf-8"></script>
<script type=text/javascript src="../../../../static/app.js?h=d85eb4b1" charset="utf-8"></script>
<script>
((window.gitter = {}).chat = {}).options = {
room: 'lektor/lektor',

View File

@ -4,7 +4,7 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link rel="stylesheet" href="../../../../../static/styles.css?h=ca3aba42">
<link rel="stylesheet" href="../../../../../static/styles.css?h=7041cc50">
<link rel="stylesheet" href="../../../../../static/pygments.css">
<link rel="shortcut icon" href="../../../../../static/favicon.png?h=fa09bedd">
<title>query | Documentation | Lektor Static Content Management System</title>
@ -211,7 +211,7 @@
Lektor. It creates a query at a specific path and alt. This is an
alternative to accessing the children of the <a href="../root/" class="ref">root</a> record
and will also include hidden pages.</p>
<h2 id="example">Example</h2><div class="hll"><pre><span></span><span class="p">&lt;</span><span class="nt">ul</span><span class="p">&gt;</span>
<h2 id="example">Example</h2><div class="highlight"><pre><span></span><span class="p">&lt;</span><span class="nt">ul</span><span class="p">&gt;</span>
<span class="cp">{%</span> <span class="k">for</span> <span class="nv">project</span> <span class="k">in</span> <span class="nv">site.query</span><span class="o">(</span><span class="s1">&#39;/projects&#39;</span><span class="o">)</span> <span class="cp">%}</span>
<span class="p">&lt;</span><span class="nt">li</span><span class="p">&gt;</span><span class="cp">{{</span> <span class="nv">project.name</span> <span class="cp">}}</span>: <span class="cp">{{</span> <span class="nv">project.year</span> <span class="cp">}}</span><span class="p">&lt;/</span><span class="nt">li</span><span class="p">&gt;</span>
<span class="cp">{%</span> <span class="k">endfor</span> <span class="cp">%}</span>
@ -284,7 +284,7 @@ and will also include hidden pages.</p>
</footer>
<script type=text/javascript src="../../../../../static/app.js?h=bb1b933a" charset="utf-8"></script>
<script type=text/javascript src="../../../../../static/app.js?h=d85eb4b1" charset="utf-8"></script>
<script>
((window.gitter = {}).chat = {}).options = {
room: 'lektor/lektor',

View File

@ -4,7 +4,7 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link rel="stylesheet" href="../../../../../static/styles.css?h=ca3aba42">
<link rel="stylesheet" href="../../../../../static/styles.css?h=7041cc50">
<link rel="stylesheet" href="../../../../../static/pygments.css">
<link rel="shortcut icon" href="../../../../../static/favicon.png?h=fa09bedd">
<title>resolve_url_path | Documentation | Lektor Static Content Management System</title>
@ -215,7 +215,7 @@ happening in Lektor.</p>
want to resolve to records you can pass <code>include_assets=False</code> and only
records will be included.</p>
<h2 id="examples">Examples</h2><p>Shows an example of how to resolve paths into assets:</p>
<div class="hll"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="n">pad</span><span class="o">.</span><span class="n">resolve_url_path</span><span class="p">(</span><span class="s1">&#39;/docs/api&#39;</span><span class="p">)</span>
<div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="n">pad</span><span class="o">.</span><span class="n">resolve_url_path</span><span class="p">(</span><span class="s1">&#39;/docs/api&#39;</span><span class="p">)</span>
<span class="go">&lt;Page model=u&#39;doc-page&#39; path=u&#39;/docs/api&#39;&gt;</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">pad</span><span class="o">.</span><span class="n">resolve_url_path</span><span class="p">(</span><span class="s1">&#39;/header.jpg&#39;</span><span class="p">)</span>
<span class="go">&lt;Image model=&#39;none&#39; path=u&#39;/header.jpg&#39;&gt;</span>
@ -291,7 +291,7 @@ records will be included.</p>
</footer>
<script type=text/javascript src="../../../../../static/app.js?h=bb1b933a" charset="utf-8"></script>
<script type=text/javascript src="../../../../../static/app.js?h=d85eb4b1" charset="utf-8"></script>
<script>
((window.gitter = {}).chat = {}).options = {
room: 'lektor/lektor',

View File

@ -4,7 +4,7 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link rel="stylesheet" href="../../../../../static/styles.css?h=ca3aba42">
<link rel="stylesheet" href="../../../../../static/styles.css?h=7041cc50">
<link rel="stylesheet" href="../../../../../static/pygments.css">
<link rel="shortcut icon" href="../../../../../static/favicon.png?h=fa09bedd">
<title>root | Documentation | Lektor Static Content Management System</title>
@ -209,7 +209,7 @@
<p>This works exactly like <a href="../get-root/" class="ref">get_root</a> but always returns
the primary alternative and is implemented as a property.</p>
<h2 id="example">Example</h2><div class="hll"><pre><span></span><span class="p">&lt;</span><span class="nt">a</span> <span class="na">href</span><span class="o">=</span><span class="s">&quot;</span><span class="cp">{{</span> <span class="nv">site.root</span><span class="o">|</span><span class="nf">url</span> <span class="cp">}}</span><span class="s">&quot;</span><span class="p">&gt;</span>Go to Index<span class="p">&lt;/</span><span class="nt">a</span><span class="p">&gt;</span>
<h2 id="example">Example</h2><div class="highlight"><pre><span></span><span class="p">&lt;</span><span class="nt">a</span> <span class="na">href</span><span class="o">=</span><span class="s">&quot;</span><span class="cp">{{</span> <span class="nv">site.root</span><span class="o">|</span><span class="nf">url</span> <span class="cp">}}</span><span class="s">&quot;</span><span class="p">&gt;</span>Go to Index<span class="p">&lt;/</span><span class="nt">a</span><span class="p">&gt;</span>
</pre></div>
@ -278,7 +278,7 @@ the primary alternative and is implemented as a property.</p>
</footer>
<script type=text/javascript src="../../../../../static/app.js?h=bb1b933a" charset="utf-8"></script>
<script type=text/javascript src="../../../../../static/app.js?h=d85eb4b1" charset="utf-8"></script>
<script>
((window.gitter = {}).chat = {}).options = {
room: 'lektor/lektor',

View File

@ -4,7 +4,7 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link rel="stylesheet" href="../../../../../static/styles.css?h=ca3aba42">
<link rel="stylesheet" href="../../../../../static/styles.css?h=7041cc50">
<link rel="stylesheet" href="../../../../../static/pygments.css">
<link rel="shortcut icon" href="../../../../../static/favicon.png?h=fa09bedd">
<title>all | Documentation | Lektor Static Content Management System</title>
@ -232,7 +232,7 @@
the query as a list. In many cases just iterating over the query achieve
the same result, but if you want an actual list this method comes in
handy.</p>
<h2 id="example">Example</h2><div class="hll"><pre><span></span><span class="cp">{%</span> <span class="k">items</span> <span class="o">=</span> <span class="nv">site.query</span><span class="o">(</span><span class="s1">&#39;/projects&#39;</span><span class="o">)</span><span class="nv">.include_hidden</span><span class="o">(</span><span class="kp">false</span><span class="o">)</span><span class="nv">.all</span><span class="o">()</span> <span class="cp">%}</span>
<h2 id="example">Example</h2><div class="highlight"><pre><span></span><span class="cp">{%</span> <span class="k">items</span> <span class="o">=</span> <span class="nv">site.query</span><span class="o">(</span><span class="s1">&#39;/projects&#39;</span><span class="o">)</span><span class="nv">.include_hidden</span><span class="o">(</span><span class="kp">false</span><span class="o">)</span><span class="nv">.all</span><span class="o">()</span> <span class="cp">%}</span>
<span class="cp">{%</span> <span class="k">if</span> <span class="nv">items</span> <span class="cp">%}</span>
<span class="p">&lt;</span><span class="nt">ul</span><span class="p">&gt;</span>
<span class="cp">{%</span> <span class="k">for</span> <span class="nv">item</span> <span class="k">in</span> <span class="nv">items</span> <span class="cp">%}</span>
@ -308,7 +308,7 @@ handy.</p>
</footer>
<script type=text/javascript src="../../../../../static/app.js?h=bb1b933a" charset="utf-8"></script>
<script type=text/javascript src="../../../../../static/app.js?h=d85eb4b1" charset="utf-8"></script>
<script>
((window.gitter = {}).chat = {}).options = {
room: 'lektor/lektor',

View File

@ -4,7 +4,7 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link rel="stylesheet" href="../../../../../static/styles.css?h=ca3aba42">
<link rel="stylesheet" href="../../../../../static/styles.css?h=7041cc50">
<link rel="stylesheet" href="../../../../../static/pygments.css">
<link rel="shortcut icon" href="../../../../../static/favicon.png?h=fa09bedd">
<title>count | Documentation | Lektor Static Content Management System</title>
@ -229,7 +229,7 @@
</ul>
<p>This is a simple way to count the total number of items a query matches.</p>
<h2 id="example">Example</h2><div class="hll"><pre><span></span><span class="cp">{%</span> <span class="k">set</span> <span class="nv">project_count</span> <span class="o">=</span> <span class="nv">site.query</span><span class="o">(</span><span class="s1">&#39;/projects&#39;</span><span class="o">)</span><span class="nv">.count</span><span class="o">()</span> <span class="cp">%}</span>
<h2 id="example">Example</h2><div class="highlight"><pre><span></span><span class="cp">{%</span> <span class="k">set</span> <span class="nv">project_count</span> <span class="o">=</span> <span class="nv">site.query</span><span class="o">(</span><span class="s1">&#39;/projects&#39;</span><span class="o">)</span><span class="nv">.count</span><span class="o">()</span> <span class="cp">%}</span>
<span class="p">&lt;</span><span class="nt">p</span><span class="p">&gt;</span>We built <span class="cp">{{</span> <span class="nv">project_count</span> <span class="cp">}}</span> projects.
</pre></div>
@ -299,7 +299,7 @@
</footer>
<script type=text/javascript src="../../../../../static/app.js?h=bb1b933a" charset="utf-8"></script>
<script type=text/javascript src="../../../../../static/app.js?h=d85eb4b1" charset="utf-8"></script>
<script>
((window.gitter = {}).chat = {}).options = {
room: 'lektor/lektor',

View File

@ -4,7 +4,7 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link rel="stylesheet" href="../../../../../static/styles.css?h=ca3aba42">
<link rel="stylesheet" href="../../../../../static/styles.css?h=7041cc50">
<link rel="stylesheet" href="../../../../../static/pygments.css">
<link rel="shortcut icon" href="../../../../../static/favicon.png?h=fa09bedd">
<title>distinct | Documentation | Lektor Static Content Management System</title>
@ -233,14 +233,14 @@
<p>Returns a <code>set</code> with all values for <code>field_name</code> of all
<a href="../../record/" class="ref">Records</a> in this query.</p>
<h2 id="example">Example</h2><p>If your blog posts have a field called <code>tags</code>:</p>
<div class="hll"><pre><span></span><span class="c1"># blog-post.ini</span><span class="w"></span>
<div class="highlight"><pre><span></span><span class="c1"># blog-post.ini</span><span class="w"></span>
<span class="k">[field.tags]</span><span class="w"></span>
<span class="na">name</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">Tags</span><span class="w"></span>
<span class="na">type</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">strings</span><span class="w"></span>
</pre></div>
<p>You can display all your blog posts' tags with:</p>
<div class="hll"><pre><span></span><span class="cp">{%</span> <span class="k">set</span> <span class="nv">tags</span> <span class="o">=</span> <span class="nv">site.query</span><span class="o">(</span><span class="s1">&#39;/blog&#39;</span><span class="o">)</span><span class="nv">.distinct</span><span class="o">(</span><span class="s1">&#39;tags&#39;</span><span class="o">)</span> <span class="cp">%}</span>
<div class="highlight"><pre><span></span><span class="cp">{%</span> <span class="k">set</span> <span class="nv">tags</span> <span class="o">=</span> <span class="nv">site.query</span><span class="o">(</span><span class="s1">&#39;/blog&#39;</span><span class="o">)</span><span class="nv">.distinct</span><span class="o">(</span><span class="s1">&#39;tags&#39;</span><span class="o">)</span> <span class="cp">%}</span>
<span class="cp">{%</span> <span class="k">if</span> <span class="nv">tags</span> <span class="cp">%}</span>
<span class="p">&lt;</span><span class="nt">ul</span><span class="p">&gt;</span>
<span class="cp">{%</span> <span class="k">for</span> <span class="nv">tag</span> <span class="k">in</span> <span class="nv">tags</span><span class="o">|</span><span class="nf">sort</span> <span class="cp">%}</span>
@ -316,7 +316,7 @@
</footer>
<script type=text/javascript src="../../../../../static/app.js?h=bb1b933a" charset="utf-8"></script>
<script type=text/javascript src="../../../../../static/app.js?h=d85eb4b1" charset="utf-8"></script>
<script>
((window.gitter = {}).chat = {}).options = {
room: 'lektor/lektor',

View File

@ -4,7 +4,7 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link rel="stylesheet" href="../../../../../static/styles.css?h=ca3aba42">
<link rel="stylesheet" href="../../../../../static/styles.css?h=7041cc50">
<link rel="stylesheet" href="../../../../../static/pygments.css">
<link rel="shortcut icon" href="../../../../../static/favicon.png?h=fa09bedd">
<title>filter | Documentation | Lektor Static Content Management System</title>
@ -234,7 +234,7 @@ which allows you to perform comparisons with values that fields have.</p>
<p>Multiple filter calls can be chained as an alternative to using an <code>and</code>
expression.</p>
<h2 id="example">Example</h2><p>Here a basic example of how to filter something in a template:</p>
<div class="hll"><pre><span></span><span class="p">&lt;</span><span class="nt">ul</span><span class="p">&gt;</span>
<div class="highlight"><pre><span></span><span class="p">&lt;</span><span class="nt">ul</span><span class="p">&gt;</span>
<span class="cp">{%</span> <span class="k">for</span> <span class="nv">item</span> <span class="k">in</span> <span class="nv">this.children.filter</span><span class="o">(</span><span class="nv">F.status</span> <span class="o">==</span> <span class="s1">&#39;published&#39;</span><span class="o">)</span> <span class="cp">%}</span>
<span class="p">&lt;</span><span class="nt">li</span><span class="p">&gt;</span><span class="cp">{{</span> <span class="nv">item.title</span> <span class="cp">}}</span><span class="p">&lt;/</span><span class="nt">li</span><span class="p">&gt;</span>
<span class="cp">{%</span> <span class="k">endfor</span> <span class="cp">%}</span>
@ -307,7 +307,7 @@ expression.</p>
</footer>
<script type=text/javascript src="../../../../../static/app.js?h=bb1b933a" charset="utf-8"></script>
<script type=text/javascript src="../../../../../static/app.js?h=d85eb4b1" charset="utf-8"></script>
<script>
((window.gitter = {}).chat = {}).options = {
room: 'lektor/lektor',

View File

@ -4,7 +4,7 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link rel="stylesheet" href="../../../../../static/styles.css?h=ca3aba42">
<link rel="stylesheet" href="../../../../../static/styles.css?h=7041cc50">
<link rel="stylesheet" href="../../../../../static/pygments.css">
<link rel="shortcut icon" href="../../../../../static/favicon.png?h=fa09bedd">
<title>first | Documentation | Lektor Static Content Management System</title>
@ -230,7 +230,7 @@
<p>This method returns the first <a href="../../record/" class="ref">Record</a> that matches the
query. If no such record can be produced, <code>None</code> is returned.</p>
<h2 id="example">Example</h2><div class="hll"><pre><span></span><span class="cp">{%</span> <span class="k">set</span> <span class="nv">first_visible</span> <span class="o">=</span> <span class="nv">this.children.first</span><span class="o">()</span> <span class="cp">%}</span>
<h2 id="example">Example</h2><div class="highlight"><pre><span></span><span class="cp">{%</span> <span class="k">set</span> <span class="nv">first_visible</span> <span class="o">=</span> <span class="nv">this.children.first</span><span class="o">()</span> <span class="cp">%}</span>
<span class="cp">{%</span> <span class="k">if</span> <span class="nv">first_visible</span> <span class="cp">%}</span>
<span class="p">&lt;</span><span class="nt">h2</span><span class="p">&gt;</span>Explore More ...<span class="p">&lt;/</span><span class="nt">h2</span><span class="p">&gt;</span>
<span class="p">&lt;</span><span class="nt">p</span><span class="p">&gt;</span><span class="cp">{{</span> <span class="nv">first_visible.title</span> <span class="cp">}}</span>
@ -303,7 +303,7 @@ query. If no such record can be produced, <code>None</code> is returned.</p>
</footer>
<script type=text/javascript src="../../../../../static/app.js?h=bb1b933a" charset="utf-8"></script>
<script type=text/javascript src="../../../../../static/app.js?h=d85eb4b1" charset="utf-8"></script>
<script>
((window.gitter = {}).chat = {}).options = {
room: 'lektor/lektor',

View File

@ -4,7 +4,7 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link rel="stylesheet" href="../../../../../static/styles.css?h=ca3aba42">
<link rel="stylesheet" href="../../../../../static/styles.css?h=7041cc50">
<link rel="stylesheet" href="../../../../../static/pygments.css">
<link rel="shortcut icon" href="../../../../../static/favicon.png?h=fa09bedd">
<title>get | Documentation | Lektor Static Content Management System</title>
@ -232,7 +232,7 @@
the <a href="../../pad/get/" class="ref">get</a> method of the pad but respects the currently
applied filtering. If <code>page_num</code> is provided it overrides the currently
requested page number from the query for pagination.</p>
<h2 id="example">Example</h2><div class="hll"><pre><span></span><span class="cp">{%</span> <span class="k">set</span> <span class="nv">p1</span> <span class="o">=</span> <span class="nv">this.children.get</span><span class="o">(</span><span class="s1">&#39;project-1&#39;</span><span class="o">)</span> <span class="cp">%}</span>
<h2 id="example">Example</h2><div class="highlight"><pre><span></span><span class="cp">{%</span> <span class="k">set</span> <span class="nv">p1</span> <span class="o">=</span> <span class="nv">this.children.get</span><span class="o">(</span><span class="s1">&#39;project-1&#39;</span><span class="o">)</span> <span class="cp">%}</span>
<span class="p">&lt;</span><span class="nt">h2</span><span class="p">&gt;</span><span class="cp">{{</span> <span class="nv">p1.name</span> <span class="cp">}}</span><span class="p">&lt;/</span><span class="nt">h2</span><span class="p">&gt;</span>
<span class="p">&lt;</span><span class="nt">p</span><span class="p">&gt;</span>Our favorite!
</pre></div>
@ -303,7 +303,7 @@ requested page number from the query for pagination.</p>
</footer>
<script type=text/javascript src="../../../../../static/app.js?h=bb1b933a" charset="utf-8"></script>
<script type=text/javascript src="../../../../../static/app.js?h=d85eb4b1" charset="utf-8"></script>
<script>
((window.gitter = {}).chat = {}).options = {
room: 'lektor/lektor',

View File

@ -4,7 +4,7 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link rel="stylesheet" href="../../../../../static/styles.css?h=ca3aba42">
<link rel="stylesheet" href="../../../../../static/styles.css?h=7041cc50">
<link rel="stylesheet" href="../../../../../static/pygments.css">
<link rel="shortcut icon" href="../../../../../static/favicon.png?h=fa09bedd">
<title>include_hidden | Documentation | Lektor Static Content Management System</title>
@ -236,7 +236,7 @@ method of the pad.</p>
<p>The parameter can be set to <code>True</code> to include hidden or <code>False</code> to exclude
hidden records.</p>
<h2 id="example">Example</h2><p>Here a basic example of how to filter something in a template:</p>
<div class="hll"><pre><span></span><span class="p">&lt;</span><span class="nt">ul</span><span class="p">&gt;</span>
<div class="highlight"><pre><span></span><span class="p">&lt;</span><span class="nt">ul</span><span class="p">&gt;</span>
<span class="cp">{%</span> <span class="k">for</span> <span class="nv">item</span> <span class="k">in</span> <span class="nv">this.children.include_hidden</span><span class="o">(</span><span class="kp">true</span><span class="o">)</span> <span class="cp">%}</span>
<span class="p">&lt;</span><span class="nt">li</span><span class="p">&gt;</span><span class="cp">{{</span> <span class="nv">item.title</span> <span class="cp">}}{%</span> <span class="k">if</span> <span class="nv">item.is_hidden</span> <span class="cp">%}</span> (hidden)<span class="cp">{%</span> <span class="k">endif</span> <span class="cp">%}</span><span class="p">&lt;/</span><span class="nt">li</span><span class="p">&gt;</span>
<span class="cp">{%</span> <span class="k">endfor</span> <span class="cp">%}</span>
@ -309,7 +309,7 @@ hidden records.</p>
</footer>
<script type=text/javascript src="../../../../../static/app.js?h=bb1b933a" charset="utf-8"></script>
<script type=text/javascript src="../../../../../static/app.js?h=d85eb4b1" charset="utf-8"></script>
<script>
((window.gitter = {}).chat = {}).options = {
room: 'lektor/lektor',

View File

@ -4,7 +4,7 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link rel="stylesheet" href="../../../../../static/styles.css?h=ca3aba42">
<link rel="stylesheet" href="../../../../../static/styles.css?h=7041cc50">
<link rel="stylesheet" href="../../../../../static/pygments.css">
<link rel="shortcut icon" href="../../../../../static/favicon.png?h=fa09bedd">
<title>include_undiscoverable | Documentation | Lektor Static Content Management System</title>
@ -237,7 +237,7 @@ include undiscoverable records by default.</p>
<p>If undiscoverable records should included this method needs to be used.
Set it to <code>True</code> to include hidden or <code>False</code> to exclude them (default).</p>
<h2 id="example">Example</h2><p>Here a basic example of how to filter something in a template:</p>
<div class="hll"><pre><span></span><span class="p">&lt;</span><span class="nt">ul</span><span class="p">&gt;</span>
<div class="highlight"><pre><span></span><span class="p">&lt;</span><span class="nt">ul</span><span class="p">&gt;</span>
<span class="cp">{%</span> <span class="k">for</span> <span class="nv">item</span> <span class="k">in</span> <span class="nv">this.children.include_undiscoverable</span><span class="o">(</span><span class="kp">true</span><span class="o">)</span> <span class="cp">%}</span>
<span class="p">&lt;</span><span class="nt">li</span><span class="p">&gt;</span><span class="cp">{{</span> <span class="nv">item.title</span> <span class="cp">}}</span><span class="p">&lt;/</span><span class="nt">li</span><span class="p">&gt;</span>
<span class="cp">{%</span> <span class="k">endfor</span> <span class="cp">%}</span>
@ -310,7 +310,7 @@ Set it to <code>True</code> to include hidden or <code>False</code> to exclude t
</footer>
<script type=text/javascript src="../../../../../static/app.js?h=bb1b933a" charset="utf-8"></script>
<script type=text/javascript src="../../../../../static/app.js?h=d85eb4b1" charset="utf-8"></script>
<script>
((window.gitter = {}).chat = {}).options = {
room: 'lektor/lektor',

View File

@ -4,7 +4,7 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link rel="stylesheet" href="../../../../static/styles.css?h=ca3aba42">
<link rel="stylesheet" href="../../../../static/styles.css?h=7041cc50">
<link rel="stylesheet" href="../../../../static/pygments.css">
<link rel="shortcut icon" href="../../../../static/favicon.png?h=fa09bedd">
<title>Query | Documentation | Lektor Static Content Management System</title>
@ -230,7 +230,7 @@ through either the <a href="../pad/" class="ref">Pad</a> or through things like
<p>Most operations on a query object return another one which will return a
more filtered result.</p>
<h2 id="example">Example</h2><p>Here a basic example of how to filter something in a template:</p>
<div class="hll"><pre><span></span><span class="p">&lt;</span><span class="nt">ul</span><span class="p">&gt;</span>
<div class="highlight"><pre><span></span><span class="p">&lt;</span><span class="nt">ul</span><span class="p">&gt;</span>
<span class="cp">{%</span> <span class="k">for</span> <span class="nv">item</span> <span class="k">in</span> <span class="nv">this.children.filter</span><span class="o">(</span><span class="nv">F.status</span> <span class="o">==</span> <span class="s1">&#39;published&#39;</span><span class="o">)</span> <span class="cp">%}</span>
<span class="p">&lt;</span><span class="nt">li</span><span class="p">&gt;</span><span class="cp">{{</span> <span class="nv">item.title</span> <span class="cp">}}</span><span class="p">&lt;/</span><span class="nt">li</span><span class="p">&gt;</span>
<span class="cp">{%</span> <span class="k">endfor</span> <span class="cp">%}</span>
@ -465,7 +465,7 @@ more filtered result.</p>
</footer>
<script type=text/javascript src="../../../../static/app.js?h=bb1b933a" charset="utf-8"></script>
<script type=text/javascript src="../../../../static/app.js?h=d85eb4b1" charset="utf-8"></script>
<script>
((window.gitter = {}).chat = {}).options = {
room: 'lektor/lektor',

View File

@ -4,7 +4,7 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link rel="stylesheet" href="../../../../../static/styles.css?h=ca3aba42">
<link rel="stylesheet" href="../../../../../static/styles.css?h=7041cc50">
<link rel="stylesheet" href="../../../../../static/pygments.css">
<link rel="shortcut icon" href="../../../../../static/favicon.png?h=fa09bedd">
<title>limit | Documentation | Lektor Static Content Management System</title>
@ -230,7 +230,7 @@
<p>The offset method can be used to limit the return value to a certain number
of matching records.</p>
<h2 id="example">Example</h2><div class="hll"><pre><span></span><span class="p">&lt;</span><span class="nt">h3</span><span class="p">&gt;</span>Our Top 3<span class="p">&lt;/</span><span class="nt">h3</span><span class="p">&gt;</span>
<h2 id="example">Example</h2><div class="highlight"><pre><span></span><span class="p">&lt;</span><span class="nt">h3</span><span class="p">&gt;</span>Our Top 3<span class="p">&lt;/</span><span class="nt">h3</span><span class="p">&gt;</span>
<span class="p">&lt;</span><span class="nt">ul</span><span class="p">&gt;</span>
<span class="cp">{%</span> <span class="k">for</span> <span class="nv">item</span> <span class="k">in</span> <span class="nv">this.children.order_by</span><span class="o">(</span><span class="s1">&#39;-rating&#39;</span><span class="o">)</span><span class="nv">.limit</span><span class="o">(</span><span class="m">3</span><span class="o">)</span> <span class="cp">%}</span>
<span class="p">&lt;</span><span class="nt">li</span><span class="p">&gt;</span><span class="cp">{{</span> <span class="nv">item.title</span> <span class="cp">}}</span><span class="p">&lt;/</span><span class="nt">li</span><span class="p">&gt;</span>
@ -304,7 +304,7 @@ of matching records.</p>
</footer>
<script type=text/javascript src="../../../../../static/app.js?h=bb1b933a" charset="utf-8"></script>
<script type=text/javascript src="../../../../../static/app.js?h=d85eb4b1" charset="utf-8"></script>
<script>
((window.gitter = {}).chat = {}).options = {
room: 'lektor/lektor',

View File

@ -4,7 +4,7 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link rel="stylesheet" href="../../../../../static/styles.css?h=ca3aba42">
<link rel="stylesheet" href="../../../../../static/styles.css?h=7041cc50">
<link rel="stylesheet" href="../../../../../static/pygments.css">
<link rel="shortcut icon" href="../../../../../static/favicon.png?h=fa09bedd">
<title>offset | Documentation | Lektor Static Content Management System</title>
@ -232,7 +232,7 @@
this is not useful as pagination comes built-in, but it can be helpful in
some manual scenarios when working with data from the <code>shell</code>.</p>
<p>This is typically combined with <a href="../limit/" class="ref">limit</a>.</p>
<h2 id="example">Example</h2><div class="hll"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="n">pad</span><span class="o">.</span><span class="n">query</span><span class="p">(</span><span class="s1">&#39;/projects&#39;</span><span class="p">)</span><span class="o">.</span><span class="n">limit</span><span class="p">(</span><span class="mi">5</span><span class="p">)</span><span class="o">.</span><span class="n">offset</span><span class="p">(</span><span class="mi">10</span><span class="p">)</span><span class="o">.</span><span class="n">all</span><span class="p">()</span>
<h2 id="example">Example</h2><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="n">pad</span><span class="o">.</span><span class="n">query</span><span class="p">(</span><span class="s1">&#39;/projects&#39;</span><span class="p">)</span><span class="o">.</span><span class="n">limit</span><span class="p">(</span><span class="mi">5</span><span class="p">)</span><span class="o">.</span><span class="n">offset</span><span class="p">(</span><span class="mi">10</span><span class="p">)</span><span class="o">.</span><span class="n">all</span><span class="p">()</span>
<span class="go">[...]</span>
</pre></div>
@ -302,7 +302,7 @@ some manual scenarios when working with data from the <code>shell</code>.</p>
</footer>
<script type=text/javascript src="../../../../../static/app.js?h=bb1b933a" charset="utf-8"></script>
<script type=text/javascript src="../../../../../static/app.js?h=d85eb4b1" charset="utf-8"></script>
<script>
((window.gitter = {}).chat = {}).options = {
room: 'lektor/lektor',

View File

@ -4,7 +4,7 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link rel="stylesheet" href="../../../../../static/styles.css?h=ca3aba42">
<link rel="stylesheet" href="../../../../../static/styles.css?h=7041cc50">
<link rel="stylesheet" href="../../../../../static/pygments.css">
<link rel="shortcut icon" href="../../../../../static/favicon.png?h=fa09bedd">
<title>order_by | Documentation | Lektor Static Content Management System</title>
@ -236,7 +236,7 @@ order is reversed.</p>
<p>If two records have the same value for a field, then the ordering is defined on
the next argument given. So if you order by (<code>'year', 'name'</code>) it will first
order by year and within a year it will order by name.</p>
<h2 id="example">Example</h2><div class="hll"><pre><span></span><span class="p">&lt;</span><span class="nt">ul</span><span class="p">&gt;</span>
<h2 id="example">Example</h2><div class="highlight"><pre><span></span><span class="p">&lt;</span><span class="nt">ul</span><span class="p">&gt;</span>
<span class="cp">{%</span> <span class="k">for</span> <span class="nv">project</span> <span class="k">in</span> <span class="nv">this.children.order_by</span><span class="o">(</span><span class="s1">&#39;-year&#39;</span><span class="o">,</span> <span class="s1">&#39;name&#39;</span><span class="o">)</span> <span class="cp">%}</span>
<span class="p">&lt;</span><span class="nt">li</span><span class="p">&gt;</span><span class="cp">{{</span> <span class="nv">project.year</span> <span class="cp">}}</span>: <span class="cp">{{</span> <span class="nv">project.name</span> <span class="cp">}}</span><span class="p">&lt;/</span><span class="nt">li</span><span class="p">&gt;</span>
<span class="cp">{%</span> <span class="k">endif</span> <span class="cp">%}</span>
@ -309,7 +309,7 @@ order by year and within a year it will order by name.</p>
</footer>
<script type=text/javascript src="../../../../../static/app.js?h=bb1b933a" charset="utf-8"></script>
<script type=text/javascript src="../../../../../static/app.js?h=d85eb4b1" charset="utf-8"></script>
<script>
((window.gitter = {}).chat = {}).options = {
room: 'lektor/lektor',

Some files were not shown because too many files have changed in this diff Show More