Synchronized build
|
@ -0,0 +1,142 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<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/pygments.css">
|
||||
<link rel="shortcut icon" href="static/favicon.png?h=fa09bedd">
|
||||
<title>Page Not Found | Lektor Static Content Management System</title>
|
||||
</head>
|
||||
<body class="default">
|
||||
<nav class="navbar navbar-inverse navbar-static-top">
|
||||
<div class="container">
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle collapsed"
|
||||
data-toggle="collapse" data-target="#navbar"
|
||||
aria-expanded="false" aria-controls="navbar">
|
||||
<span class="sr-only">Toggle navigation</span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<a class="navbar-brand" href="./">Lektor</a>
|
||||
</div>
|
||||
<div id="navbar" class="collapse navbar-collapse">
|
||||
<ul class="nav navbar-nav">
|
||||
|
||||
<li><a href="downloads/">Download</a></li>
|
||||
|
||||
<li><a href="docs/">Documentation</a></li>
|
||||
|
||||
<li><a href="showcase/">Showcase</a></li>
|
||||
|
||||
<li><a href="plugins/">Plugins</a></li>
|
||||
|
||||
<li><a href="community/">Community</a></li>
|
||||
|
||||
<li><a href="blog/">Blog</a></li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<div class="body-wrapper">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="page-banner page-banner-300" style="background-image: url(_404.html/header.jpg)"></div>
|
||||
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
|
||||
<h1>Page Not Found</h1>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="text-block text-block-default">
|
||||
<p>The page you requested does not exist. Maybe it has been removed or
|
||||
deleted or you made a typo when copy/pasting or typing it. If you think this
|
||||
is a mistake you can <a href="https://github.com/lektor/lektor-website/issues/new" class="ext">report it here</a>.</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="bottomsummary">
|
||||
<div class="container">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<footer>
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-sm-4 icon-bar">
|
||||
<a href="https://github.com/lektor/lektor/" title="Lektor on GitHub"
|
||||
><i class="fa fa-github"></i></a>
|
||||
<a href="https://github.com/lektor/lektor/issues/" title="Report Issues for Lektor"
|
||||
><i class="fa fa-bug"></i></a>
|
||||
<a href="https://twitter.com/getlektor" title="Find Lektor on Twitter"
|
||||
><i class="fa fa-twitter"></i></a>
|
||||
<a href="https://gitter.im/lektor/lektor" title="Chat on Gitter"
|
||||
><i class="fa fa-comment"></i></a>
|
||||
<a href="https://github.com/lektor/lektor-website/tree/master/content/404.html/contents.lr" title="View source for this page"><i class="fa fa-code"></i></a>
|
||||
</div>
|
||||
<div class="col-sm-8">
|
||||
<a href="license/">License & Copyright</a> •
|
||||
<a href="contact/">Contact</a> •
|
||||
Made with <i class="fa fa-fw fa-heart" title="Heart"><span hidden>Heart</span></i> in Carinthia
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
|
||||
<script type=text/javascript src="static/app.js?h=bb1b933a" charset="utf-8"></script>
|
||||
<script>
|
||||
((window.gitter = {}).chat = {}).options = {
|
||||
room: 'lektor/lektor',
|
||||
activationElement: null
|
||||
};
|
||||
document.write('<button class="js-gitter-toggle-chat-button">Toggle Chat</button>');
|
||||
var dnt = navigator.doNotTrack || window.doNotTrack || navigator.msDoNotTrack;
|
||||
if (dnt != "1" && dnt != "yes") {
|
||||
window.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments)};ga.l=+new Date;
|
||||
ga('create', 'UA-70822533-1', 'auto');
|
||||
ga('set', 'anonymizeIp', true);
|
||||
ga('send', 'pageview');
|
||||
} else {
|
||||
console.debug("Respecting Do-Not-Track, not running analytics.");
|
||||
}
|
||||
</script>
|
||||
<script async src='https://www.google-analytics.com/analytics.js'></script>
|
||||
<script async defer id="github-bjs" src="https://buttons.github.io/buttons.js"></script>
|
||||
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script>
|
||||
<script src="https://sidecar.gitter.im/dist/sidecar.v1.js" async defer></script>
|
||||
</body>
|
||||
</html>
|
After Width: | Height: | Size: 1.4 MiB |
After Width: | Height: | Size: 171 KiB |
After Width: | Height: | Size: 368 KiB |
|
@ -0,0 +1,248 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<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/pygments.css">
|
||||
<link rel="shortcut icon" href="../../../../static/favicon.png?h=fa09bedd">
|
||||
<title>Hello Lektor! | The Transcript | Lektor Static Content Management System</title>
|
||||
</head>
|
||||
<body class="default">
|
||||
<nav class="navbar navbar-inverse navbar-static-top">
|
||||
<div class="container">
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle collapsed"
|
||||
data-toggle="collapse" data-target="#navbar"
|
||||
aria-expanded="false" aria-controls="navbar">
|
||||
<span class="sr-only">Toggle navigation</span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<a class="navbar-brand" href="../../../../">Lektor</a>
|
||||
</div>
|
||||
<div id="navbar" class="collapse navbar-collapse">
|
||||
<ul class="nav navbar-nav">
|
||||
|
||||
<li><a href="../../../../downloads/">Download</a></li>
|
||||
|
||||
<li><a href="../../../../docs/">Documentation</a></li>
|
||||
|
||||
<li><a href="../../../../showcase/">Showcase</a></li>
|
||||
|
||||
<li><a href="../../../../plugins/">Plugins</a></li>
|
||||
|
||||
<li><a href="../../../../community/">Community</a></li>
|
||||
|
||||
<li class="active"><a href="../../../">Blog</a></li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<div class="body-wrapper">
|
||||
|
||||
<div class="blog-post">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="page-banner page-banner-500" style="background-image: url(banner.jpg)"></div>
|
||||
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-md-8 col-md-offset-2">
|
||||
|
||||
<div class="meta-bar">
|
||||
<h1>Hello Lektor!</h1>
|
||||
<p class="meta">
|
||||
by
|
||||
|
||||
<a href="https://twitter.com/mitsuhiko">Armin Ronacher</a>
|
||||
|
||||
on Monday, December 21, 2015
|
||||
</p>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-md-8 col-md-offset-2">
|
||||
<div class="text-block text-block-default">
|
||||
<p>About <a href="http://w3techs.com/technologies/details/cm-wordpress/all/all">25% of the Internet uses
|
||||
Wordpress</a> and
|
||||
it's estimated that about 50% of Wordpress installations out there are
|
||||
vulnerable to security problems because they have not been updated. This is a
|
||||
very high number.</p>
|
||||
<p>Because I know how much work it can be to keep software updated and my own
|
||||
terrible track record of spending time of updating everything I'm running
|
||||
I kept getting increasingly frustrated with the lack of software that would
|
||||
allow me to run a simple website in a secure manner without having to resort
|
||||
to all kinds of user-unfriendly hackery.</p>
|
||||
<p>While there are many static site generators none of them really matched what I
|
||||
actually wanted: a content management system that just happens to run
|
||||
on the client. Most static website generators are too “hacker focused” in the
|
||||
sense that they could not be used by people without programming experiences or
|
||||
they are full fledged content management systems that need a server to run on
|
||||
or require regular maintenance for security updates.</p>
|
||||
<p>There the hacker's favorite projects like
|
||||
<a href="https://github.com/getpelican/pelican">Pelican</a> or
|
||||
<a href="https://jekyllrb.com/">Jekyll</a> which support generating websites out of static
|
||||
files that are tracked through version control and there are CMS systems like
|
||||
<a href="http://statamic.com/">Statamic</a> which store all of its data in flat files
|
||||
— but as mentioned — needs PHP.</p>
|
||||
<p>None of those were what I was looking for. Static file generators like Jekyll
|
||||
are nice in a way but not just end user unfriendly, but also very limited in
|
||||
what you can do with them. They are more suited for building blogs than
|
||||
more complex sites. I tried a bunch of them and built different things
|
||||
with them, but ultimately always felt like something was missing.</p>
|
||||
<p>After about two years of frustration with that situation I finally sat down
|
||||
and spend some time working on a system to solve this problem. May I
|
||||
introduce: Lektor.</p>
|
||||
<h2 id="what-is-lektor">What is Lektor?</h2><p>Lektor combines the experience of using a content management system like
|
||||
Wordpress with a static website generator like Jekyll and has some of the
|
||||
flexibility of a web development framework like Django. It can run locally
|
||||
on your computer and deploy to remote servers. All source assets are stored
|
||||
either in version control or Dropbox and when you are satisfied with the end
|
||||
results, you can push them online from the UI to a remote server.</p>
|
||||
<p>And this is what it roughly looks like when you look at the admin panel:</p>
|
||||
<div class="screenshot-frame"><img src="admin.png"></div><h2 id="how-do-i-use-it">How do I use it?</h2><p>That depends on who you are. Lektor is based on the idea that there are
|
||||
two parties to a website: the web developers and the editors. The former
|
||||
create the design, layout, data layout and configures Lektor in general. The
|
||||
latter change the contents of the website according to the general setup.</p>
|
||||
<p>If you are a web developer you can install two versions of Lektor: you can
|
||||
use the command line client or if you are on a Mac, you can install the
|
||||
desktop version. Either version comes with a handy web interface that
|
||||
can be used to preview and edit all pages.</p>
|
||||
<p>Once you have configured Lektor to your liking you can put the project into
|
||||
version control (or just Dropbox) and let your users modify the contents. All
|
||||
they have to do is to install the Desktop version of Lektor, double click the
|
||||
project in their Dropbox and start changing it.</p>
|
||||
<p>If you just want to edit the contents of a project you can install the
|
||||
Desktop version or maybe in the future use a cloud hosted version.</p>
|
||||
<h2 id="project-layout">Project Layout</h2><p>To get an idea how it works, you can have a look at the <a href="https://github.com/lektor/lektor-website/">github repository of
|
||||
this website</a> which contains the
|
||||
project for this website and blog and have a look at the introduction
|
||||
documentation: <a href="../../../../docs/quickstart/" class="ref">Getting Started</a>. You can
|
||||
also find a screencast there.</p>
|
||||
<p>On a very basic level Lektor takes <code>.lr</code> files which are basic text files
|
||||
with a super simple format and generates out HTML files. The <code>.lr</code> files
|
||||
correspond to a previously set up data model. They are pure text format for
|
||||
key/value pairs. Each pair is separated by three dashes (<code>---</code>):</p>
|
||||
<pre><code>field_1: value
|
||||
---
|
||||
field_2:
|
||||
|
||||
a longer value
|
||||
</code></pre>
|
||||
<p>You can set up data models for simple things like blog posts but also more
|
||||
elaborate ones if you want to build portfolio sites. For instance you could
|
||||
set up models for your projects and then access that data in the templates.</p>
|
||||
<p>The content files are stored in folders in a tree like structure and at any
|
||||
level you can add other files as attachments:</p>
|
||||
<div class="screenshot-frame"><img src="structure.png"></div><h2 id="an-open-source-project">An Open Source Project</h2><p>Lektor is available under <a href="../../../../license/">a BSD license</a> and run as a
|
||||
community Open Source project <a href="https://github.com/lektor/lektor/" class="ext">on github</a>.
|
||||
The build system is written in Python, the UI in JavaScript with React and
|
||||
the GUI components use Electron.</p>
|
||||
<h2 id="feedback-appreciated">Feedback Appreciated</h2><p>Lektor took two attempts to get into a usable application and I'm sure that
|
||||
there is more that needs to be done to scratch the needs of most users.
|
||||
However I also know that there is no point in delaying an initial release
|
||||
unnecessarily. What's being released today is the application as it exists
|
||||
today and I think it's in a good shape to build really cool websites with
|
||||
it. I welcome you to give it a try and give feedback on what you think
|
||||
about it.</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-md-8 col-md-offset-2">
|
||||
|
||||
|
||||
<div class="nav-next">
|
||||
<a href="../travis-and-ghpages/">Next: Lektor Loves Travis-CI and GitHub Pages</a>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="bottomsummary">
|
||||
<div class="container">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<footer>
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-sm-4 icon-bar">
|
||||
<a href="https://github.com/lektor/lektor/" title="Lektor on GitHub"
|
||||
><i class="fa fa-github"></i></a>
|
||||
<a href="https://github.com/lektor/lektor/issues/" title="Report Issues for Lektor"
|
||||
><i class="fa fa-bug"></i></a>
|
||||
<a href="https://twitter.com/getlektor" title="Find Lektor on Twitter"
|
||||
><i class="fa fa-twitter"></i></a>
|
||||
<a href="https://gitter.im/lektor/lektor" title="Chat on Gitter"
|
||||
><i class="fa fa-comment"></i></a>
|
||||
<a href="https://github.com/lektor/lektor-website/tree/master/content/blog/hello-lektor/contents.lr" title="View source for this page"><i class="fa fa-code"></i></a>
|
||||
</div>
|
||||
<div class="col-sm-8">
|
||||
<a href="../../../../license/">License & Copyright</a> •
|
||||
<a href="../../../../contact/">Contact</a> •
|
||||
Made with <i class="fa fa-fw fa-heart" title="Heart"><span hidden>Heart</span></i> in Carinthia
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
|
||||
<script type=text/javascript src="../../../../static/app.js?h=bb1b933a" charset="utf-8"></script>
|
||||
<script>
|
||||
((window.gitter = {}).chat = {}).options = {
|
||||
room: 'lektor/lektor',
|
||||
activationElement: null
|
||||
};
|
||||
document.write('<button class="js-gitter-toggle-chat-button">Toggle Chat</button>');
|
||||
var dnt = navigator.doNotTrack || window.doNotTrack || navigator.msDoNotTrack;
|
||||
if (dnt != "1" && dnt != "yes") {
|
||||
window.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments)};ga.l=+new Date;
|
||||
ga('create', 'UA-70822533-1', 'auto');
|
||||
ga('set', 'anonymizeIp', true);
|
||||
ga('send', 'pageview');
|
||||
} else {
|
||||
console.debug("Respecting Do-Not-Track, not running analytics.");
|
||||
}
|
||||
</script>
|
||||
<script async src='https://www.google-analytics.com/analytics.js'></script>
|
||||
<script async defer id="github-bjs" src="https://buttons.github.io/buttons.js"></script>
|
||||
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script>
|
||||
<script src="https://sidecar.gitter.im/dist/sidecar.v1.js" async defer></script>
|
||||
</body>
|
||||
</html>
|
After Width: | Height: | Size: 158 KiB |
|
@ -0,0 +1,147 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<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/pygments.css">
|
||||
<link rel="shortcut icon" href="../../../static/favicon.png?h=fa09bedd">
|
||||
<title>December 2015 Archive | The Transcript | Lektor Static Content Management System</title>
|
||||
</head>
|
||||
<body class="default">
|
||||
<nav class="navbar navbar-inverse navbar-static-top">
|
||||
<div class="container">
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle collapsed"
|
||||
data-toggle="collapse" data-target="#navbar"
|
||||
aria-expanded="false" aria-controls="navbar">
|
||||
<span class="sr-only">Toggle navigation</span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<a class="navbar-brand" href="../../../">Lektor</a>
|
||||
</div>
|
||||
<div id="navbar" class="collapse navbar-collapse">
|
||||
<ul class="nav navbar-nav">
|
||||
|
||||
<li><a href="../../../downloads/">Download</a></li>
|
||||
|
||||
<li><a href="../../../docs/">Documentation</a></li>
|
||||
|
||||
<li><a href="../../../showcase/">Showcase</a></li>
|
||||
|
||||
<li><a href="../../../plugins/">Plugins</a></li>
|
||||
|
||||
<li><a href="../../../community/">Community</a></li>
|
||||
|
||||
<li class="active"><a href="../../">Blog</a></li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<div class="body-wrapper">
|
||||
|
||||
|
||||
|
||||
<div class="page-banner page-banner-300" style="background-image: url(../../header.jpg)"></div>
|
||||
|
||||
|
||||
<div class="container">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-8">
|
||||
|
||||
<h1>The Transcript, December 2015</h1>
|
||||
<p>
|
||||
<a href="../">« Back to 2015</a>
|
||||
<ul>
|
||||
|
||||
<li><a href="travis-and-ghpages/">Lektor Loves Travis-CI and GitHub Pages</a> by Armin Ronacher on Dec 23, 2015</li>
|
||||
|
||||
<li><a href="hello-lektor/">Hello Lektor!</a> by Armin Ronacher on Dec 21, 2015</li>
|
||||
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
<div class="col-sm-4">
|
||||
<h3>About This Blog</h3>
|
||||
<p>
|
||||
“The Transcript” is the blog about <a href="../../../">Lektor</a>, a new solution in static content management.
|
||||
<p>
|
||||
Subscribe for the latest news about Lektor as well as content
|
||||
management and web development.
|
||||
<ul>
|
||||
<li><a href="../../feed.xml">RSS Feed</a></li>
|
||||
<li><a href="https://twitter.com/getlektor">Follow us on Twitter</a></li>
|
||||
</ul>
|
||||
<h3>Missed a Post?</h3>
|
||||
<ul>
|
||||
<li><a href="../../archives/">Blog Archives</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="bottomsummary">
|
||||
<div class="container">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<footer>
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-sm-4 icon-bar">
|
||||
<a href="https://github.com/lektor/lektor/" title="Lektor on GitHub"
|
||||
><i class="fa fa-github"></i></a>
|
||||
<a href="https://github.com/lektor/lektor/issues/" title="Report Issues for Lektor"
|
||||
><i class="fa fa-bug"></i></a>
|
||||
<a href="https://twitter.com/getlektor" title="Find Lektor on Twitter"
|
||||
><i class="fa fa-twitter"></i></a>
|
||||
<a href="https://gitter.im/lektor/lektor" title="Chat on Gitter"
|
||||
><i class="fa fa-comment"></i></a>
|
||||
<a href="https://github.com/lektor/lektor-website/tree/master/content/blog/contents.lr" title="View source for this page"><i class="fa fa-code"></i></a>
|
||||
</div>
|
||||
<div class="col-sm-8">
|
||||
<a href="../../../license/">License & Copyright</a> •
|
||||
<a href="../../../contact/">Contact</a> •
|
||||
Made with <i class="fa fa-fw fa-heart" title="Heart"><span hidden>Heart</span></i> in Carinthia
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
|
||||
<script type=text/javascript src="../../../static/app.js?h=bb1b933a" charset="utf-8"></script>
|
||||
<script>
|
||||
((window.gitter = {}).chat = {}).options = {
|
||||
room: 'lektor/lektor',
|
||||
activationElement: null
|
||||
};
|
||||
document.write('<button class="js-gitter-toggle-chat-button">Toggle Chat</button>');
|
||||
var dnt = navigator.doNotTrack || window.doNotTrack || navigator.msDoNotTrack;
|
||||
if (dnt != "1" && dnt != "yes") {
|
||||
window.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments)};ga.l=+new Date;
|
||||
ga('create', 'UA-70822533-1', 'auto');
|
||||
ga('set', 'anonymizeIp', true);
|
||||
ga('send', 'pageview');
|
||||
} else {
|
||||
console.debug("Respecting Do-Not-Track, not running analytics.");
|
||||
}
|
||||
</script>
|
||||
<script async src='https://www.google-analytics.com/analytics.js'></script>
|
||||
<script async defer id="github-bjs" src="https://buttons.github.io/buttons.js"></script>
|
||||
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script>
|
||||
<script src="https://sidecar.gitter.im/dist/sidecar.v1.js" async defer></script>
|
||||
</body>
|
||||
</html>
|
After Width: | Height: | Size: 272 KiB |
|
@ -0,0 +1,182 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<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/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>
|
||||
</head>
|
||||
<body class="default">
|
||||
<nav class="navbar navbar-inverse navbar-static-top">
|
||||
<div class="container">
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle collapsed"
|
||||
data-toggle="collapse" data-target="#navbar"
|
||||
aria-expanded="false" aria-controls="navbar">
|
||||
<span class="sr-only">Toggle navigation</span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<a class="navbar-brand" href="../../../../">Lektor</a>
|
||||
</div>
|
||||
<div id="navbar" class="collapse navbar-collapse">
|
||||
<ul class="nav navbar-nav">
|
||||
|
||||
<li><a href="../../../../downloads/">Download</a></li>
|
||||
|
||||
<li><a href="../../../../docs/">Documentation</a></li>
|
||||
|
||||
<li><a href="../../../../showcase/">Showcase</a></li>
|
||||
|
||||
<li><a href="../../../../plugins/">Plugins</a></li>
|
||||
|
||||
<li><a href="../../../../community/">Community</a></li>
|
||||
|
||||
<li class="active"><a href="../../../">Blog</a></li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<div class="body-wrapper">
|
||||
|
||||
<div class="blog-post">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="page-banner page-banner-500" style="background-image: url(header.jpg)"></div>
|
||||
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-md-8 col-md-offset-2">
|
||||
|
||||
<div class="meta-bar">
|
||||
<h1>Lektor Loves Travis-CI and GitHub Pages</h1>
|
||||
<p class="meta">
|
||||
by
|
||||
|
||||
<a href="https://twitter.com/mitsuhiko">Armin Ronacher</a>
|
||||
|
||||
on Wednesday, December 23, 2015
|
||||
</p>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-md-8 col-md-offset-2">
|
||||
<div class="text-block text-block-default">
|
||||
<p>Open Source projects need websites, that's a given, and one of the most popular
|
||||
ways to host them these days is <a href="https://pages.github.com/" class="ext">GitHub Pages</a>.
|
||||
It's a free service provided by <a href="https://github.com/" class="ext">GitHub</a> which allows
|
||||
hosts a git repository as a website on a subdomain of <code>github.io</code>.</p>
|
||||
<p>Wouldn't it be nice if you could easily host Lektor projects on there? Turns
|
||||
out you can with the help of <a href="https://travis-ci.org/" class="ext">Travis-CI</a>. Because
|
||||
Lektor has built-in support for deploying to GitHub Pages pairing up the three
|
||||
is a breeze.</p>
|
||||
<p>We <a href="../../../../docs/deployment/travisci/" class="ref">created a guide</a> and also recorded
|
||||
a screencast that goes with it:</p>
|
||||
<iframe width="100%" height=410 frameborder="0" allowfullscreen="allowfullscreen"
|
||||
src="https://www.youtube.com/embed/3pj_EyZIL5A?autoplay=0&fs=1">
|
||||
</iframe>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-md-8 col-md-offset-2">
|
||||
|
||||
<div class="nav-prev">
|
||||
<a href="../hello-lektor/">Previous: Hello Lektor!</a>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="nav-next">
|
||||
<a href="../../../2016/3/road-to-lektor-2/">Next: Road to Lektor 2.0</a>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="bottomsummary">
|
||||
<div class="container">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<footer>
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-sm-4 icon-bar">
|
||||
<a href="https://github.com/lektor/lektor/" title="Lektor on GitHub"
|
||||
><i class="fa fa-github"></i></a>
|
||||
<a href="https://github.com/lektor/lektor/issues/" title="Report Issues for Lektor"
|
||||
><i class="fa fa-bug"></i></a>
|
||||
<a href="https://twitter.com/getlektor" title="Find Lektor on Twitter"
|
||||
><i class="fa fa-twitter"></i></a>
|
||||
<a href="https://gitter.im/lektor/lektor" title="Chat on Gitter"
|
||||
><i class="fa fa-comment"></i></a>
|
||||
<a href="https://github.com/lektor/lektor-website/tree/master/content/blog/travis-and-ghpages/contents.lr" title="View source for this page"><i class="fa fa-code"></i></a>
|
||||
</div>
|
||||
<div class="col-sm-8">
|
||||
<a href="../../../../license/">License & Copyright</a> •
|
||||
<a href="../../../../contact/">Contact</a> •
|
||||
Made with <i class="fa fa-fw fa-heart" title="Heart"><span hidden>Heart</span></i> in Carinthia
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
|
||||
<script type=text/javascript src="../../../../static/app.js?h=bb1b933a" charset="utf-8"></script>
|
||||
<script>
|
||||
((window.gitter = {}).chat = {}).options = {
|
||||
room: 'lektor/lektor',
|
||||
activationElement: null
|
||||
};
|
||||
document.write('<button class="js-gitter-toggle-chat-button">Toggle Chat</button>');
|
||||
var dnt = navigator.doNotTrack || window.doNotTrack || navigator.msDoNotTrack;
|
||||
if (dnt != "1" && dnt != "yes") {
|
||||
window.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments)};ga.l=+new Date;
|
||||
ga('create', 'UA-70822533-1', 'auto');
|
||||
ga('set', 'anonymizeIp', true);
|
||||
ga('send', 'pageview');
|
||||
} else {
|
||||
console.debug("Respecting Do-Not-Track, not running analytics.");
|
||||
}
|
||||
</script>
|
||||
<script async src='https://www.google-analytics.com/analytics.js'></script>
|
||||
<script async defer id="github-bjs" src="https://buttons.github.io/buttons.js"></script>
|
||||
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script>
|
||||
<script src="https://sidecar.gitter.im/dist/sidecar.v1.js" async defer></script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,155 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<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/pygments.css">
|
||||
<link rel="shortcut icon" href="../../static/favicon.png?h=fa09bedd">
|
||||
<title>2015 Archive | The Transcript | Lektor Static Content Management System</title>
|
||||
</head>
|
||||
<body class="default">
|
||||
<nav class="navbar navbar-inverse navbar-static-top">
|
||||
<div class="container">
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle collapsed"
|
||||
data-toggle="collapse" data-target="#navbar"
|
||||
aria-expanded="false" aria-controls="navbar">
|
||||
<span class="sr-only">Toggle navigation</span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<a class="navbar-brand" href="../../">Lektor</a>
|
||||
</div>
|
||||
<div id="navbar" class="collapse navbar-collapse">
|
||||
<ul class="nav navbar-nav">
|
||||
|
||||
<li><a href="../../downloads/">Download</a></li>
|
||||
|
||||
<li><a href="../../docs/">Documentation</a></li>
|
||||
|
||||
<li><a href="../../showcase/">Showcase</a></li>
|
||||
|
||||
<li><a href="../../plugins/">Plugins</a></li>
|
||||
|
||||
<li><a href="../../community/">Community</a></li>
|
||||
|
||||
<li class="active"><a href="../">Blog</a></li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<div class="body-wrapper">
|
||||
|
||||
|
||||
|
||||
<div class="page-banner page-banner-300" style="background-image: url(../header.jpg)"></div>
|
||||
|
||||
|
||||
<div class="container">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-8">
|
||||
|
||||
<h1>The Transcript in 2015</h1>
|
||||
<p>
|
||||
<a href="../archives/">« Back to the archive</a>
|
||||
<ul>
|
||||
|
||||
<li><a href="12/">December</a>:
|
||||
<ul>
|
||||
|
||||
<li><a href="12/travis-and-ghpages/">Lektor Loves Travis-CI and GitHub Pages</a> by Armin Ronacher
|
||||
on Dec 23, 2015</li>
|
||||
|
||||
<li><a href="12/hello-lektor/">Hello Lektor!</a> by Armin Ronacher
|
||||
on Dec 21, 2015</li>
|
||||
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
<div class="col-sm-4">
|
||||
<h3>About This Blog</h3>
|
||||
<p>
|
||||
“The Transcript” is the blog about <a href="../../">Lektor</a>, a new solution in static content management.
|
||||
<p>
|
||||
Subscribe for the latest news about Lektor as well as content
|
||||
management and web development.
|
||||
<ul>
|
||||
<li><a href="../feed.xml">RSS Feed</a></li>
|
||||
<li><a href="https://twitter.com/getlektor">Follow us on Twitter</a></li>
|
||||
</ul>
|
||||
<h3>Missed a Post?</h3>
|
||||
<ul>
|
||||
<li><a href="../archives/">Blog Archives</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="bottomsummary">
|
||||
<div class="container">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<footer>
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-sm-4 icon-bar">
|
||||
<a href="https://github.com/lektor/lektor/" title="Lektor on GitHub"
|
||||
><i class="fa fa-github"></i></a>
|
||||
<a href="https://github.com/lektor/lektor/issues/" title="Report Issues for Lektor"
|
||||
><i class="fa fa-bug"></i></a>
|
||||
<a href="https://twitter.com/getlektor" title="Find Lektor on Twitter"
|
||||
><i class="fa fa-twitter"></i></a>
|
||||
<a href="https://gitter.im/lektor/lektor" title="Chat on Gitter"
|
||||
><i class="fa fa-comment"></i></a>
|
||||
<a href="https://github.com/lektor/lektor-website/tree/master/content/blog/contents.lr" title="View source for this page"><i class="fa fa-code"></i></a>
|
||||
</div>
|
||||
<div class="col-sm-8">
|
||||
<a href="../../license/">License & Copyright</a> •
|
||||
<a href="../../contact/">Contact</a> •
|
||||
Made with <i class="fa fa-fw fa-heart" title="Heart"><span hidden>Heart</span></i> in Carinthia
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
|
||||
<script type=text/javascript src="../../static/app.js?h=bb1b933a" charset="utf-8"></script>
|
||||
<script>
|
||||
((window.gitter = {}).chat = {}).options = {
|
||||
room: 'lektor/lektor',
|
||||
activationElement: null
|
||||
};
|
||||
document.write('<button class="js-gitter-toggle-chat-button">Toggle Chat</button>');
|
||||
var dnt = navigator.doNotTrack || window.doNotTrack || navigator.msDoNotTrack;
|
||||
if (dnt != "1" && dnt != "yes") {
|
||||
window.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments)};ga.l=+new Date;
|
||||
ga('create', 'UA-70822533-1', 'auto');
|
||||
ga('set', 'anonymizeIp', true);
|
||||
ga('send', 'pageview');
|
||||
} else {
|
||||
console.debug("Respecting Do-Not-Track, not running analytics.");
|
||||
}
|
||||
</script>
|
||||
<script async src='https://www.google-analytics.com/analytics.js'></script>
|
||||
<script async defer id="github-bjs" src="https://buttons.github.io/buttons.js"></script>
|
||||
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script>
|
||||
<script src="https://sidecar.gitter.im/dist/sidecar.v1.js" async defer></script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,147 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<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/pygments.css">
|
||||
<link rel="shortcut icon" href="../../../static/favicon.png?h=fa09bedd">
|
||||
<title>March 2016 Archive | The Transcript | Lektor Static Content Management System</title>
|
||||
</head>
|
||||
<body class="default">
|
||||
<nav class="navbar navbar-inverse navbar-static-top">
|
||||
<div class="container">
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle collapsed"
|
||||
data-toggle="collapse" data-target="#navbar"
|
||||
aria-expanded="false" aria-controls="navbar">
|
||||
<span class="sr-only">Toggle navigation</span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<a class="navbar-brand" href="../../../">Lektor</a>
|
||||
</div>
|
||||
<div id="navbar" class="collapse navbar-collapse">
|
||||
<ul class="nav navbar-nav">
|
||||
|
||||
<li><a href="../../../downloads/">Download</a></li>
|
||||
|
||||
<li><a href="../../../docs/">Documentation</a></li>
|
||||
|
||||
<li><a href="../../../showcase/">Showcase</a></li>
|
||||
|
||||
<li><a href="../../../plugins/">Plugins</a></li>
|
||||
|
||||
<li><a href="../../../community/">Community</a></li>
|
||||
|
||||
<li class="active"><a href="../../">Blog</a></li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<div class="body-wrapper">
|
||||
|
||||
|
||||
|
||||
<div class="page-banner page-banner-300" style="background-image: url(../../header.jpg)"></div>
|
||||
|
||||
|
||||
<div class="container">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-8">
|
||||
|
||||
<h1>The Transcript, March 2016</h1>
|
||||
<p>
|
||||
<a href="../">« Back to 2016</a>
|
||||
<ul>
|
||||
|
||||
<li><a href="lektor-at-rails-girls-summer-of-code/">Lektor at Rails Girls Summer of Code 2016</a> by Armin Ronacher on Mar 17, 2016</li>
|
||||
|
||||
<li><a href="road-to-lektor-2/">Road to Lektor 2.0</a> by Armin Ronacher on Mar 10, 2016</li>
|
||||
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
<div class="col-sm-4">
|
||||
<h3>About This Blog</h3>
|
||||
<p>
|
||||
“The Transcript” is the blog about <a href="../../../">Lektor</a>, a new solution in static content management.
|
||||
<p>
|
||||
Subscribe for the latest news about Lektor as well as content
|
||||
management and web development.
|
||||
<ul>
|
||||
<li><a href="../../feed.xml">RSS Feed</a></li>
|
||||
<li><a href="https://twitter.com/getlektor">Follow us on Twitter</a></li>
|
||||
</ul>
|
||||
<h3>Missed a Post?</h3>
|
||||
<ul>
|
||||
<li><a href="../../archives/">Blog Archives</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="bottomsummary">
|
||||
<div class="container">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<footer>
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-sm-4 icon-bar">
|
||||
<a href="https://github.com/lektor/lektor/" title="Lektor on GitHub"
|
||||
><i class="fa fa-github"></i></a>
|
||||
<a href="https://github.com/lektor/lektor/issues/" title="Report Issues for Lektor"
|
||||
><i class="fa fa-bug"></i></a>
|
||||
<a href="https://twitter.com/getlektor" title="Find Lektor on Twitter"
|
||||
><i class="fa fa-twitter"></i></a>
|
||||
<a href="https://gitter.im/lektor/lektor" title="Chat on Gitter"
|
||||
><i class="fa fa-comment"></i></a>
|
||||
<a href="https://github.com/lektor/lektor-website/tree/master/content/blog/contents.lr" title="View source for this page"><i class="fa fa-code"></i></a>
|
||||
</div>
|
||||
<div class="col-sm-8">
|
||||
<a href="../../../license/">License & Copyright</a> •
|
||||
<a href="../../../contact/">Contact</a> •
|
||||
Made with <i class="fa fa-fw fa-heart" title="Heart"><span hidden>Heart</span></i> in Carinthia
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
|
||||
<script type=text/javascript src="../../../static/app.js?h=bb1b933a" charset="utf-8"></script>
|
||||
<script>
|
||||
((window.gitter = {}).chat = {}).options = {
|
||||
room: 'lektor/lektor',
|
||||
activationElement: null
|
||||
};
|
||||
document.write('<button class="js-gitter-toggle-chat-button">Toggle Chat</button>');
|
||||
var dnt = navigator.doNotTrack || window.doNotTrack || navigator.msDoNotTrack;
|
||||
if (dnt != "1" && dnt != "yes") {
|
||||
window.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments)};ga.l=+new Date;
|
||||
ga('create', 'UA-70822533-1', 'auto');
|
||||
ga('set', 'anonymizeIp', true);
|
||||
ga('send', 'pageview');
|
||||
} else {
|
||||
console.debug("Respecting Do-Not-Track, not running analytics.");
|
||||
}
|
||||
</script>
|
||||
<script async src='https://www.google-analytics.com/analytics.js'></script>
|
||||
<script async defer id="github-bjs" src="https://buttons.github.io/buttons.js"></script>
|
||||
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script>
|
||||
<script src="https://sidecar.gitter.im/dist/sidecar.v1.js" async defer></script>
|
||||
</body>
|
||||
</html>
|
After Width: | Height: | Size: 405 KiB |
|
@ -0,0 +1,191 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<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/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>
|
||||
</head>
|
||||
<body class="default">
|
||||
<nav class="navbar navbar-inverse navbar-static-top">
|
||||
<div class="container">
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle collapsed"
|
||||
data-toggle="collapse" data-target="#navbar"
|
||||
aria-expanded="false" aria-controls="navbar">
|
||||
<span class="sr-only">Toggle navigation</span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<a class="navbar-brand" href="../../../../">Lektor</a>
|
||||
</div>
|
||||
<div id="navbar" class="collapse navbar-collapse">
|
||||
<ul class="nav navbar-nav">
|
||||
|
||||
<li><a href="../../../../downloads/">Download</a></li>
|
||||
|
||||
<li><a href="../../../../docs/">Documentation</a></li>
|
||||
|
||||
<li><a href="../../../../showcase/">Showcase</a></li>
|
||||
|
||||
<li><a href="../../../../plugins/">Plugins</a></li>
|
||||
|
||||
<li><a href="../../../../community/">Community</a></li>
|
||||
|
||||
<li class="active"><a href="../../../">Blog</a></li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<div class="body-wrapper">
|
||||
|
||||
<div class="blog-post">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="page-banner page-banner-500" style="background-image: url(banner.jpg)"></div>
|
||||
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-md-8 col-md-offset-2">
|
||||
|
||||
<div class="meta-bar">
|
||||
<h1>Lektor at Rails Girls Summer of Code 2016</h1>
|
||||
<p class="meta">
|
||||
by
|
||||
|
||||
<a href="https://twitter.com/mitsuhiko">Armin Ronacher</a>
|
||||
|
||||
on Thursday, March 17, 2016
|
||||
</p>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-md-8 col-md-offset-2">
|
||||
<div class="text-block text-block-default">
|
||||
<p>I'm happy to announce that Lektor is participating as a project in this year's
|
||||
<a href="http://railsgirlssummerofcode.org/">Rails Girls Summer of Code</a> (RGSOC).
|
||||
Unlike what the name would suggest, RGSOC is open for all Open Source projects
|
||||
and not just Ruby.</p>
|
||||
<p>The goal of RGSOC is to bring more women into programming. To quote the
|
||||
website:</p>
|
||||
<blockquote><p>Rails Girls Summer of Code is a global fellowship program aimed at bringing
|
||||
more diversity into Open Source. Successful applicants are paid a monthly
|
||||
stipend, from July-September, to work on Open Source projects of their
|
||||
choice.</p>
|
||||
</blockquote>
|
||||
<p>Lektor was accepted as a particpating project. For more information about
|
||||
the project there refer to the <a href="https://teams.railsgirlssummerofcode.org/projects/115-lektor-cms">project overview on
|
||||
RGSOC</a>.</p>
|
||||
<p>We want to make it as easy as possible to work on Lektor during the event which
|
||||
is why we will be very flexible with regards to which area interested
|
||||
developers want to work on.</p>
|
||||
<p>If you are interested in working on Lektor you can reach out to us via
|
||||
Twitter at <a href="https://twitter.com/getlektor">@getlektor</a> or
|
||||
<a href="https://gitter.im/lektor/lektor"
|
||||
class="js-gitter-toggle-chat-button">Gitter</a>.</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-md-8 col-md-offset-2">
|
||||
|
||||
<div class="nav-prev">
|
||||
<a href="../road-to-lektor-2/">Previous: Road to Lektor 2.0</a>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="nav-next">
|
||||
<a href="../../4/lektor-2-released/">Next: Lektor 2.0 Released</a>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="bottomsummary">
|
||||
<div class="container">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<footer>
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-sm-4 icon-bar">
|
||||
<a href="https://github.com/lektor/lektor/" title="Lektor on GitHub"
|
||||
><i class="fa fa-github"></i></a>
|
||||
<a href="https://github.com/lektor/lektor/issues/" title="Report Issues for Lektor"
|
||||
><i class="fa fa-bug"></i></a>
|
||||
<a href="https://twitter.com/getlektor" title="Find Lektor on Twitter"
|
||||
><i class="fa fa-twitter"></i></a>
|
||||
<a href="https://gitter.im/lektor/lektor" title="Chat on Gitter"
|
||||
><i class="fa fa-comment"></i></a>
|
||||
<a href="https://github.com/lektor/lektor-website/tree/master/content/blog/lektor-at-rails-girls-summer-of-code/contents.lr" title="View source for this page"><i class="fa fa-code"></i></a>
|
||||
</div>
|
||||
<div class="col-sm-8">
|
||||
<a href="../../../../license/">License & Copyright</a> •
|
||||
<a href="../../../../contact/">Contact</a> •
|
||||
Made with <i class="fa fa-fw fa-heart" title="Heart"><span hidden>Heart</span></i> in Carinthia
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
|
||||
<script type=text/javascript src="../../../../static/app.js?h=bb1b933a" charset="utf-8"></script>
|
||||
<script>
|
||||
((window.gitter = {}).chat = {}).options = {
|
||||
room: 'lektor/lektor',
|
||||
activationElement: null
|
||||
};
|
||||
document.write('<button class="js-gitter-toggle-chat-button">Toggle Chat</button>');
|
||||
var dnt = navigator.doNotTrack || window.doNotTrack || navigator.msDoNotTrack;
|
||||
if (dnt != "1" && dnt != "yes") {
|
||||
window.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments)};ga.l=+new Date;
|
||||
ga('create', 'UA-70822533-1', 'auto');
|
||||
ga('set', 'anonymizeIp', true);
|
||||
ga('send', 'pageview');
|
||||
} else {
|
||||
console.debug("Respecting Do-Not-Track, not running analytics.");
|
||||
}
|
||||
</script>
|
||||
<script async src='https://www.google-analytics.com/analytics.js'></script>
|
||||
<script async defer id="github-bjs" src="https://buttons.github.io/buttons.js"></script>
|
||||
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script>
|
||||
<script src="https://sidecar.gitter.im/dist/sidecar.v1.js" async defer></script>
|
||||
</body>
|
||||
</html>
|
After Width: | Height: | Size: 193 KiB |
|
@ -0,0 +1,210 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<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/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>
|
||||
</head>
|
||||
<body class="default">
|
||||
<nav class="navbar navbar-inverse navbar-static-top">
|
||||
<div class="container">
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle collapsed"
|
||||
data-toggle="collapse" data-target="#navbar"
|
||||
aria-expanded="false" aria-controls="navbar">
|
||||
<span class="sr-only">Toggle navigation</span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<a class="navbar-brand" href="../../../../">Lektor</a>
|
||||
</div>
|
||||
<div id="navbar" class="collapse navbar-collapse">
|
||||
<ul class="nav navbar-nav">
|
||||
|
||||
<li><a href="../../../../downloads/">Download</a></li>
|
||||
|
||||
<li><a href="../../../../docs/">Documentation</a></li>
|
||||
|
||||
<li><a href="../../../../showcase/">Showcase</a></li>
|
||||
|
||||
<li><a href="../../../../plugins/">Plugins</a></li>
|
||||
|
||||
<li><a href="../../../../community/">Community</a></li>
|
||||
|
||||
<li class="active"><a href="../../../">Blog</a></li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<div class="body-wrapper">
|
||||
|
||||
<div class="blog-post">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="page-banner page-banner-500" style="background-image: url(header.jpg)"></div>
|
||||
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-md-8 col-md-offset-2">
|
||||
|
||||
<div class="meta-bar">
|
||||
<h1>Road to Lektor 2.0</h1>
|
||||
<p class="meta">
|
||||
by
|
||||
|
||||
<a href="https://twitter.com/mitsuhiko">Armin Ronacher</a>
|
||||
|
||||
on Thursday, March 10, 2016
|
||||
</p>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-md-8 col-md-offset-2">
|
||||
<div class="text-block text-block-default">
|
||||
<p>It's great to see what people have been building with Lektor so far. It also
|
||||
shows us what still needs to be built. For a lot of things we improved for
|
||||
Lektor 2.0 which is going to release very soon indeed. To give you some ideas
|
||||
what's going to change here is a current brief look into the changelog and
|
||||
what has been changed so far.</p>
|
||||
<h2 id="page-discovery">Page Discovery</h2><p>One of the biggest frustrations users have voiced is the inability to control
|
||||
discoverability of pages. In Lektor 1.0 you can only hide pages entirely in
|
||||
which case the build process skips over them but there was no way to hide them
|
||||
by default from queries. While you could always hide pages by changing the
|
||||
query, this did not work for pagination and it also required you to be quite
|
||||
careful with the queries you are writing in templates.</p>
|
||||
<p>In Lektor 2.0 we introduced the system <code>_discoverable</code> attribute which allows
|
||||
you to easily hide pages from any query. Queries can explicitly include
|
||||
undiscoverable pages but you do not need to take care of this yourself. This
|
||||
makes it possible to automatically hide drafts from blogs for instance. Lektor
|
||||
will still build it but without knowing the URL you cannot see it on the
|
||||
overview.</p>
|
||||
<h2 id="virtual-paths">Virtual Paths</h2><p>The biggest change in Lektor 2.0 is the introduction of virtual paths and
|
||||
sources. This is somewhat of an under the hood change but it has big
|
||||
implications on what is possible with Lektor plugins. Each page can have
|
||||
virtual resources below it that can be provided by plugins. These virtual
|
||||
resources are separated from the page through what is called a virtual path
|
||||
which is indicated by the at-sign (<code>@</code>). For instance this blog here uses
|
||||
a plugin which provides a blog archive available at <code>/blog@blog-archive</code> and
|
||||
the year 2015 is available at <code>/blog@blog-archive/2015</code> etc.</p>
|
||||
<h2 id="next/previous-page">Next / Previous Page</h2><p>Lektor 2.0 implements sibling support through it's virtual path system which
|
||||
allows you to refer to the next or previous record easily. This is for
|
||||
instance used by this blog here to link between blog posts.</p>
|
||||
<h2 id="improved-alternative-support">Improved Alternative Support</h2><p>Alternatives were heavily improved. Individual fields that are absent in
|
||||
content files now fall back to the primary content file. In addition it is
|
||||
now possible to ask Lektor about which alternatives exist for a given source
|
||||
or in total. This simplifies handling of internationalized pages greatly
|
||||
but more work will be done in that field.</p>
|
||||
<h2 id="improved-plugin-support">Improved Plugin Support</h2><p>Plugins now have the ability to do a few more things they could not do before:</p>
|
||||
<ul>
|
||||
<li>custom field types (want to render reStructuredText? You can now build a plugin)</li>
|
||||
<li>custom build programs: because of the virtual source and path support you can
|
||||
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.</li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-md-8 col-md-offset-2">
|
||||
|
||||
<div class="nav-prev">
|
||||
<a href="../../../2015/12/travis-and-ghpages/">Previous: Lektor Loves Travis-CI and GitHub Pages</a>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="nav-next">
|
||||
<a href="../lektor-at-rails-girls-summer-of-code/">Next: Lektor at Rails Girls Summer of Code 2016</a>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="bottomsummary">
|
||||
<div class="container">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<footer>
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-sm-4 icon-bar">
|
||||
<a href="https://github.com/lektor/lektor/" title="Lektor on GitHub"
|
||||
><i class="fa fa-github"></i></a>
|
||||
<a href="https://github.com/lektor/lektor/issues/" title="Report Issues for Lektor"
|
||||
><i class="fa fa-bug"></i></a>
|
||||
<a href="https://twitter.com/getlektor" title="Find Lektor on Twitter"
|
||||
><i class="fa fa-twitter"></i></a>
|
||||
<a href="https://gitter.im/lektor/lektor" title="Chat on Gitter"
|
||||
><i class="fa fa-comment"></i></a>
|
||||
<a href="https://github.com/lektor/lektor-website/tree/master/content/blog/road-to-lektor-2/contents.lr" title="View source for this page"><i class="fa fa-code"></i></a>
|
||||
</div>
|
||||
<div class="col-sm-8">
|
||||
<a href="../../../../license/">License & Copyright</a> •
|
||||
<a href="../../../../contact/">Contact</a> •
|
||||
Made with <i class="fa fa-fw fa-heart" title="Heart"><span hidden>Heart</span></i> in Carinthia
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
|
||||
<script type=text/javascript src="../../../../static/app.js?h=bb1b933a" charset="utf-8"></script>
|
||||
<script>
|
||||
((window.gitter = {}).chat = {}).options = {
|
||||
room: 'lektor/lektor',
|
||||
activationElement: null
|
||||
};
|
||||
document.write('<button class="js-gitter-toggle-chat-button">Toggle Chat</button>');
|
||||
var dnt = navigator.doNotTrack || window.doNotTrack || navigator.msDoNotTrack;
|
||||
if (dnt != "1" && dnt != "yes") {
|
||||
window.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments)};ga.l=+new Date;
|
||||
ga('create', 'UA-70822533-1', 'auto');
|
||||
ga('set', 'anonymizeIp', true);
|
||||
ga('send', 'pageview');
|
||||
} else {
|
||||
console.debug("Respecting Do-Not-Track, not running analytics.");
|
||||
}
|
||||
</script>
|
||||
<script async src='https://www.google-analytics.com/analytics.js'></script>
|
||||
<script async defer id="github-bjs" src="https://buttons.github.io/buttons.js"></script>
|
||||
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script>
|
||||
<script src="https://sidecar.gitter.im/dist/sidecar.v1.js" async defer></script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,145 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<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/pygments.css">
|
||||
<link rel="shortcut icon" href="../../../static/favicon.png?h=fa09bedd">
|
||||
<title>April 2016 Archive | The Transcript | Lektor Static Content Management System</title>
|
||||
</head>
|
||||
<body class="default">
|
||||
<nav class="navbar navbar-inverse navbar-static-top">
|
||||
<div class="container">
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle collapsed"
|
||||
data-toggle="collapse" data-target="#navbar"
|
||||
aria-expanded="false" aria-controls="navbar">
|
||||
<span class="sr-only">Toggle navigation</span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<a class="navbar-brand" href="../../../">Lektor</a>
|
||||
</div>
|
||||
<div id="navbar" class="collapse navbar-collapse">
|
||||
<ul class="nav navbar-nav">
|
||||
|
||||
<li><a href="../../../downloads/">Download</a></li>
|
||||
|
||||
<li><a href="../../../docs/">Documentation</a></li>
|
||||
|
||||
<li><a href="../../../showcase/">Showcase</a></li>
|
||||
|
||||
<li><a href="../../../plugins/">Plugins</a></li>
|
||||
|
||||
<li><a href="../../../community/">Community</a></li>
|
||||
|
||||
<li class="active"><a href="../../">Blog</a></li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<div class="body-wrapper">
|
||||
|
||||
|
||||
|
||||
<div class="page-banner page-banner-300" style="background-image: url(../../header.jpg)"></div>
|
||||
|
||||
|
||||
<div class="container">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-8">
|
||||
|
||||
<h1>The Transcript, April 2016</h1>
|
||||
<p>
|
||||
<a href="../">« Back to 2016</a>
|
||||
<ul>
|
||||
|
||||
<li><a href="lektor-2-released/">Lektor 2.0 Released</a> by Armin Ronacher on Apr 11, 2016</li>
|
||||
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
<div class="col-sm-4">
|
||||
<h3>About This Blog</h3>
|
||||
<p>
|
||||
“The Transcript” is the blog about <a href="../../../">Lektor</a>, a new solution in static content management.
|
||||
<p>
|
||||
Subscribe for the latest news about Lektor as well as content
|
||||
management and web development.
|
||||
<ul>
|
||||
<li><a href="../../feed.xml">RSS Feed</a></li>
|
||||
<li><a href="https://twitter.com/getlektor">Follow us on Twitter</a></li>
|
||||
</ul>
|
||||
<h3>Missed a Post?</h3>
|
||||
<ul>
|
||||
<li><a href="../../archives/">Blog Archives</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="bottomsummary">
|
||||
<div class="container">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<footer>
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-sm-4 icon-bar">
|
||||
<a href="https://github.com/lektor/lektor/" title="Lektor on GitHub"
|
||||
><i class="fa fa-github"></i></a>
|
||||
<a href="https://github.com/lektor/lektor/issues/" title="Report Issues for Lektor"
|
||||
><i class="fa fa-bug"></i></a>
|
||||
<a href="https://twitter.com/getlektor" title="Find Lektor on Twitter"
|
||||
><i class="fa fa-twitter"></i></a>
|
||||
<a href="https://gitter.im/lektor/lektor" title="Chat on Gitter"
|
||||
><i class="fa fa-comment"></i></a>
|
||||
<a href="https://github.com/lektor/lektor-website/tree/master/content/blog/contents.lr" title="View source for this page"><i class="fa fa-code"></i></a>
|
||||
</div>
|
||||
<div class="col-sm-8">
|
||||
<a href="../../../license/">License & Copyright</a> •
|
||||
<a href="../../../contact/">Contact</a> •
|
||||
Made with <i class="fa fa-fw fa-heart" title="Heart"><span hidden>Heart</span></i> in Carinthia
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
|
||||
<script type=text/javascript src="../../../static/app.js?h=bb1b933a" charset="utf-8"></script>
|
||||
<script>
|
||||
((window.gitter = {}).chat = {}).options = {
|
||||
room: 'lektor/lektor',
|
||||
activationElement: null
|
||||
};
|
||||
document.write('<button class="js-gitter-toggle-chat-button">Toggle Chat</button>');
|
||||
var dnt = navigator.doNotTrack || window.doNotTrack || navigator.msDoNotTrack;
|
||||
if (dnt != "1" && dnt != "yes") {
|
||||
window.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments)};ga.l=+new Date;
|
||||
ga('create', 'UA-70822533-1', 'auto');
|
||||
ga('set', 'anonymizeIp', true);
|
||||
ga('send', 'pageview');
|
||||
} else {
|
||||
console.debug("Respecting Do-Not-Track, not running analytics.");
|
||||
}
|
||||
</script>
|
||||
<script async src='https://www.google-analytics.com/analytics.js'></script>
|
||||
<script async defer id="github-bjs" src="https://buttons.github.io/buttons.js"></script>
|
||||
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script>
|
||||
<script src="https://sidecar.gitter.im/dist/sidecar.v1.js" async defer></script>
|
||||
</body>
|
||||
</html>
|
After Width: | Height: | Size: 620 KiB |
|
@ -0,0 +1,231 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<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/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>
|
||||
</head>
|
||||
<body class="default">
|
||||
<nav class="navbar navbar-inverse navbar-static-top">
|
||||
<div class="container">
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle collapsed"
|
||||
data-toggle="collapse" data-target="#navbar"
|
||||
aria-expanded="false" aria-controls="navbar">
|
||||
<span class="sr-only">Toggle navigation</span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<a class="navbar-brand" href="../../../../">Lektor</a>
|
||||
</div>
|
||||
<div id="navbar" class="collapse navbar-collapse">
|
||||
<ul class="nav navbar-nav">
|
||||
|
||||
<li><a href="../../../../downloads/">Download</a></li>
|
||||
|
||||
<li><a href="../../../../docs/">Documentation</a></li>
|
||||
|
||||
<li><a href="../../../../showcase/">Showcase</a></li>
|
||||
|
||||
<li><a href="../../../../plugins/">Plugins</a></li>
|
||||
|
||||
<li><a href="../../../../community/">Community</a></li>
|
||||
|
||||
<li class="active"><a href="../../../">Blog</a></li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<div class="body-wrapper">
|
||||
|
||||
<div class="blog-post">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="page-banner page-banner-500" style="background-image: url(banner.jpg)"></div>
|
||||
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-md-8 col-md-offset-2">
|
||||
|
||||
<div class="meta-bar">
|
||||
<h1>Lektor 2.0 Released</h1>
|
||||
<p class="meta">
|
||||
by
|
||||
|
||||
<a href="https://twitter.com/mitsuhiko">Armin Ronacher</a>
|
||||
|
||||
on Monday, April 11, 2016
|
||||
</p>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-md-8 col-md-offset-2">
|
||||
<div class="text-block text-block-default">
|
||||
<p>After quite a bit of wait, I'm happy to announce the 2.0 release of Lektor.
|
||||
Some things that previously were supposed to go into this release were pushed
|
||||
out a bit more because the wait just was too long and quite a few features
|
||||
were already in this release.</p>
|
||||
<p>Here is the changelog of what's in this release:</p>
|
||||
<ul>
|
||||
<li>Added <code>_discoverable</code> system field which controls if a page should show
|
||||
up in <code>children</code>. The default is that a page is discoverable. Setting it
|
||||
to <code>False</code> means in practical terms that someone needs to know the URL as
|
||||
all collection operations will not return it.</li>
|
||||
<li>Added <code>for_page</code> function to pagination that returns the pagiantion for a
|
||||
specific page.</li>
|
||||
<li>Make pagination next_page and prev_page be None on the edges.</li>
|
||||
<li>Allow plugins to provide publishers.</li>
|
||||
<li>Added <code>|markdown</code> filter.</li>
|
||||
<li>Added French translations.</li>
|
||||
<li>Unicode filenames as final build artifacts are now explicitly disallowed.</li>
|
||||
<li>Serve up a 404.html as an error page in the dev server.</li>
|
||||
<li>Improvements to the path normalization and alt handling. This should support
|
||||
URL generation in more complex cases between alts now.</li>
|
||||
<li>Show a clearer error message when URL generation fails because a source
|
||||
object is virtual (does not have a path).</li>
|
||||
<li>Empty text is now still valid markdown.</li>
|
||||
<li>Lektor clean now loads the plugins as well.</li>
|
||||
<li>Basic support for type customization.</li>
|
||||
<li>Fields that are absent in a content file from an alternative are now pulled
|
||||
from the primary content file.</li>
|
||||
<li>Development server now resolves index.html for assets as well.</li>
|
||||
<li>Markdown processing now correctly adjusts links relative to where the
|
||||
rendered output is rendered.</li>
|
||||
<li>Added Dutch translations.</li>
|
||||
<li>Added Record.get_siblings()</li>
|
||||
<li>Added various utilties: build_url, join_path, parse_path</li>
|
||||
<li>Added support for virtual paths and made pagination work with it.</li>
|
||||
<li>Added support for Query.distinct</li>
|
||||
<li>Add support for pagination url resolving on root URL.</li>
|
||||
<li>Server information can now also contain extra key/value pairs that
|
||||
can be used by publishers to affect the processing.</li>
|
||||
<li>The thumbnails will now always have the correct width and height set
|
||||
as an attribute.</li>
|
||||
<li>added datetime type</li>
|
||||
<li>added support for the process_image utility functions so that plugins
|
||||
can use it directly.</li>
|
||||
<li>added support for included_assets and excluded_assets in the project file.</li>
|
||||
<li>added Spanish translations.</li>
|
||||
<li>added Japanese translations.</li>
|
||||
<li>added support for discovering existing alts of sources.</li>
|
||||
<li>added support for image cropping.</li>
|
||||
<li>added preliminary support for publishing on windows.</li>
|
||||
<li>children and attachments can now have a hidden flag configured explicitly.
|
||||
Attachments will also no longer inherit the hidden flag of the parent
|
||||
record as that is not a sensible default.</li>
|
||||
<li>changed internal sqlite consistency mode to improve performance on HDDs.</li>
|
||||
<li>allow SVG files to be treated as images. This is something that does not
|
||||
work in all situations yet (in particular thumbnailing does not actually
|
||||
do anything for those)</li>
|
||||
</ul>
|
||||
<p>As always you can install the release as mentioned in the release notes.
|
||||
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.</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-md-8 col-md-offset-2">
|
||||
|
||||
<div class="nav-prev">
|
||||
<a href="../../3/lektor-at-rails-girls-summer-of-code/">Previous: Lektor at Rails Girls Summer of Code 2016</a>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="nav-next">
|
||||
<a href="../../../2018/1/lektor-31-released/">Next: Lektor 3.1 Released</a>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="bottomsummary">
|
||||
<div class="container">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<footer>
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-sm-4 icon-bar">
|
||||
<a href="https://github.com/lektor/lektor/" title="Lektor on GitHub"
|
||||
><i class="fa fa-github"></i></a>
|
||||
<a href="https://github.com/lektor/lektor/issues/" title="Report Issues for Lektor"
|
||||
><i class="fa fa-bug"></i></a>
|
||||
<a href="https://twitter.com/getlektor" title="Find Lektor on Twitter"
|
||||
><i class="fa fa-twitter"></i></a>
|
||||
<a href="https://gitter.im/lektor/lektor" title="Chat on Gitter"
|
||||
><i class="fa fa-comment"></i></a>
|
||||
<a href="https://github.com/lektor/lektor-website/tree/master/content/blog/lektor-2-released/contents.lr" title="View source for this page"><i class="fa fa-code"></i></a>
|
||||
</div>
|
||||
<div class="col-sm-8">
|
||||
<a href="../../../../license/">License & Copyright</a> •
|
||||
<a href="../../../../contact/">Contact</a> •
|
||||
Made with <i class="fa fa-fw fa-heart" title="Heart"><span hidden>Heart</span></i> in Carinthia
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
|
||||
<script type=text/javascript src="../../../../static/app.js?h=bb1b933a" charset="utf-8"></script>
|
||||
<script>
|
||||
((window.gitter = {}).chat = {}).options = {
|
||||
room: 'lektor/lektor',
|
||||
activationElement: null
|
||||
};
|
||||
document.write('<button class="js-gitter-toggle-chat-button">Toggle Chat</button>');
|
||||
var dnt = navigator.doNotTrack || window.doNotTrack || navigator.msDoNotTrack;
|
||||
if (dnt != "1" && dnt != "yes") {
|
||||
window.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments)};ga.l=+new Date;
|
||||
ga('create', 'UA-70822533-1', 'auto');
|
||||
ga('set', 'anonymizeIp', true);
|
||||
ga('send', 'pageview');
|
||||
} else {
|
||||
console.debug("Respecting Do-Not-Track, not running analytics.");
|
||||
}
|
||||
</script>
|
||||
<script async src='https://www.google-analytics.com/analytics.js'></script>
|
||||
<script async defer id="github-bjs" src="https://buttons.github.io/buttons.js"></script>
|
||||
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script>
|
||||
<script src="https://sidecar.gitter.im/dist/sidecar.v1.js" async defer></script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,164 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<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/pygments.css">
|
||||
<link rel="shortcut icon" href="../../static/favicon.png?h=fa09bedd">
|
||||
<title>2016 Archive | The Transcript | Lektor Static Content Management System</title>
|
||||
</head>
|
||||
<body class="default">
|
||||
<nav class="navbar navbar-inverse navbar-static-top">
|
||||
<div class="container">
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle collapsed"
|
||||
data-toggle="collapse" data-target="#navbar"
|
||||
aria-expanded="false" aria-controls="navbar">
|
||||
<span class="sr-only">Toggle navigation</span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<a class="navbar-brand" href="../../">Lektor</a>
|
||||
</div>
|
||||
<div id="navbar" class="collapse navbar-collapse">
|
||||
<ul class="nav navbar-nav">
|
||||
|
||||
<li><a href="../../downloads/">Download</a></li>
|
||||
|
||||
<li><a href="../../docs/">Documentation</a></li>
|
||||
|
||||
<li><a href="../../showcase/">Showcase</a></li>
|
||||
|
||||
<li><a href="../../plugins/">Plugins</a></li>
|
||||
|
||||
<li><a href="../../community/">Community</a></li>
|
||||
|
||||
<li class="active"><a href="../">Blog</a></li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<div class="body-wrapper">
|
||||
|
||||
|
||||
|
||||
<div class="page-banner page-banner-300" style="background-image: url(../header.jpg)"></div>
|
||||
|
||||
|
||||
<div class="container">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-8">
|
||||
|
||||
<h1>The Transcript in 2016</h1>
|
||||
<p>
|
||||
<a href="../archives/">« Back to the archive</a>
|
||||
<ul>
|
||||
|
||||
<li><a href="3/">March</a>:
|
||||
<ul>
|
||||
|
||||
<li><a href="3/lektor-at-rails-girls-summer-of-code/">Lektor at Rails Girls Summer of Code 2016</a> by Armin Ronacher
|
||||
on Mar 17, 2016</li>
|
||||
|
||||
<li><a href="3/road-to-lektor-2/">Road to Lektor 2.0</a> by Armin Ronacher
|
||||
on Mar 10, 2016</li>
|
||||
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<li><a href="4/">April</a>:
|
||||
<ul>
|
||||
|
||||
<li><a href="4/lektor-2-released/">Lektor 2.0 Released</a> by Armin Ronacher
|
||||
on Apr 11, 2016</li>
|
||||
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
<div class="col-sm-4">
|
||||
<h3>About This Blog</h3>
|
||||
<p>
|
||||
“The Transcript” is the blog about <a href="../../">Lektor</a>, a new solution in static content management.
|
||||
<p>
|
||||
Subscribe for the latest news about Lektor as well as content
|
||||
management and web development.
|
||||
<ul>
|
||||
<li><a href="../feed.xml">RSS Feed</a></li>
|
||||
<li><a href="https://twitter.com/getlektor">Follow us on Twitter</a></li>
|
||||
</ul>
|
||||
<h3>Missed a Post?</h3>
|
||||
<ul>
|
||||
<li><a href="../archives/">Blog Archives</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="bottomsummary">
|
||||
<div class="container">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<footer>
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-sm-4 icon-bar">
|
||||
<a href="https://github.com/lektor/lektor/" title="Lektor on GitHub"
|
||||
><i class="fa fa-github"></i></a>
|
||||
<a href="https://github.com/lektor/lektor/issues/" title="Report Issues for Lektor"
|
||||
><i class="fa fa-bug"></i></a>
|
||||
<a href="https://twitter.com/getlektor" title="Find Lektor on Twitter"
|
||||
><i class="fa fa-twitter"></i></a>
|
||||
<a href="https://gitter.im/lektor/lektor" title="Chat on Gitter"
|
||||
><i class="fa fa-comment"></i></a>
|
||||
<a href="https://github.com/lektor/lektor-website/tree/master/content/blog/contents.lr" title="View source for this page"><i class="fa fa-code"></i></a>
|
||||
</div>
|
||||
<div class="col-sm-8">
|
||||
<a href="../../license/">License & Copyright</a> •
|
||||
<a href="../../contact/">Contact</a> •
|
||||
Made with <i class="fa fa-fw fa-heart" title="Heart"><span hidden>Heart</span></i> in Carinthia
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
|
||||
<script type=text/javascript src="../../static/app.js?h=bb1b933a" charset="utf-8"></script>
|
||||
<script>
|
||||
((window.gitter = {}).chat = {}).options = {
|
||||
room: 'lektor/lektor',
|
||||
activationElement: null
|
||||
};
|
||||
document.write('<button class="js-gitter-toggle-chat-button">Toggle Chat</button>');
|
||||
var dnt = navigator.doNotTrack || window.doNotTrack || navigator.msDoNotTrack;
|
||||
if (dnt != "1" && dnt != "yes") {
|
||||
window.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments)};ga.l=+new Date;
|
||||
ga('create', 'UA-70822533-1', 'auto');
|
||||
ga('set', 'anonymizeIp', true);
|
||||
ga('send', 'pageview');
|
||||
} else {
|
||||
console.debug("Respecting Do-Not-Track, not running analytics.");
|
||||
}
|
||||
</script>
|
||||
<script async src='https://www.google-analytics.com/analytics.js'></script>
|
||||
<script async defer id="github-bjs" src="https://buttons.github.io/buttons.js"></script>
|
||||
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script>
|
||||
<script src="https://sidecar.gitter.im/dist/sidecar.v1.js" async defer></script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,145 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<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/pygments.css">
|
||||
<link rel="shortcut icon" href="../../../static/favicon.png?h=fa09bedd">
|
||||
<title>January 2018 Archive | The Transcript | Lektor Static Content Management System</title>
|
||||
</head>
|
||||
<body class="default">
|
||||
<nav class="navbar navbar-inverse navbar-static-top">
|
||||
<div class="container">
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle collapsed"
|
||||
data-toggle="collapse" data-target="#navbar"
|
||||
aria-expanded="false" aria-controls="navbar">
|
||||
<span class="sr-only">Toggle navigation</span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<a class="navbar-brand" href="../../../">Lektor</a>
|
||||
</div>
|
||||
<div id="navbar" class="collapse navbar-collapse">
|
||||
<ul class="nav navbar-nav">
|
||||
|
||||
<li><a href="../../../downloads/">Download</a></li>
|
||||
|
||||
<li><a href="../../../docs/">Documentation</a></li>
|
||||
|
||||
<li><a href="../../../showcase/">Showcase</a></li>
|
||||
|
||||
<li><a href="../../../plugins/">Plugins</a></li>
|
||||
|
||||
<li><a href="../../../community/">Community</a></li>
|
||||
|
||||
<li class="active"><a href="../../">Blog</a></li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<div class="body-wrapper">
|
||||
|
||||
|
||||
|
||||
<div class="page-banner page-banner-300" style="background-image: url(../../header.jpg)"></div>
|
||||
|
||||
|
||||
<div class="container">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-8">
|
||||
|
||||
<h1>The Transcript, January 2018</h1>
|
||||
<p>
|
||||
<a href="../">« Back to 2018</a>
|
||||
<ul>
|
||||
|
||||
<li><a href="lektor-31-released/">Lektor 3.1 Released</a> by Joseph Nix on Jan 29, 2018</li>
|
||||
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
<div class="col-sm-4">
|
||||
<h3>About This Blog</h3>
|
||||
<p>
|
||||
“The Transcript” is the blog about <a href="../../../">Lektor</a>, a new solution in static content management.
|
||||
<p>
|
||||
Subscribe for the latest news about Lektor as well as content
|
||||
management and web development.
|
||||
<ul>
|
||||
<li><a href="../../feed.xml">RSS Feed</a></li>
|
||||
<li><a href="https://twitter.com/getlektor">Follow us on Twitter</a></li>
|
||||
</ul>
|
||||
<h3>Missed a Post?</h3>
|
||||
<ul>
|
||||
<li><a href="../../archives/">Blog Archives</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="bottomsummary">
|
||||
<div class="container">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<footer>
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-sm-4 icon-bar">
|
||||
<a href="https://github.com/lektor/lektor/" title="Lektor on GitHub"
|
||||
><i class="fa fa-github"></i></a>
|
||||
<a href="https://github.com/lektor/lektor/issues/" title="Report Issues for Lektor"
|
||||
><i class="fa fa-bug"></i></a>
|
||||
<a href="https://twitter.com/getlektor" title="Find Lektor on Twitter"
|
||||
><i class="fa fa-twitter"></i></a>
|
||||
<a href="https://gitter.im/lektor/lektor" title="Chat on Gitter"
|
||||
><i class="fa fa-comment"></i></a>
|
||||
<a href="https://github.com/lektor/lektor-website/tree/master/content/blog/contents.lr" title="View source for this page"><i class="fa fa-code"></i></a>
|
||||
</div>
|
||||
<div class="col-sm-8">
|
||||
<a href="../../../license/">License & Copyright</a> •
|
||||
<a href="../../../contact/">Contact</a> •
|
||||
Made with <i class="fa fa-fw fa-heart" title="Heart"><span hidden>Heart</span></i> in Carinthia
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
|
||||
<script type=text/javascript src="../../../static/app.js?h=bb1b933a" charset="utf-8"></script>
|
||||
<script>
|
||||
((window.gitter = {}).chat = {}).options = {
|
||||
room: 'lektor/lektor',
|
||||
activationElement: null
|
||||
};
|
||||
document.write('<button class="js-gitter-toggle-chat-button">Toggle Chat</button>');
|
||||
var dnt = navigator.doNotTrack || window.doNotTrack || navigator.msDoNotTrack;
|
||||
if (dnt != "1" && dnt != "yes") {
|
||||
window.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments)};ga.l=+new Date;
|
||||
ga('create', 'UA-70822533-1', 'auto');
|
||||
ga('set', 'anonymizeIp', true);
|
||||
ga('send', 'pageview');
|
||||
} else {
|
||||
console.debug("Respecting Do-Not-Track, not running analytics.");
|
||||
}
|
||||
</script>
|
||||
<script async src='https://www.google-analytics.com/analytics.js'></script>
|
||||
<script async defer id="github-bjs" src="https://buttons.github.io/buttons.js"></script>
|
||||
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script>
|
||||
<script src="https://sidecar.gitter.im/dist/sidecar.v1.js" async defer></script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,187 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<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/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>
|
||||
</head>
|
||||
<body class="default">
|
||||
<nav class="navbar navbar-inverse navbar-static-top">
|
||||
<div class="container">
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle collapsed"
|
||||
data-toggle="collapse" data-target="#navbar"
|
||||
aria-expanded="false" aria-controls="navbar">
|
||||
<span class="sr-only">Toggle navigation</span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<a class="navbar-brand" href="../../../../">Lektor</a>
|
||||
</div>
|
||||
<div id="navbar" class="collapse navbar-collapse">
|
||||
<ul class="nav navbar-nav">
|
||||
|
||||
<li><a href="../../../../downloads/">Download</a></li>
|
||||
|
||||
<li><a href="../../../../docs/">Documentation</a></li>
|
||||
|
||||
<li><a href="../../../../showcase/">Showcase</a></li>
|
||||
|
||||
<li><a href="../../../../plugins/">Plugins</a></li>
|
||||
|
||||
<li><a href="../../../../community/">Community</a></li>
|
||||
|
||||
<li class="active"><a href="../../../">Blog</a></li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<div class="body-wrapper">
|
||||
|
||||
<div class="blog-post">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="page-banner page-banner-500-tall" style="background-image: url(pancakes-2020863.jpg)"></div>
|
||||
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-md-8 col-md-offset-2">
|
||||
|
||||
<div class="meta-bar">
|
||||
<h1>Lektor 3.1 Released</h1>
|
||||
<p class="meta">
|
||||
by
|
||||
|
||||
<a href="https://twitter.com/nixjdm">Joseph Nix</a>
|
||||
|
||||
on Monday, January 29, 2018
|
||||
</p>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-md-8 col-md-offset-2">
|
||||
<div class="text-block text-block-default">
|
||||
<p>Lektor continues to be discovered and used by more people, and many of these fine people have given back. Lektor is now a little easier to use, and more robust with plenty of bugfixes and added support for Python 3. Let's take a brief look at what's been done, and what we want next.</p>
|
||||
<h2 id="lektor-themes">Lektor Themes</h2><p>Perhaps the most eye-catching change is the introduction of the ability for Lektor to use <a href="/docs/themes/">themes</a>. This can become a very powerful tool, allowing people to make beautiful sites even more quickly by standing on the shoulders of those who have gone before them. Why spend more time fiddling with your CSS, or template queries than you need to? If there's a theme that's similar to yours in either design or function, you can start from there. Assets, templates, models, and flowblocks are all able to be themed, offering a lot of flexibility in what they could provide.</p>
|
||||
<p>This is a very new and experimental feature. We'd love to add more support for themes so that making them and using them is easy, but it may be a bit rough around the edges at the moment. The <a href="https://github.com/rlaverde">contributor</a> who gave Lektor its initial theming ability also created the <a href="https://github.com/rlaverde/lektor-theme-nix">first theme</a>, which is a simple theme based on the <a href="https://themes.gohugo.io/hugo-theme-nix/">Nix Hugo theme</a>.</p>
|
||||
<p>I think this feature has a lot of potential. It's pretty exciting.</p>
|
||||
<h2 id="improved-support-and-testing">Improved Support and Testing</h2><p>If you take a look at the changelog since version 2.0, you'll notice many references to bugfixes and dependency updates. We now support Python 3, and have a more extensive automated testing environment. We have upgraded the versions of Mistune (our current Markdown parser), and several JavaScript dependencies that drive the admin interface. Windows users have a few bugfixes to help them out, and added automated testing to catch more bugs before they reach a release.</p>
|
||||
<h2 id="other-features">Other Features</h2><ul>
|
||||
<li>Templates now have greater control of image quality and rotation.</li>
|
||||
<li>Fixed and expanded handling of image EXIF data.</li>
|
||||
<li>Improved date handling in the admin interface.</li>
|
||||
<li>Added ability to publish from different file systems.</li>
|
||||
<li>Fields can now be disabled for alternatives in the admin interface.</li>
|
||||
<li>Another Plugin hook added between instantiating the Renderer and creating the Markdown Processor.</li>
|
||||
<li><code>lektor dev shell</code> now uses IPython if it's installed.</li>
|
||||
</ul>
|
||||
<h2 id="support-for-mac-installer-paused">Support for Mac Installer Paused</h2><p>The code that was used to create the Mac installer for the Desktop App has <a href="https://github.com/lektor/lektor/issues/420">some problems</a>. We're (hopefully temporarily) pulling support for the desktop app because of this. If you have modern experience making executables (especially cross-platform) and would like to contribute, we'd love to have your support. We generally want to make Lektor as easy to use as possible, and a new desktop app could really help with that.</p>
|
||||
<h2 id="want-to-contribute">Want to Contribute?</h2><p>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. <3</p>
|
||||
<p>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 <a href="https://github.com/lektor/lektor/issues/458">some issues</a>. It could use some TLC.</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-md-8 col-md-offset-2">
|
||||
|
||||
<div class="nav-prev">
|
||||
<a href="../../../2016/4/lektor-2-released/">Previous: Lektor 2.0 Released</a>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="nav-next">
|
||||
<a href="../../5/plugin-play/">Next: Plugin Play</a>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="bottomsummary">
|
||||
<div class="container">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<footer>
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-sm-4 icon-bar">
|
||||
<a href="https://github.com/lektor/lektor/" title="Lektor on GitHub"
|
||||
><i class="fa fa-github"></i></a>
|
||||
<a href="https://github.com/lektor/lektor/issues/" title="Report Issues for Lektor"
|
||||
><i class="fa fa-bug"></i></a>
|
||||
<a href="https://twitter.com/getlektor" title="Find Lektor on Twitter"
|
||||
><i class="fa fa-twitter"></i></a>
|
||||
<a href="https://gitter.im/lektor/lektor" title="Chat on Gitter"
|
||||
><i class="fa fa-comment"></i></a>
|
||||
<a href="https://github.com/lektor/lektor-website/tree/master/content/blog/lektor-31-released/contents.lr" title="View source for this page"><i class="fa fa-code"></i></a>
|
||||
</div>
|
||||
<div class="col-sm-8">
|
||||
<a href="../../../../license/">License & Copyright</a> •
|
||||
<a href="../../../../contact/">Contact</a> •
|
||||
Made with <i class="fa fa-fw fa-heart" title="Heart"><span hidden>Heart</span></i> in Carinthia
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
|
||||
<script type=text/javascript src="../../../../static/app.js?h=bb1b933a" charset="utf-8"></script>
|
||||
<script>
|
||||
((window.gitter = {}).chat = {}).options = {
|
||||
room: 'lektor/lektor',
|
||||
activationElement: null
|
||||
};
|
||||
document.write('<button class="js-gitter-toggle-chat-button">Toggle Chat</button>');
|
||||
var dnt = navigator.doNotTrack || window.doNotTrack || navigator.msDoNotTrack;
|
||||
if (dnt != "1" && dnt != "yes") {
|
||||
window.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments)};ga.l=+new Date;
|
||||
ga('create', 'UA-70822533-1', 'auto');
|
||||
ga('set', 'anonymizeIp', true);
|
||||
ga('send', 'pageview');
|
||||
} else {
|
||||
console.debug("Respecting Do-Not-Track, not running analytics.");
|
||||
}
|
||||
</script>
|
||||
<script async src='https://www.google-analytics.com/analytics.js'></script>
|
||||
<script async defer id="github-bjs" src="https://buttons.github.io/buttons.js"></script>
|
||||
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script>
|
||||
<script src="https://sidecar.gitter.im/dist/sidecar.v1.js" async defer></script>
|
||||
</body>
|
||||
</html>
|
After Width: | Height: | Size: 5.0 MiB |
|
@ -0,0 +1,145 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<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/pygments.css">
|
||||
<link rel="shortcut icon" href="../../../static/favicon.png?h=fa09bedd">
|
||||
<title>May 2018 Archive | The Transcript | Lektor Static Content Management System</title>
|
||||
</head>
|
||||
<body class="default">
|
||||
<nav class="navbar navbar-inverse navbar-static-top">
|
||||
<div class="container">
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle collapsed"
|
||||
data-toggle="collapse" data-target="#navbar"
|
||||
aria-expanded="false" aria-controls="navbar">
|
||||
<span class="sr-only">Toggle navigation</span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<a class="navbar-brand" href="../../../">Lektor</a>
|
||||
</div>
|
||||
<div id="navbar" class="collapse navbar-collapse">
|
||||
<ul class="nav navbar-nav">
|
||||
|
||||
<li><a href="../../../downloads/">Download</a></li>
|
||||
|
||||
<li><a href="../../../docs/">Documentation</a></li>
|
||||
|
||||
<li><a href="../../../showcase/">Showcase</a></li>
|
||||
|
||||
<li><a href="../../../plugins/">Plugins</a></li>
|
||||
|
||||
<li><a href="../../../community/">Community</a></li>
|
||||
|
||||
<li class="active"><a href="../../">Blog</a></li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<div class="body-wrapper">
|
||||
|
||||
|
||||
|
||||
<div class="page-banner page-banner-300" style="background-image: url(../../header.jpg)"></div>
|
||||
|
||||
|
||||
<div class="container">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-8">
|
||||
|
||||
<h1>The Transcript, May 2018</h1>
|
||||
<p>
|
||||
<a href="../">« Back to 2018</a>
|
||||
<ul>
|
||||
|
||||
<li><a href="plugin-play/">Plugin Play</a> by Joseph Nix on May 15, 2018</li>
|
||||
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
<div class="col-sm-4">
|
||||
<h3>About This Blog</h3>
|
||||
<p>
|
||||
“The Transcript” is the blog about <a href="../../../">Lektor</a>, a new solution in static content management.
|
||||
<p>
|
||||
Subscribe for the latest news about Lektor as well as content
|
||||
management and web development.
|
||||
<ul>
|
||||
<li><a href="../../feed.xml">RSS Feed</a></li>
|
||||
<li><a href="https://twitter.com/getlektor">Follow us on Twitter</a></li>
|
||||
</ul>
|
||||
<h3>Missed a Post?</h3>
|
||||
<ul>
|
||||
<li><a href="../../archives/">Blog Archives</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="bottomsummary">
|
||||
<div class="container">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<footer>
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-sm-4 icon-bar">
|
||||
<a href="https://github.com/lektor/lektor/" title="Lektor on GitHub"
|
||||
><i class="fa fa-github"></i></a>
|
||||
<a href="https://github.com/lektor/lektor/issues/" title="Report Issues for Lektor"
|
||||
><i class="fa fa-bug"></i></a>
|
||||
<a href="https://twitter.com/getlektor" title="Find Lektor on Twitter"
|
||||
><i class="fa fa-twitter"></i></a>
|
||||
<a href="https://gitter.im/lektor/lektor" title="Chat on Gitter"
|
||||
><i class="fa fa-comment"></i></a>
|
||||
<a href="https://github.com/lektor/lektor-website/tree/master/content/blog/contents.lr" title="View source for this page"><i class="fa fa-code"></i></a>
|
||||
</div>
|
||||
<div class="col-sm-8">
|
||||
<a href="../../../license/">License & Copyright</a> •
|
||||
<a href="../../../contact/">Contact</a> •
|
||||
Made with <i class="fa fa-fw fa-heart" title="Heart"><span hidden>Heart</span></i> in Carinthia
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
|
||||
<script type=text/javascript src="../../../static/app.js?h=bb1b933a" charset="utf-8"></script>
|
||||
<script>
|
||||
((window.gitter = {}).chat = {}).options = {
|
||||
room: 'lektor/lektor',
|
||||
activationElement: null
|
||||
};
|
||||
document.write('<button class="js-gitter-toggle-chat-button">Toggle Chat</button>');
|
||||
var dnt = navigator.doNotTrack || window.doNotTrack || navigator.msDoNotTrack;
|
||||
if (dnt != "1" && dnt != "yes") {
|
||||
window.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments)};ga.l=+new Date;
|
||||
ga('create', 'UA-70822533-1', 'auto');
|
||||
ga('set', 'anonymizeIp', true);
|
||||
ga('send', 'pageview');
|
||||
} else {
|
||||
console.debug("Respecting Do-Not-Track, not running analytics.");
|
||||
}
|
||||
</script>
|
||||
<script async src='https://www.google-analytics.com/analytics.js'></script>
|
||||
<script async defer id="github-bjs" src="https://buttons.github.io/buttons.js"></script>
|
||||
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script>
|
||||
<script src="https://sidecar.gitter.im/dist/sidecar.v1.js" async defer></script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,176 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<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/pygments.css">
|
||||
<link rel="shortcut icon" href="../../../../static/favicon.png?h=fa09bedd">
|
||||
<title>Plugin Play | The Transcript | Lektor Static Content Management System</title>
|
||||
</head>
|
||||
<body class="default">
|
||||
<nav class="navbar navbar-inverse navbar-static-top">
|
||||
<div class="container">
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle collapsed"
|
||||
data-toggle="collapse" data-target="#navbar"
|
||||
aria-expanded="false" aria-controls="navbar">
|
||||
<span class="sr-only">Toggle navigation</span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<a class="navbar-brand" href="../../../../">Lektor</a>
|
||||
</div>
|
||||
<div id="navbar" class="collapse navbar-collapse">
|
||||
<ul class="nav navbar-nav">
|
||||
|
||||
<li><a href="../../../../downloads/">Download</a></li>
|
||||
|
||||
<li><a href="../../../../docs/">Documentation</a></li>
|
||||
|
||||
<li><a href="../../../../showcase/">Showcase</a></li>
|
||||
|
||||
<li><a href="../../../../plugins/">Plugins</a></li>
|
||||
|
||||
<li><a href="../../../../community/">Community</a></li>
|
||||
|
||||
<li class="active"><a href="../../../">Blog</a></li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<div class="body-wrapper">
|
||||
|
||||
<div class="blog-post">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="page-banner page-banner-300" style="background-image: url(spices.jpg)"></div>
|
||||
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-md-8 col-md-offset-2">
|
||||
|
||||
<div class="meta-bar">
|
||||
<h1>Plugin Play</h1>
|
||||
<p class="meta">
|
||||
by
|
||||
|
||||
<a href="https://twitter.com/nixjdm">Joseph Nix</a>
|
||||
|
||||
on Tuesday, May 15, 2018
|
||||
</p>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-md-8 col-md-offset-2">
|
||||
<div class="text-block text-block-default">
|
||||
<h2 id="get-lektor-updates">Get Lektor Updates</h2><p>This site just updated the way it lists available plugins! Now <a href="https://www.getlektor.com/plugins/">https://www.getlektor.com/plugins/</a> gives you a list of all known Lektor plugins in a much more interactive and informative way. This will hopefully make it much easier for you to discover plugins that are relevant to your project and your needs. If you are a plugin developer, this should also help you find examples from existing plugins to help you learn how to interact better with Lektor's plugin system.</p>
|
||||
<h3 id="categories">Categories</h3><p>Each plugin now falls within one of a few broad categories to help quickly narrow your search for what you're looking for.</p>
|
||||
<h3 id="details">Details</h3><p>Each plugin also now has its own dedicated page. On this page you can see the entire README for a plugin, in beautiful rendered Markdown or reStructuredText, GitHub statistics, authorship information, and tags. This page should give you all the information you need to be able to use the plugin, or to decide if it's what you're looking for as a guide to building your own.</p>
|
||||
<h3 id="tags">Tags</h3><p>Plugins are tagged with specific key words or phrases that describe what they are used for and how they work. All of a plugin's tags are listed on its page as a link. Each tag has its own page where you can see other plugins that share that tag. This offers a powerful way to navigate between related content, and another way to discover more plugins.</p>
|
||||
<p>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 <code>before-build-all</code> event by looking at it's tag page <a href="/plugins/tag/before-build-all/">here</a>. Tag pages for events also have links back to the plugin documentation pages, including the page for that specific event.</p>
|
||||
<p>Now go check out some <a href="/plugins">plugins</a>!</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-md-8 col-md-offset-2">
|
||||
|
||||
<div class="nav-prev">
|
||||
<a href="../../1/lektor-31-released/">Previous: Lektor 3.1 Released</a>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="nav-next">
|
||||
<a href="../../../2020/8/lektor-32-released/">Next: Lektor 3.2 Released</a>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="bottomsummary">
|
||||
<div class="container">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<footer>
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-sm-4 icon-bar">
|
||||
<a href="https://github.com/lektor/lektor/" title="Lektor on GitHub"
|
||||
><i class="fa fa-github"></i></a>
|
||||
<a href="https://github.com/lektor/lektor/issues/" title="Report Issues for Lektor"
|
||||
><i class="fa fa-bug"></i></a>
|
||||
<a href="https://twitter.com/getlektor" title="Find Lektor on Twitter"
|
||||
><i class="fa fa-twitter"></i></a>
|
||||
<a href="https://gitter.im/lektor/lektor" title="Chat on Gitter"
|
||||
><i class="fa fa-comment"></i></a>
|
||||
<a href="https://github.com/lektor/lektor-website/tree/master/content/blog/plugin-play/contents.lr" title="View source for this page"><i class="fa fa-code"></i></a>
|
||||
</div>
|
||||
<div class="col-sm-8">
|
||||
<a href="../../../../license/">License & Copyright</a> •
|
||||
<a href="../../../../contact/">Contact</a> •
|
||||
Made with <i class="fa fa-fw fa-heart" title="Heart"><span hidden>Heart</span></i> in Carinthia
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
|
||||
<script type=text/javascript src="../../../../static/app.js?h=bb1b933a" charset="utf-8"></script>
|
||||
<script>
|
||||
((window.gitter = {}).chat = {}).options = {
|
||||
room: 'lektor/lektor',
|
||||
activationElement: null
|
||||
};
|
||||
document.write('<button class="js-gitter-toggle-chat-button">Toggle Chat</button>');
|
||||
var dnt = navigator.doNotTrack || window.doNotTrack || navigator.msDoNotTrack;
|
||||
if (dnt != "1" && dnt != "yes") {
|
||||
window.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments)};ga.l=+new Date;
|
||||
ga('create', 'UA-70822533-1', 'auto');
|
||||
ga('set', 'anonymizeIp', true);
|
||||
ga('send', 'pageview');
|
||||
} else {
|
||||
console.debug("Respecting Do-Not-Track, not running analytics.");
|
||||
}
|
||||
</script>
|
||||
<script async src='https://www.google-analytics.com/analytics.js'></script>
|
||||
<script async defer id="github-bjs" src="https://buttons.github.io/buttons.js"></script>
|
||||
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script>
|
||||
<script src="https://sidecar.gitter.im/dist/sidecar.v1.js" async defer></script>
|
||||
</body>
|
||||
</html>
|
After Width: | Height: | Size: 759 KiB |
|
@ -0,0 +1,161 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<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/pygments.css">
|
||||
<link rel="shortcut icon" href="../../static/favicon.png?h=fa09bedd">
|
||||
<title>2018 Archive | The Transcript | Lektor Static Content Management System</title>
|
||||
</head>
|
||||
<body class="default">
|
||||
<nav class="navbar navbar-inverse navbar-static-top">
|
||||
<div class="container">
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle collapsed"
|
||||
data-toggle="collapse" data-target="#navbar"
|
||||
aria-expanded="false" aria-controls="navbar">
|
||||
<span class="sr-only">Toggle navigation</span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<a class="navbar-brand" href="../../">Lektor</a>
|
||||
</div>
|
||||
<div id="navbar" class="collapse navbar-collapse">
|
||||
<ul class="nav navbar-nav">
|
||||
|
||||
<li><a href="../../downloads/">Download</a></li>
|
||||
|
||||
<li><a href="../../docs/">Documentation</a></li>
|
||||
|
||||
<li><a href="../../showcase/">Showcase</a></li>
|
||||
|
||||
<li><a href="../../plugins/">Plugins</a></li>
|
||||
|
||||
<li><a href="../../community/">Community</a></li>
|
||||
|
||||
<li class="active"><a href="../">Blog</a></li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<div class="body-wrapper">
|
||||
|
||||
|
||||
|
||||
<div class="page-banner page-banner-300" style="background-image: url(../header.jpg)"></div>
|
||||
|
||||
|
||||
<div class="container">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-8">
|
||||
|
||||
<h1>The Transcript in 2018</h1>
|
||||
<p>
|
||||
<a href="../archives/">« Back to the archive</a>
|
||||
<ul>
|
||||
|
||||
<li><a href="1/">January</a>:
|
||||
<ul>
|
||||
|
||||
<li><a href="1/lektor-31-released/">Lektor 3.1 Released</a> by Joseph Nix
|
||||
on Jan 29, 2018</li>
|
||||
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<li><a href="5/">May</a>:
|
||||
<ul>
|
||||
|
||||
<li><a href="5/plugin-play/">Plugin Play</a> by Joseph Nix
|
||||
on May 15, 2018</li>
|
||||
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
<div class="col-sm-4">
|
||||
<h3>About This Blog</h3>
|
||||
<p>
|
||||
“The Transcript” is the blog about <a href="../../">Lektor</a>, a new solution in static content management.
|
||||
<p>
|
||||
Subscribe for the latest news about Lektor as well as content
|
||||
management and web development.
|
||||
<ul>
|
||||
<li><a href="../feed.xml">RSS Feed</a></li>
|
||||
<li><a href="https://twitter.com/getlektor">Follow us on Twitter</a></li>
|
||||
</ul>
|
||||
<h3>Missed a Post?</h3>
|
||||
<ul>
|
||||
<li><a href="../archives/">Blog Archives</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="bottomsummary">
|
||||
<div class="container">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<footer>
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-sm-4 icon-bar">
|
||||
<a href="https://github.com/lektor/lektor/" title="Lektor on GitHub"
|
||||
><i class="fa fa-github"></i></a>
|
||||
<a href="https://github.com/lektor/lektor/issues/" title="Report Issues for Lektor"
|
||||
><i class="fa fa-bug"></i></a>
|
||||
<a href="https://twitter.com/getlektor" title="Find Lektor on Twitter"
|
||||
><i class="fa fa-twitter"></i></a>
|
||||
<a href="https://gitter.im/lektor/lektor" title="Chat on Gitter"
|
||||
><i class="fa fa-comment"></i></a>
|
||||
<a href="https://github.com/lektor/lektor-website/tree/master/content/blog/contents.lr" title="View source for this page"><i class="fa fa-code"></i></a>
|
||||
</div>
|
||||
<div class="col-sm-8">
|
||||
<a href="../../license/">License & Copyright</a> •
|
||||
<a href="../../contact/">Contact</a> •
|
||||
Made with <i class="fa fa-fw fa-heart" title="Heart"><span hidden>Heart</span></i> in Carinthia
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
|
||||
<script type=text/javascript src="../../static/app.js?h=bb1b933a" charset="utf-8"></script>
|
||||
<script>
|
||||
((window.gitter = {}).chat = {}).options = {
|
||||
room: 'lektor/lektor',
|
||||
activationElement: null
|
||||
};
|
||||
document.write('<button class="js-gitter-toggle-chat-button">Toggle Chat</button>');
|
||||
var dnt = navigator.doNotTrack || window.doNotTrack || navigator.msDoNotTrack;
|
||||
if (dnt != "1" && dnt != "yes") {
|
||||
window.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments)};ga.l=+new Date;
|
||||
ga('create', 'UA-70822533-1', 'auto');
|
||||
ga('set', 'anonymizeIp', true);
|
||||
ga('send', 'pageview');
|
||||
} else {
|
||||
console.debug("Respecting Do-Not-Track, not running analytics.");
|
||||
}
|
||||
</script>
|
||||
<script async src='https://www.google-analytics.com/analytics.js'></script>
|
||||
<script async defer id="github-bjs" src="https://buttons.github.io/buttons.js"></script>
|
||||
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script>
|
||||
<script src="https://sidecar.gitter.im/dist/sidecar.v1.js" async defer></script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,145 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<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/pygments.css">
|
||||
<link rel="shortcut icon" href="../../../static/favicon.png?h=fa09bedd">
|
||||
<title>August 2020 Archive | The Transcript | Lektor Static Content Management System</title>
|
||||
</head>
|
||||
<body class="default">
|
||||
<nav class="navbar navbar-inverse navbar-static-top">
|
||||
<div class="container">
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle collapsed"
|
||||
data-toggle="collapse" data-target="#navbar"
|
||||
aria-expanded="false" aria-controls="navbar">
|
||||
<span class="sr-only">Toggle navigation</span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<a class="navbar-brand" href="../../../">Lektor</a>
|
||||
</div>
|
||||
<div id="navbar" class="collapse navbar-collapse">
|
||||
<ul class="nav navbar-nav">
|
||||
|
||||
<li><a href="../../../downloads/">Download</a></li>
|
||||
|
||||
<li><a href="../../../docs/">Documentation</a></li>
|
||||
|
||||
<li><a href="../../../showcase/">Showcase</a></li>
|
||||
|
||||
<li><a href="../../../plugins/">Plugins</a></li>
|
||||
|
||||
<li><a href="../../../community/">Community</a></li>
|
||||
|
||||
<li class="active"><a href="../../">Blog</a></li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<div class="body-wrapper">
|
||||
|
||||
|
||||
|
||||
<div class="page-banner page-banner-300" style="background-image: url(../../header.jpg)"></div>
|
||||
|
||||
|
||||
<div class="container">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-8">
|
||||
|
||||
<h1>The Transcript, August 2020</h1>
|
||||
<p>
|
||||
<a href="../">« Back to 2020</a>
|
||||
<ul>
|
||||
|
||||
<li><a href="lektor-32-released/">Lektor 3.2 Released</a> by Andreas Runfalk on Aug 20, 2020</li>
|
||||
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
<div class="col-sm-4">
|
||||
<h3>About This Blog</h3>
|
||||
<p>
|
||||
“The Transcript” is the blog about <a href="../../../">Lektor</a>, a new solution in static content management.
|
||||
<p>
|
||||
Subscribe for the latest news about Lektor as well as content
|
||||
management and web development.
|
||||
<ul>
|
||||
<li><a href="../../feed.xml">RSS Feed</a></li>
|
||||
<li><a href="https://twitter.com/getlektor">Follow us on Twitter</a></li>
|
||||
</ul>
|
||||
<h3>Missed a Post?</h3>
|
||||
<ul>
|
||||
<li><a href="../../archives/">Blog Archives</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="bottomsummary">
|
||||
<div class="container">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<footer>
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-sm-4 icon-bar">
|
||||
<a href="https://github.com/lektor/lektor/" title="Lektor on GitHub"
|
||||
><i class="fa fa-github"></i></a>
|
||||
<a href="https://github.com/lektor/lektor/issues/" title="Report Issues for Lektor"
|
||||
><i class="fa fa-bug"></i></a>
|
||||
<a href="https://twitter.com/getlektor" title="Find Lektor on Twitter"
|
||||
><i class="fa fa-twitter"></i></a>
|
||||
<a href="https://gitter.im/lektor/lektor" title="Chat on Gitter"
|
||||
><i class="fa fa-comment"></i></a>
|
||||
<a href="https://github.com/lektor/lektor-website/tree/master/content/blog/contents.lr" title="View source for this page"><i class="fa fa-code"></i></a>
|
||||
</div>
|
||||
<div class="col-sm-8">
|
||||
<a href="../../../license/">License & Copyright</a> •
|
||||
<a href="../../../contact/">Contact</a> •
|
||||
Made with <i class="fa fa-fw fa-heart" title="Heart"><span hidden>Heart</span></i> in Carinthia
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
|
||||
<script type=text/javascript src="../../../static/app.js?h=bb1b933a" charset="utf-8"></script>
|
||||
<script>
|
||||
((window.gitter = {}).chat = {}).options = {
|
||||
room: 'lektor/lektor',
|
||||
activationElement: null
|
||||
};
|
||||
document.write('<button class="js-gitter-toggle-chat-button">Toggle Chat</button>');
|
||||
var dnt = navigator.doNotTrack || window.doNotTrack || navigator.msDoNotTrack;
|
||||
if (dnt != "1" && dnt != "yes") {
|
||||
window.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments)};ga.l=+new Date;
|
||||
ga('create', 'UA-70822533-1', 'auto');
|
||||
ga('set', 'anonymizeIp', true);
|
||||
ga('send', 'pageview');
|
||||
} else {
|
||||
console.debug("Respecting Do-Not-Track, not running analytics.");
|
||||
}
|
||||
</script>
|
||||
<script async src='https://www.google-analytics.com/analytics.js'></script>
|
||||
<script async defer id="github-bjs" src="https://buttons.github.io/buttons.js"></script>
|
||||
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script>
|
||||
<script src="https://sidecar.gitter.im/dist/sidecar.v1.js" async defer></script>
|
||||
</body>
|
||||
</html>
|
After Width: | Height: | Size: 1.5 MiB |
|
@ -0,0 +1,205 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<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/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>
|
||||
</head>
|
||||
<body class="default">
|
||||
<nav class="navbar navbar-inverse navbar-static-top">
|
||||
<div class="container">
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle collapsed"
|
||||
data-toggle="collapse" data-target="#navbar"
|
||||
aria-expanded="false" aria-controls="navbar">
|
||||
<span class="sr-only">Toggle navigation</span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<a class="navbar-brand" href="../../../../">Lektor</a>
|
||||
</div>
|
||||
<div id="navbar" class="collapse navbar-collapse">
|
||||
<ul class="nav navbar-nav">
|
||||
|
||||
<li><a href="../../../../downloads/">Download</a></li>
|
||||
|
||||
<li><a href="../../../../docs/">Documentation</a></li>
|
||||
|
||||
<li><a href="../../../../showcase/">Showcase</a></li>
|
||||
|
||||
<li><a href="../../../../plugins/">Plugins</a></li>
|
||||
|
||||
<li><a href="../../../../community/">Community</a></li>
|
||||
|
||||
<li class="active"><a href="../../../">Blog</a></li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<div class="body-wrapper">
|
||||
|
||||
<div class="blog-post">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="page-banner page-banner-500" style="background-image: url(coffee-ground-1171092-1599x1066.jpg)"></div>
|
||||
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-md-8 col-md-offset-2">
|
||||
|
||||
<div class="meta-bar">
|
||||
<h1>Lektor 3.2 Released</h1>
|
||||
<p class="meta">
|
||||
by
|
||||
|
||||
Andreas Runfalk
|
||||
|
||||
on Thursday, August 20, 2020
|
||||
</p>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-md-8 col-md-offset-2">
|
||||
<div class="text-block text-block-default">
|
||||
<p>It's been a long time in the making, and on behalf of the Lektor Team I'm happy to introduce the 3.2 release of Lektor. As some of you may have noticed the development pace of Lektor has slowed down over the past two years. Those of you who have had open PRs for a long time, sorry for the delay and we'll try to do better going forward!</p>
|
||||
<p>Recently we've made a big push to bring the project back on its feet. Our focus besides merging PRs and fixing various issues has been to streamline the CI and release process. The biggest change was the <a href="https://github.com/lektor/lektor/pull/734">switch from Travis and Appveyor to GitHub actions</a> which should make the release process a lot easier going forward.</p>
|
||||
<p>We have also promoted <a href="https://github.com/lektor/lektor-tags">lektor-tags</a> and <a href="https://github.com/lektor/lektor-atom">lektor-atom</a> to official plugins. This represents our commitment to keep them up to date. We have also deployed a <a href="https://github.com/lektor/lektor-atom/pull/28">new CI workflow</a> that can publish new versions using tags. This will be something all plugin authors can use in their own projects. Thank you <a href="https://github.com/goanpeca">Gonzalo Peña-Castellanos</a> for spearheading the CI improvements.</p>
|
||||
<p>A big shoutout to all the contributors who help make Lektor awesome!</p>
|
||||
<div class="admonition admonition-info"><p>Since Python 2 is EOL and its <a href="https://blog.python.org/2020/04/python-2718-last-release-of-python-2.html">final release ever</a> happened on April 20th, 2020, this will be the last Lektor release with Python 2 support. This is also the last release supporting Python 3.5 since it is <a href="https://devguide.python.org/#status-of-python-branches">very near EOL</a> and we want to have opportunity to work with several benefits of Python 3.6 going forward.</p></div><div class="admonition admonition-warning"><p>The slugify change may mean that your URLs will change when you update to Lektor 3.2. This could lead to broken links from external sites such as search engines. This can be fixed by providing a custom slug for the necessary pages.</p></div><h1 id="changelog">Changelog</h1><h2 id="bugfixes">Bugfixes</h2><ul>
|
||||
<li>Fix to correctly calculate relative urls from slugs that contain dots. (thank you <a href="https://github.com/f-seven">f-seven</a>)</li>
|
||||
<li>Fix to allow negative integers in integer fields in the admin UI. (thank you <a href="https://github.com/davidferguson">David Ferguson</a>)</li>
|
||||
<li>Fix <code>lektor plugins reinstall</code> triggered <code>on_setup_env</code> instead of just reinstalling plugins. (thank you <a href="https://github.com/germn">Mikhail Gerasimov</a>)</li>
|
||||
<li>Fix failing dimensions detection for some JPEG thumbnails. (thank you <a href="https://github.com/xlotlu">Ionuț Ciocîrlan</a>)</li>
|
||||
<li>Fix mismatch between reported thumbnail size and on-disk image when both width & height are provided. (thank you <a href="https://github.com/xlotlu">Ionuț Ciocîrlan</a>)</li>
|
||||
<li>Return JPEG dimensions swapped when EXIF rotation is in effect. (thank you <a href="https://github.com/xlotlu">Ionuț Ciocîrlan</a>)</li>
|
||||
<li>Fix off-by-1px rounding discrepancy between reported thumbnail dimensions and actual dimensions. (thank you <a href="https://github.com/xlotlu">Ionuț Ciocîrlan</a>)</li>
|
||||
<li>Fix off-by-one error in pagination's iter_pages in the interpretation of the right_current argument, and adding an appropriate trailing <code>None</code> for some uses. (thank you <a href="https://github.com/dairiki">Jeff Dairiki</a>)</li>
|
||||
</ul>
|
||||
<h2 id="new-features">New features</h2><ul>
|
||||
<li>Added the ability to <a href="/docs/templates/videoops/">generate video thumbnails</a> with ffmpeg. (thank you <a href="https://github.com/runfalk">Andreas Runfalk</a>)</li>
|
||||
</ul>
|
||||
<h2 id="improvements">Improvements</h2><ul>
|
||||
<li>Added support for setting the output_path in the project file. (thank you <a href="https://github.com/georgeyk">George Kussumoto</a>)</li>
|
||||
<li>Added support for deleting and excluding files for the rsync deployment publisher. (thank you <a href="https://github.com/m-lib">m-lib</a>)</li>
|
||||
<li>Several modernization and performance improvements to the admin UI (thank you <a href="https://github.com/yagebu">Jakob Schnitzer</a>)</li>
|
||||
<li>Improved speed of source info updates. (thank you <a href="https://github.com/dairiki">Jeff Dairiki</a>)</li>
|
||||
<li>Set colorspace to sRGB for thumbnails. This should result in significantly reduced thumbnail file size when the source image uses a more exotic colorspace. (thank you <a href="https://github.com/skorokithakis">Stavros Korokithakis</a>)</li>
|
||||
<li>Now stripping profiles and comments from thumbnails, for even smaller file size. (thank you <a href="https://github.com/skorokithakis">Stavros Korokithakis</a>)</li>
|
||||
<li>Improved speed of flow rendering in the admin UI. (thank you <a href="https://github.com/davidferguson">David Ferguson</a>)</li>
|
||||
<li>Improved image-heavy build speeds by reducing the amount of data extracted from EXIFs. (thank you <a href="https://github.com/tgpfeiffer">Tobias Pfeiffer</a>)</li>
|
||||
<li>Added the ability to collapse flow elements in the admin UI. (thank you <a href="https://github.com/jtraub91">Jason Traub</a>)</li>
|
||||
<li>Now <code>extra_flags</code> is passed to all plugin events. (thank you <a href="https://github.com/nixjdm">Joseph Nix</a>)</li>
|
||||
<li>Extra flags can now be passed to the <code>clean</code> and <code>dev shell</code> CLI commands. (thank you <a href="https://github.com/nixjdm">Joseph Nix</a>)</li>
|
||||
<li>Deprecate the <code>crop</code> thumbnail argument in favor of the new <code>mode</code> argument, which can be one of <code>fit</code> (the default), <code>crop</code>, or <code>stretch</code>. (thank you <a href="https://github.com/xlotlu">Ionuț Ciocîrlan</a>)</li>
|
||||
<li><code>upscale=False</code> for thumbnails can now prevent up scaling. (thank you <a href="https://github.com/xlotlu">Ionuț Ciocîrlan</a>)</li>
|
||||
<li>Added a new CLI command <code>lektor dev new-theme</code>. (thank you <a href="https://github.com/nixjdm">Joseph Nix</a>)</li>
|
||||
<li>Made admin use full UTF-8 version of RobotoSlab. Fixes missing glyphs for some languages (thank you <a href="https://github.com/yagebu">Jakob Schnitzer</a>)</li>
|
||||
<li>Bumped minimum Jinja2 version to 2.11 (thank you <a href="https://github.com/nixjdm">Joseph Nix</a>)</li>
|
||||
<li>Bumped filetype dependency to 1.0.7 because of API changes (thank you <a href="https://github.com/xlotlu">Ionuț Ciocîrlan</a>)</li>
|
||||
<li>Relative urls are now as short as possible. (thank you <a href="https://github.com/relikd">Oleg Geier</a> and <a href="https://github.com/xlotlu">Ionuț Ciocîrlan</a>)</li>
|
||||
<li>Automatically include setup.cfg configured for universal wheels when creating plugins (thank you <a href="https://github.com/georgeyk">George Kussumoto</a>)</li>
|
||||
<li>Changed default slug creation to use <a href="https://github.com/un33k/python-slugify">python-slugify</a>. This should mean greater language support, but this may produce slightly different results than before for some users (thank you <a href="https://github.com/nixjdm">Joseph Nix</a> and <a href="https://github.com/xlotlu">Ionuț Ciocîrlan</a>)</li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-md-8 col-md-offset-2">
|
||||
|
||||
<div class="nav-prev">
|
||||
<a href="../../../2018/5/plugin-play/">Previous: Plugin Play</a>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="bottomsummary">
|
||||
<div class="container">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<footer>
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-sm-4 icon-bar">
|
||||
<a href="https://github.com/lektor/lektor/" title="Lektor on GitHub"
|
||||
><i class="fa fa-github"></i></a>
|
||||
<a href="https://github.com/lektor/lektor/issues/" title="Report Issues for Lektor"
|
||||
><i class="fa fa-bug"></i></a>
|
||||
<a href="https://twitter.com/getlektor" title="Find Lektor on Twitter"
|
||||
><i class="fa fa-twitter"></i></a>
|
||||
<a href="https://gitter.im/lektor/lektor" title="Chat on Gitter"
|
||||
><i class="fa fa-comment"></i></a>
|
||||
<a href="https://github.com/lektor/lektor-website/tree/master/content/blog/lektor-32-released/contents.lr" title="View source for this page"><i class="fa fa-code"></i></a>
|
||||
</div>
|
||||
<div class="col-sm-8">
|
||||
<a href="../../../../license/">License & Copyright</a> •
|
||||
<a href="../../../../contact/">Contact</a> •
|
||||
Made with <i class="fa fa-fw fa-heart" title="Heart"><span hidden>Heart</span></i> in Carinthia
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
|
||||
<script type=text/javascript src="../../../../static/app.js?h=bb1b933a" charset="utf-8"></script>
|
||||
<script>
|
||||
((window.gitter = {}).chat = {}).options = {
|
||||
room: 'lektor/lektor',
|
||||
activationElement: null
|
||||
};
|
||||
document.write('<button class="js-gitter-toggle-chat-button">Toggle Chat</button>');
|
||||
var dnt = navigator.doNotTrack || window.doNotTrack || navigator.msDoNotTrack;
|
||||
if (dnt != "1" && dnt != "yes") {
|
||||
window.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments)};ga.l=+new Date;
|
||||
ga('create', 'UA-70822533-1', 'auto');
|
||||
ga('set', 'anonymizeIp', true);
|
||||
ga('send', 'pageview');
|
||||
} else {
|
||||
console.debug("Respecting Do-Not-Track, not running analytics.");
|
||||
}
|
||||
</script>
|
||||
<script async src='https://www.google-analytics.com/analytics.js'></script>
|
||||
<script async defer id="github-bjs" src="https://buttons.github.io/buttons.js"></script>
|
||||
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script>
|
||||
<script src="https://sidecar.gitter.im/dist/sidecar.v1.js" async defer></script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,152 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<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/pygments.css">
|
||||
<link rel="shortcut icon" href="../../static/favicon.png?h=fa09bedd">
|
||||
<title>2020 Archive | The Transcript | Lektor Static Content Management System</title>
|
||||
</head>
|
||||
<body class="default">
|
||||
<nav class="navbar navbar-inverse navbar-static-top">
|
||||
<div class="container">
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle collapsed"
|
||||
data-toggle="collapse" data-target="#navbar"
|
||||
aria-expanded="false" aria-controls="navbar">
|
||||
<span class="sr-only">Toggle navigation</span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<a class="navbar-brand" href="../../">Lektor</a>
|
||||
</div>
|
||||
<div id="navbar" class="collapse navbar-collapse">
|
||||
<ul class="nav navbar-nav">
|
||||
|
||||
<li><a href="../../downloads/">Download</a></li>
|
||||
|
||||
<li><a href="../../docs/">Documentation</a></li>
|
||||
|
||||
<li><a href="../../showcase/">Showcase</a></li>
|
||||
|
||||
<li><a href="../../plugins/">Plugins</a></li>
|
||||
|
||||
<li><a href="../../community/">Community</a></li>
|
||||
|
||||
<li class="active"><a href="../">Blog</a></li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<div class="body-wrapper">
|
||||
|
||||
|
||||
|
||||
<div class="page-banner page-banner-300" style="background-image: url(../header.jpg)"></div>
|
||||
|
||||
|
||||
<div class="container">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-8">
|
||||
|
||||
<h1>The Transcript in 2020</h1>
|
||||
<p>
|
||||
<a href="../archives/">« Back to the archive</a>
|
||||
<ul>
|
||||
|
||||
<li><a href="8/">August</a>:
|
||||
<ul>
|
||||
|
||||
<li><a href="8/lektor-32-released/">Lektor 3.2 Released</a> by Andreas Runfalk
|
||||
on Aug 20, 2020</li>
|
||||
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
<div class="col-sm-4">
|
||||
<h3>About This Blog</h3>
|
||||
<p>
|
||||
“The Transcript” is the blog about <a href="../../">Lektor</a>, a new solution in static content management.
|
||||
<p>
|
||||
Subscribe for the latest news about Lektor as well as content
|
||||
management and web development.
|
||||
<ul>
|
||||
<li><a href="../feed.xml">RSS Feed</a></li>
|
||||
<li><a href="https://twitter.com/getlektor">Follow us on Twitter</a></li>
|
||||
</ul>
|
||||
<h3>Missed a Post?</h3>
|
||||
<ul>
|
||||
<li><a href="../archives/">Blog Archives</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="bottomsummary">
|
||||
<div class="container">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<footer>
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-sm-4 icon-bar">
|
||||
<a href="https://github.com/lektor/lektor/" title="Lektor on GitHub"
|
||||
><i class="fa fa-github"></i></a>
|
||||
<a href="https://github.com/lektor/lektor/issues/" title="Report Issues for Lektor"
|
||||
><i class="fa fa-bug"></i></a>
|
||||
<a href="https://twitter.com/getlektor" title="Find Lektor on Twitter"
|
||||
><i class="fa fa-twitter"></i></a>
|
||||
<a href="https://gitter.im/lektor/lektor" title="Chat on Gitter"
|
||||
><i class="fa fa-comment"></i></a>
|
||||
<a href="https://github.com/lektor/lektor-website/tree/master/content/blog/contents.lr" title="View source for this page"><i class="fa fa-code"></i></a>
|
||||
</div>
|
||||
<div class="col-sm-8">
|
||||
<a href="../../license/">License & Copyright</a> •
|
||||
<a href="../../contact/">Contact</a> •
|
||||
Made with <i class="fa fa-fw fa-heart" title="Heart"><span hidden>Heart</span></i> in Carinthia
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
|
||||
<script type=text/javascript src="../../static/app.js?h=bb1b933a" charset="utf-8"></script>
|
||||
<script>
|
||||
((window.gitter = {}).chat = {}).options = {
|
||||
room: 'lektor/lektor',
|
||||
activationElement: null
|
||||
};
|
||||
document.write('<button class="js-gitter-toggle-chat-button">Toggle Chat</button>');
|
||||
var dnt = navigator.doNotTrack || window.doNotTrack || navigator.msDoNotTrack;
|
||||
if (dnt != "1" && dnt != "yes") {
|
||||
window.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments)};ga.l=+new Date;
|
||||
ga('create', 'UA-70822533-1', 'auto');
|
||||
ga('set', 'anonymizeIp', true);
|
||||
ga('send', 'pageview');
|
||||
} else {
|
||||
console.debug("Respecting Do-Not-Track, not running analytics.");
|
||||
}
|
||||
</script>
|
||||
<script async src='https://www.google-analytics.com/analytics.js'></script>
|
||||
<script async defer id="github-bjs" src="https://buttons.github.io/buttons.js"></script>
|
||||
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script>
|
||||
<script src="https://sidecar.gitter.im/dist/sidecar.v1.js" async defer></script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,153 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<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/pygments.css">
|
||||
<link rel="shortcut icon" href="../../static/favicon.png?h=fa09bedd">
|
||||
<title>Archive | The Transcript | Lektor Static Content Management System</title>
|
||||
</head>
|
||||
<body class="default">
|
||||
<nav class="navbar navbar-inverse navbar-static-top">
|
||||
<div class="container">
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle collapsed"
|
||||
data-toggle="collapse" data-target="#navbar"
|
||||
aria-expanded="false" aria-controls="navbar">
|
||||
<span class="sr-only">Toggle navigation</span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<a class="navbar-brand" href="../../">Lektor</a>
|
||||
</div>
|
||||
<div id="navbar" class="collapse navbar-collapse">
|
||||
<ul class="nav navbar-nav">
|
||||
|
||||
<li><a href="../../downloads/">Download</a></li>
|
||||
|
||||
<li><a href="../../docs/">Documentation</a></li>
|
||||
|
||||
<li><a href="../../showcase/">Showcase</a></li>
|
||||
|
||||
<li><a href="../../plugins/">Plugins</a></li>
|
||||
|
||||
<li><a href="../../community/">Community</a></li>
|
||||
|
||||
<li class="active"><a href="../">Blog</a></li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<div class="body-wrapper">
|
||||
|
||||
|
||||
|
||||
<div class="page-banner page-banner-300" style="background-image: url(../header.jpg)"></div>
|
||||
|
||||
|
||||
<div class="container">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-8">
|
||||
|
||||
<h1>The Transcript Archive</h1>
|
||||
<p>
|
||||
<a href="../">« back to the blog</a>
|
||||
<p>
|
||||
There have been posts in the following years:
|
||||
<ul>
|
||||
|
||||
<li><a href="../2015/">2015</a></li>
|
||||
|
||||
<li><a href="../2016/">2016</a></li>
|
||||
|
||||
<li><a href="../2018/">2018</a></li>
|
||||
|
||||
<li><a href="../2020/">2020</a></li>
|
||||
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
<div class="col-sm-4">
|
||||
<h3>About This Blog</h3>
|
||||
<p>
|
||||
“The Transcript” is the blog about <a href="../../">Lektor</a>, a new solution in static content management.
|
||||
<p>
|
||||
Subscribe for the latest news about Lektor as well as content
|
||||
management and web development.
|
||||
<ul>
|
||||
<li><a href="../feed.xml">RSS Feed</a></li>
|
||||
<li><a href="https://twitter.com/getlektor">Follow us on Twitter</a></li>
|
||||
</ul>
|
||||
<h3>Missed a Post?</h3>
|
||||
<ul>
|
||||
<li><a href="./">Blog Archives</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="bottomsummary">
|
||||
<div class="container">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<footer>
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-sm-4 icon-bar">
|
||||
<a href="https://github.com/lektor/lektor/" title="Lektor on GitHub"
|
||||
><i class="fa fa-github"></i></a>
|
||||
<a href="https://github.com/lektor/lektor/issues/" title="Report Issues for Lektor"
|
||||
><i class="fa fa-bug"></i></a>
|
||||
<a href="https://twitter.com/getlektor" title="Find Lektor on Twitter"
|
||||
><i class="fa fa-twitter"></i></a>
|
||||
<a href="https://gitter.im/lektor/lektor" title="Chat on Gitter"
|
||||
><i class="fa fa-comment"></i></a>
|
||||
<a href="https://github.com/lektor/lektor-website/tree/master/content/blog/contents.lr" title="View source for this page"><i class="fa fa-code"></i></a>
|
||||
</div>
|
||||
<div class="col-sm-8">
|
||||
<a href="../../license/">License & Copyright</a> •
|
||||
<a href="../../contact/">Contact</a> •
|
||||
Made with <i class="fa fa-fw fa-heart" title="Heart"><span hidden>Heart</span></i> in Carinthia
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
|
||||
<script type=text/javascript src="../../static/app.js?h=bb1b933a" charset="utf-8"></script>
|
||||
<script>
|
||||
((window.gitter = {}).chat = {}).options = {
|
||||
room: 'lektor/lektor',
|
||||
activationElement: null
|
||||
};
|
||||
document.write('<button class="js-gitter-toggle-chat-button">Toggle Chat</button>');
|
||||
var dnt = navigator.doNotTrack || window.doNotTrack || navigator.msDoNotTrack;
|
||||
if (dnt != "1" && dnt != "yes") {
|
||||
window.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments)};ga.l=+new Date;
|
||||
ga('create', 'UA-70822533-1', 'auto');
|
||||
ga('set', 'anonymizeIp', true);
|
||||
ga('send', 'pageview');
|
||||
} else {
|
||||
console.debug("Respecting Do-Not-Track, not running analytics.");
|
||||
}
|
||||
</script>
|
||||
<script async src='https://www.google-analytics.com/analytics.js'></script>
|
||||
<script async defer id="github-bjs" src="https://buttons.github.io/buttons.js"></script>
|
||||
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script>
|
||||
<script src="https://sidecar.gitter.im/dist/sidecar.v1.js" async defer></script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,320 @@
|
|||
<?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">
|
||||
<div class="page-banner page-banner-500" style="background-image: url(coffee-ground-1171092-1599x1066.jpg)"></div>
|
||||
|
||||
<div class="text-block text-block-default">
|
||||
<p>It's been a long time in the making, and on behalf of the Lektor Team I'm happy to introduce the 3.2 release of Lektor. As some of you may have noticed the development pace of Lektor has slowed down over the past two years. Those of you who have had open PRs for a long time, sorry for the delay and we'll try to do better going forward!</p>
|
||||
<p>Recently we've made a big push to bring the project back on its feet. Our focus besides merging PRs and fixing various issues has been to streamline the CI and release process. The biggest change was the <a href="https://github.com/lektor/lektor/pull/734">switch from Travis and Appveyor to GitHub actions</a> which should make the release process a lot easier going forward.</p>
|
||||
<p>We have also promoted <a href="https://github.com/lektor/lektor-tags">lektor-tags</a> and <a href="https://github.com/lektor/lektor-atom">lektor-atom</a> to official plugins. This represents our commitment to keep them up to date. We have also deployed a <a href="https://github.com/lektor/lektor-atom/pull/28">new CI workflow</a> that can publish new versions using tags. This will be something all plugin authors can use in their own projects. Thank you <a href="https://github.com/goanpeca">Gonzalo Peña-Castellanos</a> for spearheading the CI improvements.</p>
|
||||
<p>A big shoutout to all the contributors who help make Lektor awesome!</p>
|
||||
<div class="admonition admonition-info"><p>Since Python 2 is EOL and its <a href="https://blog.python.org/2020/04/python-2718-last-release-of-python-2.html">final release ever</a> happened on April 20th, 2020, this will be the last Lektor release with Python 2 support. This is also the last release supporting Python 3.5 since it is <a href="https://devguide.python.org/#status-of-python-branches">very near EOL</a> and we want to have opportunity to work with several benefits of Python 3.6 going forward.</p></div><div class="admonition admonition-warning"><p>The slugify change may mean that your URLs will change when you update to Lektor 3.2. This could lead to broken links from external sites such as search engines. This can be fixed by providing a custom slug for the necessary pages.</p></div><h1 id="changelog">Changelog</h1><h2 id="bugfixes">Bugfixes</h2><ul>
|
||||
<li>Fix to correctly calculate relative urls from slugs that contain dots. (thank you <a href="https://github.com/f-seven">f-seven</a>)</li>
|
||||
<li>Fix to allow negative integers in integer fields in the admin UI. (thank you <a href="https://github.com/davidferguson">David Ferguson</a>)</li>
|
||||
<li>Fix <code>lektor plugins reinstall</code> triggered <code>on_setup_env</code> instead of just reinstalling plugins. (thank you <a href="https://github.com/germn">Mikhail Gerasimov</a>)</li>
|
||||
<li>Fix failing dimensions detection for some JPEG thumbnails. (thank you <a href="https://github.com/xlotlu">Ionuț Ciocîrlan</a>)</li>
|
||||
<li>Fix mismatch between reported thumbnail size and on-disk image when both width &amp; height are provided. (thank you <a href="https://github.com/xlotlu">Ionuț Ciocîrlan</a>)</li>
|
||||
<li>Return JPEG dimensions swapped when EXIF rotation is in effect. (thank you <a href="https://github.com/xlotlu">Ionuț Ciocîrlan</a>)</li>
|
||||
<li>Fix off-by-1px rounding discrepancy between reported thumbnail dimensions and actual dimensions. (thank you <a href="https://github.com/xlotlu">Ionuț Ciocîrlan</a>)</li>
|
||||
<li>Fix off-by-one error in pagination's iter_pages in the interpretation of the right_current argument, and adding an appropriate trailing <code>None</code> for some uses. (thank you <a href="https://github.com/dairiki">Jeff Dairiki</a>)</li>
|
||||
</ul>
|
||||
<h2 id="new-features">New features</h2><ul>
|
||||
<li>Added the ability to <a href="/docs/templates/videoops/">generate video thumbnails</a> with ffmpeg. (thank you <a href="https://github.com/runfalk">Andreas Runfalk</a>)</li>
|
||||
</ul>
|
||||
<h2 id="improvements">Improvements</h2><ul>
|
||||
<li>Added support for setting the output_path in the project file. (thank you <a href="https://github.com/georgeyk">George Kussumoto</a>)</li>
|
||||
<li>Added support for deleting and excluding files for the rsync deployment publisher. (thank you <a href="https://github.com/m-lib">m-lib</a>)</li>
|
||||
<li>Several modernization and performance improvements to the admin UI (thank you <a href="https://github.com/yagebu">Jakob Schnitzer</a>)</li>
|
||||
<li>Improved speed of source info updates. (thank you <a href="https://github.com/dairiki">Jeff Dairiki</a>)</li>
|
||||
<li>Set colorspace to sRGB for thumbnails. This should result in significantly reduced thumbnail file size when the source image uses a more exotic colorspace. (thank you <a href="https://github.com/skorokithakis">Stavros Korokithakis</a>)</li>
|
||||
<li>Now stripping profiles and comments from thumbnails, for even smaller file size. (thank you <a href="https://github.com/skorokithakis">Stavros Korokithakis</a>)</li>
|
||||
<li>Improved speed of flow rendering in the admin UI. (thank you <a href="https://github.com/davidferguson">David Ferguson</a>)</li>
|
||||
<li>Improved image-heavy build speeds by reducing the amount of data extracted from EXIFs. (thank you <a href="https://github.com/tgpfeiffer">Tobias Pfeiffer</a>)</li>
|
||||
<li>Added the ability to collapse flow elements in the admin UI. (thank you <a href="https://github.com/jtraub91">Jason Traub</a>)</li>
|
||||
<li>Now <code>extra_flags</code> is passed to all plugin events. (thank you <a href="https://github.com/nixjdm">Joseph Nix</a>)</li>
|
||||
<li>Extra flags can now be passed to the <code>clean</code> and <code>dev shell</code> CLI commands. (thank you <a href="https://github.com/nixjdm">Joseph Nix</a>)</li>
|
||||
<li>Deprecate the <code>crop</code> thumbnail argument in favor of the new <code>mode</code> argument, which can be one of <code>fit</code> (the default), <code>crop</code>, or <code>stretch</code>. (thank you <a href="https://github.com/xlotlu">Ionuț Ciocîrlan</a>)</li>
|
||||
<li><code>upscale=False</code> for thumbnails can now prevent up scaling. (thank you <a href="https://github.com/xlotlu">Ionuț Ciocîrlan</a>)</li>
|
||||
<li>Added a new CLI command <code>lektor dev new-theme</code>. (thank you <a href="https://github.com/nixjdm">Joseph Nix</a>)</li>
|
||||
<li>Made admin use full UTF-8 version of RobotoSlab. Fixes missing glyphs for some languages (thank you <a href="https://github.com/yagebu">Jakob Schnitzer</a>)</li>
|
||||
<li>Bumped minimum Jinja2 version to 2.11 (thank you <a href="https://github.com/nixjdm">Joseph Nix</a>)</li>
|
||||
<li>Bumped filetype dependency to 1.0.7 because of API changes (thank you <a href="https://github.com/xlotlu">Ionuț Ciocîrlan</a>)</li>
|
||||
<li>Relative urls are now as short as possible. (thank you <a href="https://github.com/relikd">Oleg Geier</a> and <a href="https://github.com/xlotlu">Ionuț Ciocîrlan</a>)</li>
|
||||
<li>Automatically include setup.cfg configured for universal wheels when creating plugins (thank you <a href="https://github.com/georgeyk">George Kussumoto</a>)</li>
|
||||
<li>Changed default slug creation to use <a href="https://github.com/un33k/python-slugify">python-slugify</a>. This should mean greater language support, but this may produce slightly different results than before for some users (thank you <a href="https://github.com/nixjdm">Joseph Nix</a> and <a href="https://github.com/xlotlu">Ionuț Ciocîrlan</a>)</li>
|
||||
</ul>
|
||||
|
||||
</div></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">
|
||||
<div class="page-banner page-banner-300" style="background-image: url(spices.jpg)"></div>
|
||||
|
||||
<div class="text-block text-block-default">
|
||||
<h2 id="get-lektor-updates">Get Lektor Updates</h2><p>This site just updated the way it lists available plugins! Now <a href="https://www.getlektor.com/plugins/">https://www.getlektor.com/plugins/</a> gives you a list of all known Lektor plugins in a much more interactive and informative way. This will hopefully make it much easier for you to discover plugins that are relevant to your project and your needs. If you are a plugin developer, this should also help you find examples from existing plugins to help you learn how to interact better with Lektor's plugin system.</p>
|
||||
<h3 id="categories">Categories</h3><p>Each plugin now falls within one of a few broad categories to help quickly narrow your search for what you're looking for.</p>
|
||||
<h3 id="details">Details</h3><p>Each plugin also now has its own dedicated page. On this page you can see the entire README for a plugin, in beautiful rendered Markdown or reStructuredText, GitHub statistics, authorship information, and tags. This page should give you all the information you need to be able to use the plugin, or to decide if it's what you're looking for as a guide to building your own.</p>
|
||||
<h3 id="tags">Tags</h3><p>Plugins are tagged with specific key words or phrases that describe what they are used for and how they work. All of a plugin's tags are listed on its page as a link. Each tag has its own page where you can see other plugins that share that tag. This offers a powerful way to navigate between related content, and another way to discover more plugins.</p>
|
||||
<p>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 <code>before-build-all</code> event by looking at it's tag page <a href="/plugins/tag/before-build-all/">here</a>. Tag pages for events also have links back to the plugin documentation pages, including the page for that specific event.</p>
|
||||
<p>Now go check out some <a href="/plugins">plugins</a>!</p>
|
||||
|
||||
</div></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">
|
||||
<div class="page-banner page-banner-500-tall" style="background-image: url(pancakes-2020863.jpg)"></div>
|
||||
|
||||
<div class="text-block text-block-default">
|
||||
<p>Lektor continues to be discovered and used by more people, and many of these fine people have given back. Lektor is now a little easier to use, and more robust with plenty of bugfixes and added support for Python 3. Let's take a brief look at what's been done, and what we want next.</p>
|
||||
<h2 id="lektor-themes">Lektor Themes</h2><p>Perhaps the most eye-catching change is the introduction of the ability for Lektor to use <a href="/docs/themes/">themes</a>. This can become a very powerful tool, allowing people to make beautiful sites even more quickly by standing on the shoulders of those who have gone before them. Why spend more time fiddling with your CSS, or template queries than you need to? If there's a theme that's similar to yours in either design or function, you can start from there. Assets, templates, models, and flowblocks are all able to be themed, offering a lot of flexibility in what they could provide.</p>
|
||||
<p>This is a very new and experimental feature. We'd love to add more support for themes so that making them and using them is easy, but it may be a bit rough around the edges at the moment. The <a href="https://github.com/rlaverde">contributor</a> who gave Lektor its initial theming ability also created the <a href="https://github.com/rlaverde/lektor-theme-nix">first theme</a>, which is a simple theme based on the <a href="https://themes.gohugo.io/hugo-theme-nix/">Nix Hugo theme</a>.</p>
|
||||
<p>I think this feature has a lot of potential. It's pretty exciting.</p>
|
||||
<h2 id="improved-support-and-testing">Improved Support and Testing</h2><p>If you take a look at the changelog since version 2.0, you'll notice many references to bugfixes and dependency updates. We now support Python 3, and have a more extensive automated testing environment. We have upgraded the versions of Mistune (our current Markdown parser), and several JavaScript dependencies that drive the admin interface. Windows users have a few bugfixes to help them out, and added automated testing to catch more bugs before they reach a release.</p>
|
||||
<h2 id="other-features">Other Features</h2><ul>
|
||||
<li>Templates now have greater control of image quality and rotation.</li>
|
||||
<li>Fixed and expanded handling of image EXIF data.</li>
|
||||
<li>Improved date handling in the admin interface.</li>
|
||||
<li>Added ability to publish from different file systems.</li>
|
||||
<li>Fields can now be disabled for alternatives in the admin interface.</li>
|
||||
<li>Another Plugin hook added between instantiating the Renderer and creating the Markdown Processor.</li>
|
||||
<li><code>lektor dev shell</code> now uses IPython if it's installed.</li>
|
||||
</ul>
|
||||
<h2 id="support-for-mac-installer-paused">Support for Mac Installer Paused</h2><p>The code that was used to create the Mac installer for the Desktop App has <a href="https://github.com/lektor/lektor/issues/420">some problems</a>. We're (hopefully temporarily) pulling support for the desktop app because of this. If you have modern experience making executables (especially cross-platform) and would like to contribute, we'd love to have your support. We generally want to make Lektor as easy to use as possible, and a new desktop app could really help with that.</p>
|
||||
<h2 id="want-to-contribute">Want to Contribute?</h2><p>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. &lt;3</p>
|
||||
<p>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 <a href="https://github.com/lektor/lektor/issues/458">some issues</a>. It could use some TLC.</p>
|
||||
|
||||
</div></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">
|
||||
<div class="page-banner page-banner-500" style="background-image: url(banner.jpg)"></div>
|
||||
|
||||
<div class="text-block text-block-default">
|
||||
<p>After quite a bit of wait, I'm happy to announce the 2.0 release of Lektor.
|
||||
Some things that previously were supposed to go into this release were pushed
|
||||
out a bit more because the wait just was too long and quite a few features
|
||||
were already in this release.</p>
|
||||
<p>Here is the changelog of what's in this release:</p>
|
||||
<ul>
|
||||
<li>Added <code>_discoverable</code> system field which controls if a page should show
|
||||
up in <code>children</code>. The default is that a page is discoverable. Setting it
|
||||
to <code>False</code> means in practical terms that someone needs to know the URL as
|
||||
all collection operations will not return it.</li>
|
||||
<li>Added <code>for_page</code> function to pagination that returns the pagiantion for a
|
||||
specific page.</li>
|
||||
<li>Make pagination next_page and prev_page be None on the edges.</li>
|
||||
<li>Allow plugins to provide publishers.</li>
|
||||
<li>Added <code>|markdown</code> filter.</li>
|
||||
<li>Added French translations.</li>
|
||||
<li>Unicode filenames as final build artifacts are now explicitly disallowed.</li>
|
||||
<li>Serve up a 404.html as an error page in the dev server.</li>
|
||||
<li>Improvements to the path normalization and alt handling. This should support
|
||||
URL generation in more complex cases between alts now.</li>
|
||||
<li>Show a clearer error message when URL generation fails because a source
|
||||
object is virtual (does not have a path).</li>
|
||||
<li>Empty text is now still valid markdown.</li>
|
||||
<li>Lektor clean now loads the plugins as well.</li>
|
||||
<li>Basic support for type customization.</li>
|
||||
<li>Fields that are absent in a content file from an alternative are now pulled
|
||||
from the primary content file.</li>
|
||||
<li>Development server now resolves index.html for assets as well.</li>
|
||||
<li>Markdown processing now correctly adjusts links relative to where the
|
||||
rendered output is rendered.</li>
|
||||
<li>Added Dutch translations.</li>
|
||||
<li>Added Record.get_siblings()</li>
|
||||
<li>Added various utilties: build_url, join_path, parse_path</li>
|
||||
<li>Added support for virtual paths and made pagination work with it.</li>
|
||||
<li>Added support for Query.distinct</li>
|
||||
<li>Add support for pagination url resolving on root URL.</li>
|
||||
<li>Server information can now also contain extra key/value pairs that
|
||||
can be used by publishers to affect the processing.</li>
|
||||
<li>The thumbnails will now always have the correct width and height set
|
||||
as an attribute.</li>
|
||||
<li>added datetime type</li>
|
||||
<li>added support for the process_image utility functions so that plugins
|
||||
can use it directly.</li>
|
||||
<li>added support for included_assets and excluded_assets in the project file.</li>
|
||||
<li>added Spanish translations.</li>
|
||||
<li>added Japanese translations.</li>
|
||||
<li>added support for discovering existing alts of sources.</li>
|
||||
<li>added support for image cropping.</li>
|
||||
<li>added preliminary support for publishing on windows.</li>
|
||||
<li>children and attachments can now have a hidden flag configured explicitly.
|
||||
Attachments will also no longer inherit the hidden flag of the parent
|
||||
record as that is not a sensible default.</li>
|
||||
<li>changed internal sqlite consistency mode to improve performance on HDDs.</li>
|
||||
<li>allow SVG files to be treated as images. This is something that does not
|
||||
work in all situations yet (in particular thumbnailing does not actually
|
||||
do anything for those)</li>
|
||||
</ul>
|
||||
<p>As always you can install the release as mentioned in the release notes.
|
||||
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.</p>
|
||||
|
||||
</div></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">
|
||||
<div class="page-banner page-banner-500" style="background-image: url(banner.jpg)"></div>
|
||||
|
||||
<div class="text-block text-block-default">
|
||||
<p>I'm happy to announce that Lektor is participating as a project in this year's
|
||||
<a href="http://railsgirlssummerofcode.org/">Rails Girls Summer of Code</a> (RGSOC).
|
||||
Unlike what the name would suggest, RGSOC is open for all Open Source projects
|
||||
and not just Ruby.</p>
|
||||
<p>The goal of RGSOC is to bring more women into programming. To quote the
|
||||
website:</p>
|
||||
<blockquote><p>Rails Girls Summer of Code is a global fellowship program aimed at bringing
|
||||
more diversity into Open Source. Successful applicants are paid a monthly
|
||||
stipend, from July-September, to work on Open Source projects of their
|
||||
choice.</p>
|
||||
</blockquote>
|
||||
<p>Lektor was accepted as a particpating project. For more information about
|
||||
the project there refer to the <a href="https://teams.railsgirlssummerofcode.org/projects/115-lektor-cms">project overview on
|
||||
RGSOC</a>.</p>
|
||||
<p>We want to make it as easy as possible to work on Lektor during the event which
|
||||
is why we will be very flexible with regards to which area interested
|
||||
developers want to work on.</p>
|
||||
<p>If you are interested in working on Lektor you can reach out to us via
|
||||
Twitter at <a href="https://twitter.com/getlektor">@getlektor</a> or
|
||||
<a href="https://gitter.im/lektor/lektor"
|
||||
class="js-gitter-toggle-chat-button">Gitter</a>.</p>
|
||||
|
||||
</div></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">
|
||||
<div class="page-banner page-banner-500" style="background-image: url(header.jpg)"></div>
|
||||
|
||||
<div class="text-block text-block-default">
|
||||
<p>It's great to see what people have been building with Lektor so far. It also
|
||||
shows us what still needs to be built. For a lot of things we improved for
|
||||
Lektor 2.0 which is going to release very soon indeed. To give you some ideas
|
||||
what's going to change here is a current brief look into the changelog and
|
||||
what has been changed so far.</p>
|
||||
<h2 id="page-discovery">Page Discovery</h2><p>One of the biggest frustrations users have voiced is the inability to control
|
||||
discoverability of pages. In Lektor 1.0 you can only hide pages entirely in
|
||||
which case the build process skips over them but there was no way to hide them
|
||||
by default from queries. While you could always hide pages by changing the
|
||||
query, this did not work for pagination and it also required you to be quite
|
||||
careful with the queries you are writing in templates.</p>
|
||||
<p>In Lektor 2.0 we introduced the system <code>_discoverable</code> attribute which allows
|
||||
you to easily hide pages from any query. Queries can explicitly include
|
||||
undiscoverable pages but you do not need to take care of this yourself. This
|
||||
makes it possible to automatically hide drafts from blogs for instance. Lektor
|
||||
will still build it but without knowing the URL you cannot see it on the
|
||||
overview.</p>
|
||||
<h2 id="virtual-paths">Virtual Paths</h2><p>The biggest change in Lektor 2.0 is the introduction of virtual paths and
|
||||
sources. This is somewhat of an under the hood change but it has big
|
||||
implications on what is possible with Lektor plugins. Each page can have
|
||||
virtual resources below it that can be provided by plugins. These virtual
|
||||
resources are separated from the page through what is called a virtual path
|
||||
which is indicated by the at-sign (<code>@</code>). For instance this blog here uses
|
||||
a plugin which provides a blog archive available at <code>/blog@blog-archive</code> and
|
||||
the year 2015 is available at <code>/blog@blog-archive/2015</code> etc.</p>
|
||||
<h2 id="next/previous-page">Next / Previous Page</h2><p>Lektor 2.0 implements sibling support through it's virtual path system which
|
||||
allows you to refer to the next or previous record easily. This is for
|
||||
instance used by this blog here to link between blog posts.</p>
|
||||
<h2 id="improved-alternative-support">Improved Alternative Support</h2><p>Alternatives were heavily improved. Individual fields that are absent in
|
||||
content files now fall back to the primary content file. In addition it is
|
||||
now possible to ask Lektor about which alternatives exist for a given source
|
||||
or in total. This simplifies handling of internationalized pages greatly
|
||||
but more work will be done in that field.</p>
|
||||
<h2 id="improved-plugin-support">Improved Plugin Support</h2><p>Plugins now have the ability to do a few more things they could not do before:</p>
|
||||
<ul>
|
||||
<li>custom field types (want to render reStructuredText? You can now build a plugin)</li>
|
||||
<li>custom build programs: because of the virtual source and path support you can
|
||||
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.</li>
|
||||
</ul>
|
||||
|
||||
</div></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">
|
||||
<div class="page-banner page-banner-500" style="background-image: url(header.jpg)"></div>
|
||||
|
||||
<div class="text-block text-block-default">
|
||||
<p>Open Source projects need websites, that's a given, and one of the most popular
|
||||
ways to host them these days is <a href="https://pages.github.com/" class="ext">GitHub Pages</a>.
|
||||
It's a free service provided by <a href="https://github.com/" class="ext">GitHub</a> which allows
|
||||
hosts a git repository as a website on a subdomain of <code>github.io</code>.</p>
|
||||
<p>Wouldn't it be nice if you could easily host Lektor projects on there? Turns
|
||||
out you can with the help of <a href="https://travis-ci.org/" class="ext">Travis-CI</a>. Because
|
||||
Lektor has built-in support for deploying to GitHub Pages pairing up the three
|
||||
is a breeze.</p>
|
||||
<p>We <a href="../../../../docs/deployment/travisci/" class="ref">created a guide</a> and also recorded
|
||||
a screencast that goes with it:</p>
|
||||
<iframe width="100%" height=410 frameborder="0" allowfullscreen="allowfullscreen"
|
||||
src="https://www.youtube.com/embed/3pj_EyZIL5A?autoplay=0&fs=1">
|
||||
</iframe>
|
||||
</div></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">
|
||||
<div class="page-banner page-banner-500" style="background-image: url(banner.jpg)"></div>
|
||||
|
||||
<div class="text-block text-block-default">
|
||||
<p>About <a href="http://w3techs.com/technologies/details/cm-wordpress/all/all">25% of the Internet uses
|
||||
Wordpress</a> and
|
||||
it's estimated that about 50% of Wordpress installations out there are
|
||||
vulnerable to security problems because they have not been updated. This is a
|
||||
very high number.</p>
|
||||
<p>Because I know how much work it can be to keep software updated and my own
|
||||
terrible track record of spending time of updating everything I'm running
|
||||
I kept getting increasingly frustrated with the lack of software that would
|
||||
allow me to run a simple website in a secure manner without having to resort
|
||||
to all kinds of user-unfriendly hackery.</p>
|
||||
<p>While there are many static site generators none of them really matched what I
|
||||
actually wanted: a content management system that just happens to run
|
||||
on the client. Most static website generators are too “hacker focused” in the
|
||||
sense that they could not be used by people without programming experiences or
|
||||
they are full fledged content management systems that need a server to run on
|
||||
or require regular maintenance for security updates.</p>
|
||||
<p>There the hacker's favorite projects like
|
||||
<a href="https://github.com/getpelican/pelican">Pelican</a> or
|
||||
<a href="https://jekyllrb.com/">Jekyll</a> which support generating websites out of static
|
||||
files that are tracked through version control and there are CMS systems like
|
||||
<a href="http://statamic.com/">Statamic</a> which store all of its data in flat files
|
||||
— but as mentioned — needs PHP.</p>
|
||||
<p>None of those were what I was looking for. Static file generators like Jekyll
|
||||
are nice in a way but not just end user unfriendly, but also very limited in
|
||||
what you can do with them. They are more suited for building blogs than
|
||||
more complex sites. I tried a bunch of them and built different things
|
||||
with them, but ultimately always felt like something was missing.</p>
|
||||
<p>After about two years of frustration with that situation I finally sat down
|
||||
and spend some time working on a system to solve this problem. May I
|
||||
introduce: Lektor.</p>
|
||||
<h2 id="what-is-lektor">What is Lektor?</h2><p>Lektor combines the experience of using a content management system like
|
||||
Wordpress with a static website generator like Jekyll and has some of the
|
||||
flexibility of a web development framework like Django. It can run locally
|
||||
on your computer and deploy to remote servers. All source assets are stored
|
||||
either in version control or Dropbox and when you are satisfied with the end
|
||||
results, you can push them online from the UI to a remote server.</p>
|
||||
<p>And this is what it roughly looks like when you look at the admin panel:</p>
|
||||
<div class="screenshot-frame"><img src="admin.png"></div><h2 id="how-do-i-use-it">How do I use it?</h2><p>That depends on who you are. Lektor is based on the idea that there are
|
||||
two parties to a website: the web developers and the editors. The former
|
||||
create the design, layout, data layout and configures Lektor in general. The
|
||||
latter change the contents of the website according to the general setup.</p>
|
||||
<p>If you are a web developer you can install two versions of Lektor: you can
|
||||
use the command line client or if you are on a Mac, you can install the
|
||||
desktop version. Either version comes with a handy web interface that
|
||||
can be used to preview and edit all pages.</p>
|
||||
<p>Once you have configured Lektor to your liking you can put the project into
|
||||
version control (or just Dropbox) and let your users modify the contents. All
|
||||
they have to do is to install the Desktop version of Lektor, double click the
|
||||
project in their Dropbox and start changing it.</p>
|
||||
<p>If you just want to edit the contents of a project you can install the
|
||||
Desktop version or maybe in the future use a cloud hosted version.</p>
|
||||
<h2 id="project-layout">Project Layout</h2><p>To get an idea how it works, you can have a look at the <a href="https://github.com/lektor/lektor-website/">github repository of
|
||||
this website</a> which contains the
|
||||
project for this website and blog and have a look at the introduction
|
||||
documentation: <a href="../../../../docs/quickstart/" class="ref">Getting Started</a>. You can
|
||||
also find a screencast there.</p>
|
||||
<p>On a very basic level Lektor takes <code>.lr</code> files which are basic text files
|
||||
with a super simple format and generates out HTML files. The <code>.lr</code> files
|
||||
correspond to a previously set up data model. They are pure text format for
|
||||
key/value pairs. Each pair is separated by three dashes (<code>---</code>):</p>
|
||||
<pre><code>field_1: value
|
||||
---
|
||||
field_2:
|
||||
|
||||
a longer value
|
||||
</code></pre>
|
||||
<p>You can set up data models for simple things like blog posts but also more
|
||||
elaborate ones if you want to build portfolio sites. For instance you could
|
||||
set up models for your projects and then access that data in the templates.</p>
|
||||
<p>The content files are stored in folders in a tree like structure and at any
|
||||
level you can add other files as attachments:</p>
|
||||
<div class="screenshot-frame"><img src="structure.png"></div><h2 id="an-open-source-project">An Open Source Project</h2><p>Lektor is available under <a href="../../../../license/">a BSD license</a> and run as a
|
||||
community Open Source project <a href="https://github.com/lektor/lektor/" class="ext">on github</a>.
|
||||
The build system is written in Python, the UI in JavaScript with React and
|
||||
the GUI components use Electron.</p>
|
||||
<h2 id="feedback-appreciated">Feedback Appreciated</h2><p>Lektor took two attempts to get into a usable application and I'm sure that
|
||||
there is more that needs to be done to scratch the needs of most users.
|
||||
However I also know that there is no point in delaying an initial release
|
||||
unnecessarily. What's being released today is the application as it exists
|
||||
today and I think it's in a good shape to build really cool websites with
|
||||
it. I welcome you to give it a try and give feedback on what you think
|
||||
about it.</p>
|
||||
|
||||
</div></content></entry></feed>
|
After Width: | Height: | Size: 212 KiB |
|
@ -0,0 +1,254 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<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/pygments.css">
|
||||
<link rel="shortcut icon" href="../static/favicon.png?h=fa09bedd">
|
||||
<title>The Transcript | Lektor Static Content Management System</title>
|
||||
</head>
|
||||
<body class="default">
|
||||
<nav class="navbar navbar-inverse navbar-static-top">
|
||||
<div class="container">
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle collapsed"
|
||||
data-toggle="collapse" data-target="#navbar"
|
||||
aria-expanded="false" aria-controls="navbar">
|
||||
<span class="sr-only">Toggle navigation</span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<a class="navbar-brand" href="../">Lektor</a>
|
||||
</div>
|
||||
<div id="navbar" class="collapse navbar-collapse">
|
||||
<ul class="nav navbar-nav">
|
||||
|
||||
<li><a href="../downloads/">Download</a></li>
|
||||
|
||||
<li><a href="../docs/">Documentation</a></li>
|
||||
|
||||
<li><a href="../showcase/">Showcase</a></li>
|
||||
|
||||
<li><a href="../plugins/">Plugins</a></li>
|
||||
|
||||
<li><a href="../community/">Community</a></li>
|
||||
|
||||
<li class="active"><a href="./">Blog</a></li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<div class="body-wrapper">
|
||||
|
||||
|
||||
|
||||
<div class="page-banner page-banner-300" style="background-image: url(header.jpg)"></div>
|
||||
|
||||
|
||||
<div class="container">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-8">
|
||||
|
||||
<h1>The Transcript</h1>
|
||||
|
||||
<div class="blog-snippet">
|
||||
<h2><a href="2020/8/lektor-32-released/">Lektor 3.2 Released</a></h2>
|
||||
<p class="summary">
|
||||
What's changed with Lektor 3.2
|
||||
<a class="more" href="2020/8/lektor-32-released/">Read more …</a>
|
||||
<p class="meta">
|
||||
by
|
||||
|
||||
Andreas Runfalk
|
||||
|
||||
on Aug 20, 2020
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div class="blog-snippet">
|
||||
<h2><a href="2018/5/plugin-play/">Plugin Play</a></h2>
|
||||
<p class="summary">
|
||||
Discovering and learning about plugins just got easier.
|
||||
<a class="more" href="2018/5/plugin-play/">Read more …</a>
|
||||
<p class="meta">
|
||||
by
|
||||
|
||||
<a href="https://twitter.com/nixjdm">Joseph Nix</a>
|
||||
|
||||
on May 15, 2018
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div class="blog-snippet">
|
||||
<h2><a href="2018/1/lektor-31-released/">Lektor 3.1 Released</a></h2>
|
||||
<p class="summary">
|
||||
What's changed with Lektor 3.1.
|
||||
<a class="more" href="2018/1/lektor-31-released/">Read more …</a>
|
||||
<p class="meta">
|
||||
by
|
||||
|
||||
<a href="https://twitter.com/nixjdm">Joseph Nix</a>
|
||||
|
||||
on Jan 29, 2018
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div class="blog-snippet">
|
||||
<h2><a href="2016/4/lektor-2-released/">Lektor 2.0 Released</a></h2>
|
||||
<p class="summary">
|
||||
After a long wait, Lektor 2.0 is now available for consumption.
|
||||
<a class="more" href="2016/4/lektor-2-released/">Read more …</a>
|
||||
<p class="meta">
|
||||
by
|
||||
|
||||
<a href="https://twitter.com/mitsuhiko">Armin Ronacher</a>
|
||||
|
||||
on Apr 11, 2016
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div class="blog-snippet">
|
||||
<h2><a href="2016/3/lektor-at-rails-girls-summer-of-code/">Lektor at Rails Girls Summer of Code 2016</a></h2>
|
||||
<p class="summary">
|
||||
Lektor is participating as a project in the Rails Girls Summer of Code.
|
||||
<a class="more" href="2016/3/lektor-at-rails-girls-summer-of-code/">Read more …</a>
|
||||
<p class="meta">
|
||||
by
|
||||
|
||||
<a href="https://twitter.com/mitsuhiko">Armin Ronacher</a>
|
||||
|
||||
on Mar 17, 2016
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div class="blog-snippet">
|
||||
<h2><a href="2016/3/road-to-lektor-2/">Road to Lektor 2.0</a></h2>
|
||||
<p class="summary">
|
||||
What's cooking for Lektor 2.0 and what's missing so far.
|
||||
<a class="more" href="2016/3/road-to-lektor-2/">Read more …</a>
|
||||
<p class="meta">
|
||||
by
|
||||
|
||||
<a href="https://twitter.com/mitsuhiko">Armin Ronacher</a>
|
||||
|
||||
on Mar 10, 2016
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div class="blog-snippet">
|
||||
<h2><a href="2015/12/travis-and-ghpages/">Lektor Loves Travis-CI and GitHub Pages</a></h2>
|
||||
<p class="summary">
|
||||
Read about how to use Lektor with Travis-CI and GitHub Pages.
|
||||
<a class="more" href="2015/12/travis-and-ghpages/">Read more …</a>
|
||||
<p class="meta">
|
||||
by
|
||||
|
||||
<a href="https://twitter.com/mitsuhiko">Armin Ronacher</a>
|
||||
|
||||
on Dec 23, 2015
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div class="blog-snippet">
|
||||
<h2><a href="2015/12/hello-lektor/">Hello Lektor!</a></h2>
|
||||
<p class="summary">
|
||||
Welcome to Lektor, the static content management system that introduces a
|
||||
new paradigm for developing beautiful websites.
|
||||
<a class="more" href="2015/12/hello-lektor/">Read more …</a>
|
||||
<p class="meta">
|
||||
by
|
||||
|
||||
<a href="https://twitter.com/mitsuhiko">Armin Ronacher</a>
|
||||
|
||||
on Dec 21, 2015
|
||||
</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<div class="col-sm-4">
|
||||
<h3>About This Blog</h3>
|
||||
<p>
|
||||
“The Transcript” is the blog about <a href="../">Lektor</a>, a new solution in static content management.
|
||||
<p>
|
||||
Subscribe for the latest news about Lektor as well as content
|
||||
management and web development.
|
||||
<ul>
|
||||
<li><a href="feed.xml">RSS Feed</a></li>
|
||||
<li><a href="https://twitter.com/getlektor">Follow us on Twitter</a></li>
|
||||
</ul>
|
||||
<h3>Missed a Post?</h3>
|
||||
<ul>
|
||||
<li><a href="archives/">Blog Archives</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="bottomsummary">
|
||||
<div class="container">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<footer>
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-sm-4 icon-bar">
|
||||
<a href="https://github.com/lektor/lektor/" title="Lektor on GitHub"
|
||||
><i class="fa fa-github"></i></a>
|
||||
<a href="https://github.com/lektor/lektor/issues/" title="Report Issues for Lektor"
|
||||
><i class="fa fa-bug"></i></a>
|
||||
<a href="https://twitter.com/getlektor" title="Find Lektor on Twitter"
|
||||
><i class="fa fa-twitter"></i></a>
|
||||
<a href="https://gitter.im/lektor/lektor" title="Chat on Gitter"
|
||||
><i class="fa fa-comment"></i></a>
|
||||
<a href="https://github.com/lektor/lektor-website/tree/master/content/blog/contents.lr" title="View source for this page"><i class="fa fa-code"></i></a>
|
||||
</div>
|
||||
<div class="col-sm-8">
|
||||
<a href="../license/">License & Copyright</a> •
|
||||
<a href="../contact/">Contact</a> •
|
||||
Made with <i class="fa fa-fw fa-heart" title="Heart"><span hidden>Heart</span></i> in Carinthia
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
|
||||
<script type=text/javascript src="../static/app.js?h=bb1b933a" charset="utf-8"></script>
|
||||
<script>
|
||||
((window.gitter = {}).chat = {}).options = {
|
||||
room: 'lektor/lektor',
|
||||
activationElement: null
|
||||
};
|
||||
document.write('<button class="js-gitter-toggle-chat-button">Toggle Chat</button>');
|
||||
var dnt = navigator.doNotTrack || window.doNotTrack || navigator.msDoNotTrack;
|
||||
if (dnt != "1" && dnt != "yes") {
|
||||
window.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments)};ga.l=+new Date;
|
||||
ga('create', 'UA-70822533-1', 'auto');
|
||||
ga('set', 'anonymizeIp', true);
|
||||
ga('send', 'pageview');
|
||||
} else {
|
||||
console.debug("Respecting Do-Not-Track, not running analytics.");
|
||||
}
|
||||
</script>
|
||||
<script async src='https://www.google-analytics.com/analytics.js'></script>
|
||||
<script async defer id="github-bjs" src="https://buttons.github.io/buttons.js"></script>
|
||||
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script>
|
||||
<script src="https://sidecar.gitter.im/dist/sidecar.v1.js" async defer></script>
|
||||
</body>
|
||||
</html>
|
After Width: | Height: | Size: 129 KiB |
|
@ -0,0 +1,157 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<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/pygments.css">
|
||||
<link rel="shortcut icon" href="../static/favicon.png?h=fa09bedd">
|
||||
<title>Community | Lektor Static Content Management System</title>
|
||||
</head>
|
||||
<body class="default">
|
||||
<nav class="navbar navbar-inverse navbar-static-top">
|
||||
<div class="container">
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle collapsed"
|
||||
data-toggle="collapse" data-target="#navbar"
|
||||
aria-expanded="false" aria-controls="navbar">
|
||||
<span class="sr-only">Toggle navigation</span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<a class="navbar-brand" href="../">Lektor</a>
|
||||
</div>
|
||||
<div id="navbar" class="collapse navbar-collapse">
|
||||
<ul class="nav navbar-nav">
|
||||
|
||||
<li><a href="../downloads/">Download</a></li>
|
||||
|
||||
<li><a href="../docs/">Documentation</a></li>
|
||||
|
||||
<li><a href="../showcase/">Showcase</a></li>
|
||||
|
||||
<li><a href="../plugins/">Plugins</a></li>
|
||||
|
||||
<li class="active"><a href="./">Community</a></li>
|
||||
|
||||
<li><a href="../blog/">Blog</a></li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<div class="body-wrapper">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="page-banner page-banner-300" style="background-image: url(header.jpg)"></div>
|
||||
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
|
||||
<h1>Community</h1>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="text-block text-block-default">
|
||||
<h3 id="rules-of-engagement">Rules of Engagement</h3><p>Working with Lektor is more fun when you can ask questions to other users.</p>
|
||||
<p>Lektor is so new that there aren't many channels for it yet, but we look forward to growing the community! As projects scale up to involve multiple people it's important to set up rules and expectations about what is acceptable behavior. Lektor wants to be an inclusive and a friendly environment. We want try to mediate between participants to resolve conflict if one arises. As a participant in this community, you should be friendly, welcoming and considerate, and you should be careful and professional with the words you chose in conversation.</p>
|
||||
<p>We're people from different culture and backgrounds, and we know disagreement is a fact of life. Keep technical discussions technical and abstain from making it personal. If you feel like someone overstepped a line, misbehaved or an incident has been mishandled, please reach out to us. Inquiries will be handled with the utmost respect and confidentiality.</p>
|
||||
<p>Here is where you can find other Lektor users:</p>
|
||||
<ul>
|
||||
<li><a href="http://stackoverflow.com/questions/tagged/lektor">Find us on Stack Overflow</a></li>
|
||||
<li><a href="http://stackoverflow.com/questions/ask?tags=lektor">Ask us a question on Stack Overflow</a></li>
|
||||
<li><a href="https://gitter.im/lektor/lektor" class="js-gitter-toggle-chat-button">Chat with us on Gitter</a> (lektor/lektor)</li>
|
||||
<li>Join the IRC Channel <code>#lektor</code> on <code>irc.freenode.net</code><ul>
|
||||
<li><a href="https://botbot.me/freenode/lektor/">Read the channel logs</a></li>
|
||||
<li><a href="https://webchat.freenode.net/?channels=lektor">Join the web chat</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<p>Want to get in contact with us otherwise?</p>
|
||||
<ul>
|
||||
<li><a href="https://twitter.com/getlektor">Reach us via Twitter at @getlektor</a></li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="bottomsummary">
|
||||
<div class="container">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<footer>
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-sm-4 icon-bar">
|
||||
<a href="https://github.com/lektor/lektor/" title="Lektor on GitHub"
|
||||
><i class="fa fa-github"></i></a>
|
||||
<a href="https://github.com/lektor/lektor/issues/" title="Report Issues for Lektor"
|
||||
><i class="fa fa-bug"></i></a>
|
||||
<a href="https://twitter.com/getlektor" title="Find Lektor on Twitter"
|
||||
><i class="fa fa-twitter"></i></a>
|
||||
<a href="https://gitter.im/lektor/lektor" title="Chat on Gitter"
|
||||
><i class="fa fa-comment"></i></a>
|
||||
<a href="https://github.com/lektor/lektor-website/tree/master/content/community/contents.lr" title="View source for this page"><i class="fa fa-code"></i></a>
|
||||
</div>
|
||||
<div class="col-sm-8">
|
||||
<a href="../license/">License & Copyright</a> •
|
||||
<a href="../contact/">Contact</a> •
|
||||
Made with <i class="fa fa-fw fa-heart" title="Heart"><span hidden>Heart</span></i> in Carinthia
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
|
||||
<script type=text/javascript src="../static/app.js?h=bb1b933a" charset="utf-8"></script>
|
||||
<script>
|
||||
((window.gitter = {}).chat = {}).options = {
|
||||
room: 'lektor/lektor',
|
||||
activationElement: null
|
||||
};
|
||||
document.write('<button class="js-gitter-toggle-chat-button">Toggle Chat</button>');
|
||||
var dnt = navigator.doNotTrack || window.doNotTrack || navigator.msDoNotTrack;
|
||||
if (dnt != "1" && dnt != "yes") {
|
||||
window.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments)};ga.l=+new Date;
|
||||
ga('create', 'UA-70822533-1', 'auto');
|
||||
ga('set', 'anonymizeIp', true);
|
||||
ga('send', 'pageview');
|
||||
} else {
|
||||
console.debug("Respecting Do-Not-Track, not running analytics.");
|
||||
}
|
||||
</script>
|
||||
<script async src='https://www.google-analytics.com/analytics.js'></script>
|
||||
<script async defer id="github-bjs" src="https://buttons.github.io/buttons.js"></script>
|
||||
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script>
|
||||
<script src="https://sidecar.gitter.im/dist/sidecar.v1.js" async defer></script>
|
||||
</body>
|
||||
</html>
|
After Width: | Height: | Size: 175 KiB |
|
@ -0,0 +1,147 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<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/pygments.css">
|
||||
<link rel="shortcut icon" href="../static/favicon.png?h=fa09bedd">
|
||||
<title>Contact | Lektor Static Content Management System</title>
|
||||
</head>
|
||||
<body class="default">
|
||||
<nav class="navbar navbar-inverse navbar-static-top">
|
||||
<div class="container">
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle collapsed"
|
||||
data-toggle="collapse" data-target="#navbar"
|
||||
aria-expanded="false" aria-controls="navbar">
|
||||
<span class="sr-only">Toggle navigation</span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<a class="navbar-brand" href="../">Lektor</a>
|
||||
</div>
|
||||
<div id="navbar" class="collapse navbar-collapse">
|
||||
<ul class="nav navbar-nav">
|
||||
|
||||
<li><a href="../downloads/">Download</a></li>
|
||||
|
||||
<li><a href="../docs/">Documentation</a></li>
|
||||
|
||||
<li><a href="../showcase/">Showcase</a></li>
|
||||
|
||||
<li><a href="../plugins/">Plugins</a></li>
|
||||
|
||||
<li><a href="../community/">Community</a></li>
|
||||
|
||||
<li><a href="../blog/">Blog</a></li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<div class="body-wrapper">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="page-banner page-banner-300" style="background-image: url(header.jpg)"></div>
|
||||
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
|
||||
<h1>Contact</h1>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="text-block text-block-default">
|
||||
<p>Lektor is an Open Source project licensed under the <a href="../license/">three clause BSD
|
||||
license</a>. For detailed copyright and license information
|
||||
see <a href="../license/">License & Copyright</a>.</p>
|
||||
<h2 id="imprint">Imprint</h2><p>Armin Ronacher<br>
|
||||
Khünburg, 86<br>
|
||||
9620 Hermagor; Austria</p>
|
||||
<p>VAT number / UID: AT U68598289<br>
|
||||
E-Mail: <a href="mailto:armin@ronacher.eu">armin@ronacher.eu</a></p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="bottomsummary">
|
||||
<div class="container">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<footer>
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-sm-4 icon-bar">
|
||||
<a href="https://github.com/lektor/lektor/" title="Lektor on GitHub"
|
||||
><i class="fa fa-github"></i></a>
|
||||
<a href="https://github.com/lektor/lektor/issues/" title="Report Issues for Lektor"
|
||||
><i class="fa fa-bug"></i></a>
|
||||
<a href="https://twitter.com/getlektor" title="Find Lektor on Twitter"
|
||||
><i class="fa fa-twitter"></i></a>
|
||||
<a href="https://gitter.im/lektor/lektor" title="Chat on Gitter"
|
||||
><i class="fa fa-comment"></i></a>
|
||||
<a href="https://github.com/lektor/lektor-website/tree/master/content/contact/contents.lr" title="View source for this page"><i class="fa fa-code"></i></a>
|
||||
</div>
|
||||
<div class="col-sm-8">
|
||||
<a href="../license/">License & Copyright</a> •
|
||||
<a href="./">Contact</a> •
|
||||
Made with <i class="fa fa-fw fa-heart" title="Heart"><span hidden>Heart</span></i> in Carinthia
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
|
||||
<script type=text/javascript src="../static/app.js?h=bb1b933a" charset="utf-8"></script>
|
||||
<script>
|
||||
((window.gitter = {}).chat = {}).options = {
|
||||
room: 'lektor/lektor',
|
||||
activationElement: null
|
||||
};
|
||||
document.write('<button class="js-gitter-toggle-chat-button">Toggle Chat</button>');
|
||||
var dnt = navigator.doNotTrack || window.doNotTrack || navigator.msDoNotTrack;
|
||||
if (dnt != "1" && dnt != "yes") {
|
||||
window.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments)};ga.l=+new Date;
|
||||
ga('create', 'UA-70822533-1', 'auto');
|
||||
ga('set', 'anonymizeIp', true);
|
||||
ga('send', 'pageview');
|
||||
} else {
|
||||
console.debug("Respecting Do-Not-Track, not running analytics.");
|
||||
}
|
||||
</script>
|
||||
<script async src='https://www.google-analytics.com/analytics.js'></script>
|
||||
<script async defer id="github-bjs" src="https://buttons.github.io/buttons.js"></script>
|
||||
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script>
|
||||
<script src="https://sidecar.gitter.im/dist/sidecar.v1.js" async defer></script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,275 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<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/pygments.css">
|
||||
<link rel="shortcut icon" href="../../../../../static/favicon.png?h=fa09bedd">
|
||||
<title>artifact_name | Documentation | Lektor Static Content Management System</title>
|
||||
</head>
|
||||
<body class="default">
|
||||
<nav class="navbar navbar-inverse navbar-static-top">
|
||||
<div class="container">
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle collapsed"
|
||||
data-toggle="collapse" data-target="#navbar"
|
||||
aria-expanded="false" aria-controls="navbar">
|
||||
<span class="sr-only">Toggle navigation</span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<a class="navbar-brand" href="../../../../../">Lektor</a>
|
||||
</div>
|
||||
<div id="navbar" class="collapse navbar-collapse">
|
||||
<ul class="nav navbar-nav">
|
||||
|
||||
<li><a href="../../../../../downloads/">Download</a></li>
|
||||
|
||||
<li class="active"><a href="../../../../">Documentation</a></li>
|
||||
|
||||
<li><a href="../../../../../showcase/">Showcase</a></li>
|
||||
|
||||
<li><a href="../../../../../plugins/">Plugins</a></li>
|
||||
|
||||
<li><a href="../../../../../community/">Community</a></li>
|
||||
|
||||
<li><a href="../../../../../blog/">Blog</a></li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<div class="body-wrapper">
|
||||
|
||||
<div class="container">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-3">
|
||||
<ul class="tree-nav nocontent">
|
||||
<li><a href="../../../../">Welcome</a></li>
|
||||
|
||||
|
||||
<li><a href="../../../../what/">What is Lektor</a>
|
||||
|
||||
|
||||
<li><a href="../../../../installation/">Installation</a>
|
||||
|
||||
|
||||
<li><a href="../../../../quickstart/">Quickstart</a>
|
||||
|
||||
|
||||
<li><a href="../../../../project/">Project</a>
|
||||
|
||||
|
||||
<li><a href="../../../../content/">Content</a>
|
||||
|
||||
|
||||
<li><a href="../../../../templates/">Templates</a>
|
||||
|
||||
|
||||
<li><a href="../../../../themes/">Themes</a>
|
||||
|
||||
|
||||
<li><a href="../../../../guides/">Guides</a>
|
||||
|
||||
|
||||
<li><a href="../../../../deployment/">Deployment</a>
|
||||
|
||||
|
||||
<li><a href="../../../../plugins/">Plugins</a>
|
||||
|
||||
|
||||
<li><a href="../../../../models/">Data Modelling</a>
|
||||
|
||||
|
||||
<li><a href="../../../../cli/">Command Line</a>
|
||||
|
||||
|
||||
<li><a href="../../../">API</a>
|
||||
|
||||
<ul>
|
||||
<li><a href="../../">Build System</a>
|
||||
|
||||
<ul>
|
||||
<li><a href="../">Artifact</a>
|
||||
|
||||
<ul>
|
||||
<li class="active"><a href="./">artifact_name</a>
|
||||
|
||||
<ul></ul>
|
||||
|
||||
|
||||
<li><a href="../is-current/">is_current</a>
|
||||
|
||||
|
||||
<li><a href="../open/">open()</a>
|
||||
|
||||
|
||||
<li><a href="../render-template-into/">render_template_into()</a>
|
||||
|
||||
|
||||
<li><a href="../replace-with-file/">replace_with_file()</a>
|
||||
|
||||
|
||||
<li><a href="../source-obj/">source_obj</a>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<li><a href="../../program/">BuildProgram</a>
|
||||
|
||||
|
||||
<li><a href="../../context/">Context</a>
|
||||
|
||||
|
||||
<li><a href="../../get-ctx/">get_ctx()</a>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<li><a href="../../../databags/">Databags</a>
|
||||
|
||||
|
||||
<li><a href="../../../db/">Database</a>
|
||||
|
||||
|
||||
<li><a href="../../../environment/">Environment</a>
|
||||
|
||||
|
||||
<li><a href="../../../plugins/">Plugins</a>
|
||||
|
||||
|
||||
<li><a href="../../../project/">Project</a>
|
||||
|
||||
|
||||
<li><a href="../../../publisher/">Publisher</a>
|
||||
|
||||
|
||||
<li><a href="../../../templates/">Template API</a>
|
||||
|
||||
|
||||
<li><a href="../../../utils/">Utilities</a>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<li><a href="../../../../search/">Search</a>
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-sm-9 doc-styling">
|
||||
|
||||
|
||||
<h1><i class="glyphicon glyphicon-info-sign"></i> <code class="obj">artifact_name</code></h1>
|
||||
|
||||
|
||||
|
||||
<ul class=page-meta>
|
||||
|
||||
<li>Property of <a href="../">Artifact</a></li>
|
||||
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
<p>This property just returns the artifact name. This is mostly useful for
|
||||
debugging purposes as in the majority of situations you already have
|
||||
the artifact name from different sources.</p>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="comment-box">
|
||||
<h2>Comments</h2>
|
||||
|
||||
<div id="disqus_thread"></div>
|
||||
<script>
|
||||
var disqus_config = function() { this.page.identifier = "/docs/api/build/artifact/artifact-name"; this.page.url = "https://www.getlektor.com/docs/api/build/artifact/artifact-name/"; };
|
||||
(function() {
|
||||
var d = document, s = d.createElement('script');
|
||||
s.src = '//lektordocumentation.disqus.com/embed.js';
|
||||
s.setAttribute('data-timestamp', +new Date());
|
||||
(d.head || d.body).appendChild(s);
|
||||
})();
|
||||
</script>
|
||||
<noscript>
|
||||
Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript"
|
||||
rel="nofollow">comments powered by Disqus.</a>
|
||||
</noscript>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="bottomsummary">
|
||||
<div class="container">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<footer>
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-sm-4 icon-bar">
|
||||
<a href="https://github.com/lektor/lektor/" title="Lektor on GitHub"
|
||||
><i class="fa fa-github"></i></a>
|
||||
<a href="https://github.com/lektor/lektor/issues/" title="Report Issues for Lektor"
|
||||
><i class="fa fa-bug"></i></a>
|
||||
<a href="https://twitter.com/getlektor" title="Find Lektor on Twitter"
|
||||
><i class="fa fa-twitter"></i></a>
|
||||
<a href="https://gitter.im/lektor/lektor" title="Chat on Gitter"
|
||||
><i class="fa fa-comment"></i></a>
|
||||
<a href="https://github.com/lektor/lektor-website/tree/master/content/docs/api/build/artifact/artifact-name/contents.lr" title="View source for this page"><i class="fa fa-code"></i></a>
|
||||
</div>
|
||||
<div class="col-sm-8">
|
||||
<a href="../../../../../license/">License & Copyright</a> •
|
||||
<a href="../../../../../contact/">Contact</a> •
|
||||
Made with <i class="fa fa-fw fa-heart" title="Heart"><span hidden>Heart</span></i> in Carinthia
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
|
||||
<script type=text/javascript src="../../../../../static/app.js?h=bb1b933a" charset="utf-8"></script>
|
||||
<script>
|
||||
((window.gitter = {}).chat = {}).options = {
|
||||
room: 'lektor/lektor',
|
||||
activationElement: null
|
||||
};
|
||||
document.write('<button class="js-gitter-toggle-chat-button">Toggle Chat</button>');
|
||||
var dnt = navigator.doNotTrack || window.doNotTrack || navigator.msDoNotTrack;
|
||||
if (dnt != "1" && dnt != "yes") {
|
||||
window.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments)};ga.l=+new Date;
|
||||
ga('create', 'UA-70822533-1', 'auto');
|
||||
ga('set', 'anonymizeIp', true);
|
||||
ga('send', 'pageview');
|
||||
} else {
|
||||
console.debug("Respecting Do-Not-Track, not running analytics.");
|
||||
}
|
||||
</script>
|
||||
<script async src='https://www.google-analytics.com/analytics.js'></script>
|
||||
<script async defer id="github-bjs" src="https://buttons.github.io/buttons.js"></script>
|
||||
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script>
|
||||
<script src="https://sidecar.gitter.im/dist/sidecar.v1.js" async defer></script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,370 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<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/pygments.css">
|
||||
<link rel="shortcut icon" href="../../../../static/favicon.png?h=fa09bedd">
|
||||
<title>Artifact | Documentation | Lektor Static Content Management System</title>
|
||||
</head>
|
||||
<body class="default">
|
||||
<nav class="navbar navbar-inverse navbar-static-top">
|
||||
<div class="container">
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle collapsed"
|
||||
data-toggle="collapse" data-target="#navbar"
|
||||
aria-expanded="false" aria-controls="navbar">
|
||||
<span class="sr-only">Toggle navigation</span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<a class="navbar-brand" href="../../../../">Lektor</a>
|
||||
</div>
|
||||
<div id="navbar" class="collapse navbar-collapse">
|
||||
<ul class="nav navbar-nav">
|
||||
|
||||
<li><a href="../../../../downloads/">Download</a></li>
|
||||
|
||||
<li class="active"><a href="../../../">Documentation</a></li>
|
||||
|
||||
<li><a href="../../../../showcase/">Showcase</a></li>
|
||||
|
||||
<li><a href="../../../../plugins/">Plugins</a></li>
|
||||
|
||||
<li><a href="../../../../community/">Community</a></li>
|
||||
|
||||
<li><a href="../../../../blog/">Blog</a></li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<div class="body-wrapper">
|
||||
|
||||
<div class="container">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-3">
|
||||
<ul class="tree-nav nocontent">
|
||||
<li><a href="../../../">Welcome</a></li>
|
||||
|
||||
|
||||
<li><a href="../../../what/">What is Lektor</a>
|
||||
|
||||
|
||||
<li><a href="../../../installation/">Installation</a>
|
||||
|
||||
|
||||
<li><a href="../../../quickstart/">Quickstart</a>
|
||||
|
||||
|
||||
<li><a href="../../../project/">Project</a>
|
||||
|
||||
|
||||
<li><a href="../../../content/">Content</a>
|
||||
|
||||
|
||||
<li><a href="../../../templates/">Templates</a>
|
||||
|
||||
|
||||
<li><a href="../../../themes/">Themes</a>
|
||||
|
||||
|
||||
<li><a href="../../../guides/">Guides</a>
|
||||
|
||||
|
||||
<li><a href="../../../deployment/">Deployment</a>
|
||||
|
||||
|
||||
<li><a href="../../../plugins/">Plugins</a>
|
||||
|
||||
|
||||
<li><a href="../../../models/">Data Modelling</a>
|
||||
|
||||
|
||||
<li><a href="../../../cli/">Command Line</a>
|
||||
|
||||
|
||||
<li><a href="../../">API</a>
|
||||
|
||||
<ul>
|
||||
<li><a href="../">Build System</a>
|
||||
|
||||
<ul>
|
||||
<li class="active"><a href="./">Artifact</a>
|
||||
|
||||
<ul>
|
||||
<li><a href="artifact-name/">artifact_name</a>
|
||||
|
||||
|
||||
<li><a href="is-current/">is_current</a>
|
||||
|
||||
|
||||
<li><a href="open/">open()</a>
|
||||
|
||||
|
||||
<li><a href="render-template-into/">render_template_into()</a>
|
||||
|
||||
|
||||
<li><a href="replace-with-file/">replace_with_file()</a>
|
||||
|
||||
|
||||
<li><a href="source-obj/">source_obj</a>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<li><a href="../program/">BuildProgram</a>
|
||||
|
||||
|
||||
<li><a href="../context/">Context</a>
|
||||
|
||||
|
||||
<li><a href="../get-ctx/">get_ctx()</a>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<li><a href="../../databags/">Databags</a>
|
||||
|
||||
|
||||
<li><a href="../../db/">Database</a>
|
||||
|
||||
|
||||
<li><a href="../../environment/">Environment</a>
|
||||
|
||||
|
||||
<li><a href="../../plugins/">Plugins</a>
|
||||
|
||||
|
||||
<li><a href="../../project/">Project</a>
|
||||
|
||||
|
||||
<li><a href="../../publisher/">Publisher</a>
|
||||
|
||||
|
||||
<li><a href="../../templates/">Template API</a>
|
||||
|
||||
|
||||
<li><a href="../../utils/">Utilities</a>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<li><a href="../../../search/">Search</a>
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<div class="visible-md-block visible-lg-block">
|
||||
<h4>This Page</h4>
|
||||
<ul class="toc">
|
||||
|
||||
<li><a href="#example">Example</a></li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-sm-9 doc-styling">
|
||||
|
||||
|
||||
<h1><i class="glyphicon glyphicon-leaf"></i> <code class="mod">lektor.builder.</code><code class="obj">Artifact</code></h1>
|
||||
|
||||
|
||||
|
||||
<ul class=page-meta>
|
||||
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
<p>During the build process Lektor creates artifact objects to represent final
|
||||
build artifacts. Generally each <a href="../../db/obj/" class="ref">Source Object</a> will
|
||||
generate one artifact for which it acts as a primary source.</p>
|
||||
<p>There are however many cases in which a source object will create
|
||||
sub-artifacts. For instance any thumbnail created in the context of a page
|
||||
will be creating its own artifact. To give plugins the same ability the
|
||||
artifact system is partially documented. See also <a href="../context/sub-artifact/" class="ref">sub_artifact</a> to see how to create your own artifact
|
||||
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>
|
||||
<span class="nd">@ctx</span><span class="o">.</span><span class="n">sub_artifact</span><span class="p">(</span><span class="s1">'artifact.txt'</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">'w'</span><span class="p">)</span> <span class="k">as</span> <span class="n">f</span><span class="p">:</span>
|
||||
<span class="n">f</span><span class="o">.</span><span class="n">write</span><span class="p">(</span><span class="s1">'Hello World!</span><span class="se">\n</span><span class="s1">'</span><span class="p">)</span>
|
||||
</pre></div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="child-pages nocontent">
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-6 child">
|
||||
<h4>
|
||||
<i class="glyphicon glyphicon-info-sign"></i>
|
||||
<a href="artifact-name/">artifact_name</a>
|
||||
</h4>
|
||||
|
||||
<p class="summary">The name of the artifact</p>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-md-6 child">
|
||||
<h4>
|
||||
<i class="glyphicon glyphicon-info-sign"></i>
|
||||
<a href="is-current/">is_current</a>
|
||||
</h4>
|
||||
|
||||
<p class="summary">Indicates if the artifact is up to date or needs building.</p>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-6 child">
|
||||
<h4>
|
||||
<i class="glyphicon glyphicon-cog"></i>
|
||||
<a href="open/">open()</a>
|
||||
</h4>
|
||||
|
||||
<p class="summary">Can open the artifact for reading or writing.</p>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-md-6 child">
|
||||
<h4>
|
||||
<i class="glyphicon glyphicon-cog"></i>
|
||||
<a href="render-template-into/">render_template_into()</a>
|
||||
</h4>
|
||||
|
||||
<p class="summary">Renders a template into the artifact.</p>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-6 child">
|
||||
<h4>
|
||||
<i class="glyphicon glyphicon-cog"></i>
|
||||
<a href="replace-with-file/">replace_with_file()</a>
|
||||
</h4>
|
||||
|
||||
<p class="summary">Replaces the artifact with a file from the file system.</p>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-md-6 child">
|
||||
<h4>
|
||||
<i class="glyphicon glyphicon-info-sign"></i>
|
||||
<a href="source-obj/">source_obj</a>
|
||||
</h4>
|
||||
|
||||
<p class="summary">A reference to the source object if available.</p>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="comment-box">
|
||||
<h2>Comments</h2>
|
||||
|
||||
<div id="disqus_thread"></div>
|
||||
<script>
|
||||
var disqus_config = function() { this.page.identifier = "/docs/api/build/artifact"; this.page.url = "https://www.getlektor.com/docs/api/build/artifact/"; };
|
||||
(function() {
|
||||
var d = document, s = d.createElement('script');
|
||||
s.src = '//lektordocumentation.disqus.com/embed.js';
|
||||
s.setAttribute('data-timestamp', +new Date());
|
||||
(d.head || d.body).appendChild(s);
|
||||
})();
|
||||
</script>
|
||||
<noscript>
|
||||
Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript"
|
||||
rel="nofollow">comments powered by Disqus.</a>
|
||||
</noscript>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="bottomsummary">
|
||||
<div class="container">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<footer>
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-sm-4 icon-bar">
|
||||
<a href="https://github.com/lektor/lektor/" title="Lektor on GitHub"
|
||||
><i class="fa fa-github"></i></a>
|
||||
<a href="https://github.com/lektor/lektor/issues/" title="Report Issues for Lektor"
|
||||
><i class="fa fa-bug"></i></a>
|
||||
<a href="https://twitter.com/getlektor" title="Find Lektor on Twitter"
|
||||
><i class="fa fa-twitter"></i></a>
|
||||
<a href="https://gitter.im/lektor/lektor" title="Chat on Gitter"
|
||||
><i class="fa fa-comment"></i></a>
|
||||
<a href="https://github.com/lektor/lektor-website/tree/master/content/docs/api/build/artifact/contents.lr" title="View source for this page"><i class="fa fa-code"></i></a>
|
||||
</div>
|
||||
<div class="col-sm-8">
|
||||
<a href="../../../../license/">License & Copyright</a> •
|
||||
<a href="../../../../contact/">Contact</a> •
|
||||
Made with <i class="fa fa-fw fa-heart" title="Heart"><span hidden>Heart</span></i> in Carinthia
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
|
||||
<script type=text/javascript src="../../../../static/app.js?h=bb1b933a" charset="utf-8"></script>
|
||||
<script>
|
||||
((window.gitter = {}).chat = {}).options = {
|
||||
room: 'lektor/lektor',
|
||||
activationElement: null
|
||||
};
|
||||
document.write('<button class="js-gitter-toggle-chat-button">Toggle Chat</button>');
|
||||
var dnt = navigator.doNotTrack || window.doNotTrack || navigator.msDoNotTrack;
|
||||
if (dnt != "1" && dnt != "yes") {
|
||||
window.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments)};ga.l=+new Date;
|
||||
ga('create', 'UA-70822533-1', 'auto');
|
||||
ga('set', 'anonymizeIp', true);
|
||||
ga('send', 'pageview');
|
||||
} else {
|
||||
console.debug("Respecting Do-Not-Track, not running analytics.");
|
||||
}
|
||||
</script>
|
||||
<script async src='https://www.google-analytics.com/analytics.js'></script>
|
||||
<script async defer id="github-bjs" src="https://buttons.github.io/buttons.js"></script>
|
||||
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script>
|
||||
<script src="https://sidecar.gitter.im/dist/sidecar.v1.js" async defer></script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,276 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<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/pygments.css">
|
||||
<link rel="shortcut icon" href="../../../../../static/favicon.png?h=fa09bedd">
|
||||
<title>is_current | Documentation | Lektor Static Content Management System</title>
|
||||
</head>
|
||||
<body class="default">
|
||||
<nav class="navbar navbar-inverse navbar-static-top">
|
||||
<div class="container">
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle collapsed"
|
||||
data-toggle="collapse" data-target="#navbar"
|
||||
aria-expanded="false" aria-controls="navbar">
|
||||
<span class="sr-only">Toggle navigation</span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<a class="navbar-brand" href="../../../../../">Lektor</a>
|
||||
</div>
|
||||
<div id="navbar" class="collapse navbar-collapse">
|
||||
<ul class="nav navbar-nav">
|
||||
|
||||
<li><a href="../../../../../downloads/">Download</a></li>
|
||||
|
||||
<li class="active"><a href="../../../../">Documentation</a></li>
|
||||
|
||||
<li><a href="../../../../../showcase/">Showcase</a></li>
|
||||
|
||||
<li><a href="../../../../../plugins/">Plugins</a></li>
|
||||
|
||||
<li><a href="../../../../../community/">Community</a></li>
|
||||
|
||||
<li><a href="../../../../../blog/">Blog</a></li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<div class="body-wrapper">
|
||||
|
||||
<div class="container">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-3">
|
||||
<ul class="tree-nav nocontent">
|
||||
<li><a href="../../../../">Welcome</a></li>
|
||||
|
||||
|
||||
<li><a href="../../../../what/">What is Lektor</a>
|
||||
|
||||
|
||||
<li><a href="../../../../installation/">Installation</a>
|
||||
|
||||
|
||||
<li><a href="../../../../quickstart/">Quickstart</a>
|
||||
|
||||
|
||||
<li><a href="../../../../project/">Project</a>
|
||||
|
||||
|
||||
<li><a href="../../../../content/">Content</a>
|
||||
|
||||
|
||||
<li><a href="../../../../templates/">Templates</a>
|
||||
|
||||
|
||||
<li><a href="../../../../themes/">Themes</a>
|
||||
|
||||
|
||||
<li><a href="../../../../guides/">Guides</a>
|
||||
|
||||
|
||||
<li><a href="../../../../deployment/">Deployment</a>
|
||||
|
||||
|
||||
<li><a href="../../../../plugins/">Plugins</a>
|
||||
|
||||
|
||||
<li><a href="../../../../models/">Data Modelling</a>
|
||||
|
||||
|
||||
<li><a href="../../../../cli/">Command Line</a>
|
||||
|
||||
|
||||
<li><a href="../../../">API</a>
|
||||
|
||||
<ul>
|
||||
<li><a href="../../">Build System</a>
|
||||
|
||||
<ul>
|
||||
<li><a href="../">Artifact</a>
|
||||
|
||||
<ul>
|
||||
<li><a href="../artifact-name/">artifact_name</a>
|
||||
|
||||
|
||||
<li class="active"><a href="./">is_current</a>
|
||||
|
||||
<ul></ul>
|
||||
|
||||
|
||||
<li><a href="../open/">open()</a>
|
||||
|
||||
|
||||
<li><a href="../render-template-into/">render_template_into()</a>
|
||||
|
||||
|
||||
<li><a href="../replace-with-file/">replace_with_file()</a>
|
||||
|
||||
|
||||
<li><a href="../source-obj/">source_obj</a>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<li><a href="../../program/">BuildProgram</a>
|
||||
|
||||
|
||||
<li><a href="../../context/">Context</a>
|
||||
|
||||
|
||||
<li><a href="../../get-ctx/">get_ctx()</a>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<li><a href="../../../databags/">Databags</a>
|
||||
|
||||
|
||||
<li><a href="../../../db/">Database</a>
|
||||
|
||||
|
||||
<li><a href="../../../environment/">Environment</a>
|
||||
|
||||
|
||||
<li><a href="../../../plugins/">Plugins</a>
|
||||
|
||||
|
||||
<li><a href="../../../project/">Project</a>
|
||||
|
||||
|
||||
<li><a href="../../../publisher/">Publisher</a>
|
||||
|
||||
|
||||
<li><a href="../../../templates/">Template API</a>
|
||||
|
||||
|
||||
<li><a href="../../../utils/">Utilities</a>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<li><a href="../../../../search/">Search</a>
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-sm-9 doc-styling">
|
||||
|
||||
|
||||
<h1><i class="glyphicon glyphicon-info-sign"></i> <code class="obj">is_current</code></h1>
|
||||
|
||||
|
||||
|
||||
<ul class=page-meta>
|
||||
|
||||
<li>Property of <a href="../">Artifact</a></li>
|
||||
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
<p>This property on an artifact returns <code>True</code> if building is necessary or
|
||||
<code>False</code> if not based on the state of all dependencies. When you are using
|
||||
the sub-artifact system, the builder callback will only be invoked if the
|
||||
artifact is not current.</p>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="comment-box">
|
||||
<h2>Comments</h2>
|
||||
|
||||
<div id="disqus_thread"></div>
|
||||
<script>
|
||||
var disqus_config = function() { this.page.identifier = "/docs/api/build/artifact/is-current"; this.page.url = "https://www.getlektor.com/docs/api/build/artifact/is-current/"; };
|
||||
(function() {
|
||||
var d = document, s = d.createElement('script');
|
||||
s.src = '//lektordocumentation.disqus.com/embed.js';
|
||||
s.setAttribute('data-timestamp', +new Date());
|
||||
(d.head || d.body).appendChild(s);
|
||||
})();
|
||||
</script>
|
||||
<noscript>
|
||||
Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript"
|
||||
rel="nofollow">comments powered by Disqus.</a>
|
||||
</noscript>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="bottomsummary">
|
||||
<div class="container">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<footer>
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-sm-4 icon-bar">
|
||||
<a href="https://github.com/lektor/lektor/" title="Lektor on GitHub"
|
||||
><i class="fa fa-github"></i></a>
|
||||
<a href="https://github.com/lektor/lektor/issues/" title="Report Issues for Lektor"
|
||||
><i class="fa fa-bug"></i></a>
|
||||
<a href="https://twitter.com/getlektor" title="Find Lektor on Twitter"
|
||||
><i class="fa fa-twitter"></i></a>
|
||||
<a href="https://gitter.im/lektor/lektor" title="Chat on Gitter"
|
||||
><i class="fa fa-comment"></i></a>
|
||||
<a href="https://github.com/lektor/lektor-website/tree/master/content/docs/api/build/artifact/is-current/contents.lr" title="View source for this page"><i class="fa fa-code"></i></a>
|
||||
</div>
|
||||
<div class="col-sm-8">
|
||||
<a href="../../../../../license/">License & Copyright</a> •
|
||||
<a href="../../../../../contact/">Contact</a> •
|
||||
Made with <i class="fa fa-fw fa-heart" title="Heart"><span hidden>Heart</span></i> in Carinthia
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
|
||||
<script type=text/javascript src="../../../../../static/app.js?h=bb1b933a" charset="utf-8"></script>
|
||||
<script>
|
||||
((window.gitter = {}).chat = {}).options = {
|
||||
room: 'lektor/lektor',
|
||||
activationElement: null
|
||||
};
|
||||
document.write('<button class="js-gitter-toggle-chat-button">Toggle Chat</button>');
|
||||
var dnt = navigator.doNotTrack || window.doNotTrack || navigator.msDoNotTrack;
|
||||
if (dnt != "1" && dnt != "yes") {
|
||||
window.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments)};ga.l=+new Date;
|
||||
ga('create', 'UA-70822533-1', 'auto');
|
||||
ga('set', 'anonymizeIp', true);
|
||||
ga('send', 'pageview');
|
||||
} else {
|
||||
console.debug("Respecting Do-Not-Track, not running analytics.");
|
||||
}
|
||||
</script>
|
||||
<script async src='https://www.google-analytics.com/analytics.js'></script>
|
||||
<script async defer id="github-bjs" src="https://buttons.github.io/buttons.js"></script>
|
||||
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script>
|
||||
<script src="https://sidecar.gitter.im/dist/sidecar.v1.js" async defer></script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,294 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<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/pygments.css">
|
||||
<link rel="shortcut icon" href="../../../../../static/favicon.png?h=fa09bedd">
|
||||
<title>open | Documentation | Lektor Static Content Management System</title>
|
||||
</head>
|
||||
<body class="default">
|
||||
<nav class="navbar navbar-inverse navbar-static-top">
|
||||
<div class="container">
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle collapsed"
|
||||
data-toggle="collapse" data-target="#navbar"
|
||||
aria-expanded="false" aria-controls="navbar">
|
||||
<span class="sr-only">Toggle navigation</span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<a class="navbar-brand" href="../../../../../">Lektor</a>
|
||||
</div>
|
||||
<div id="navbar" class="collapse navbar-collapse">
|
||||
<ul class="nav navbar-nav">
|
||||
|
||||
<li><a href="../../../../../downloads/">Download</a></li>
|
||||
|
||||
<li class="active"><a href="../../../../">Documentation</a></li>
|
||||
|
||||
<li><a href="../../../../../showcase/">Showcase</a></li>
|
||||
|
||||
<li><a href="../../../../../plugins/">Plugins</a></li>
|
||||
|
||||
<li><a href="../../../../../community/">Community</a></li>
|
||||
|
||||
<li><a href="../../../../../blog/">Blog</a></li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<div class="body-wrapper">
|
||||
|
||||
<div class="container">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-3">
|
||||
<ul class="tree-nav nocontent">
|
||||
<li><a href="../../../../">Welcome</a></li>
|
||||
|
||||
|
||||
<li><a href="../../../../what/">What is Lektor</a>
|
||||
|
||||
|
||||
<li><a href="../../../../installation/">Installation</a>
|
||||
|
||||
|
||||
<li><a href="../../../../quickstart/">Quickstart</a>
|
||||
|
||||
|
||||
<li><a href="../../../../project/">Project</a>
|
||||
|
||||
|
||||
<li><a href="../../../../content/">Content</a>
|
||||
|
||||
|
||||
<li><a href="../../../../templates/">Templates</a>
|
||||
|
||||
|
||||
<li><a href="../../../../themes/">Themes</a>
|
||||
|
||||
|
||||
<li><a href="../../../../guides/">Guides</a>
|
||||
|
||||
|
||||
<li><a href="../../../../deployment/">Deployment</a>
|
||||
|
||||
|
||||
<li><a href="../../../../plugins/">Plugins</a>
|
||||
|
||||
|
||||
<li><a href="../../../../models/">Data Modelling</a>
|
||||
|
||||
|
||||
<li><a href="../../../../cli/">Command Line</a>
|
||||
|
||||
|
||||
<li><a href="../../../">API</a>
|
||||
|
||||
<ul>
|
||||
<li><a href="../../">Build System</a>
|
||||
|
||||
<ul>
|
||||
<li><a href="../">Artifact</a>
|
||||
|
||||
<ul>
|
||||
<li><a href="../artifact-name/">artifact_name</a>
|
||||
|
||||
|
||||
<li><a href="../is-current/">is_current</a>
|
||||
|
||||
|
||||
<li class="active"><a href="./">open()</a>
|
||||
|
||||
<ul></ul>
|
||||
|
||||
|
||||
<li><a href="../render-template-into/">render_template_into()</a>
|
||||
|
||||
|
||||
<li><a href="../replace-with-file/">replace_with_file()</a>
|
||||
|
||||
|
||||
<li><a href="../source-obj/">source_obj</a>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<li><a href="../../program/">BuildProgram</a>
|
||||
|
||||
|
||||
<li><a href="../../context/">Context</a>
|
||||
|
||||
|
||||
<li><a href="../../get-ctx/">get_ctx()</a>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<li><a href="../../../databags/">Databags</a>
|
||||
|
||||
|
||||
<li><a href="../../../db/">Database</a>
|
||||
|
||||
|
||||
<li><a href="../../../environment/">Environment</a>
|
||||
|
||||
|
||||
<li><a href="../../../plugins/">Plugins</a>
|
||||
|
||||
|
||||
<li><a href="../../../project/">Project</a>
|
||||
|
||||
|
||||
<li><a href="../../../publisher/">Publisher</a>
|
||||
|
||||
|
||||
<li><a href="../../../templates/">Template API</a>
|
||||
|
||||
|
||||
<li><a href="../../../utils/">Utilities</a>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<li><a href="../../../../search/">Search</a>
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<div class="visible-md-block visible-lg-block">
|
||||
<h4>This Page</h4>
|
||||
<ul class="toc">
|
||||
|
||||
<li><a href="#example">Example</a></li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-sm-9 doc-styling">
|
||||
|
||||
|
||||
<h1><i class="glyphicon glyphicon-cog"></i> <code class="obj">open</code> <span class="sig">(<code>mode='rb', ensure_dir=None</code>)</span></h1>
|
||||
|
||||
|
||||
|
||||
<ul class=page-meta>
|
||||
|
||||
<li>Method of <a href="../">Artifact</a></li>
|
||||
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
<p>This opens the artifact for reading or writing. The default behavior is that
|
||||
if the artifact is opened for reading, the directory it's contained within
|
||||
automatically is created. This can be disabled or enabled with the
|
||||
<code>ensure_dir</code> parameter.</p>
|
||||
<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>
|
||||
<span class="nd">@ctx</span><span class="o">.</span><span class="n">sub_artifact</span><span class="p">(</span><span class="s1">'artifact.txt'</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">'w'</span><span class="p">)</span> <span class="k">as</span> <span class="n">f</span><span class="p">:</span>
|
||||
<span class="n">f</span><span class="o">.</span><span class="n">write</span><span class="p">(</span><span class="s1">'Hello World!</span><span class="se">\n</span><span class="s1">'</span><span class="p">)</span>
|
||||
</pre></div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="comment-box">
|
||||
<h2>Comments</h2>
|
||||
|
||||
<div id="disqus_thread"></div>
|
||||
<script>
|
||||
var disqus_config = function() { this.page.identifier = "/docs/api/build/artifact/open"; this.page.url = "https://www.getlektor.com/docs/api/build/artifact/open/"; };
|
||||
(function() {
|
||||
var d = document, s = d.createElement('script');
|
||||
s.src = '//lektordocumentation.disqus.com/embed.js';
|
||||
s.setAttribute('data-timestamp', +new Date());
|
||||
(d.head || d.body).appendChild(s);
|
||||
})();
|
||||
</script>
|
||||
<noscript>
|
||||
Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript"
|
||||
rel="nofollow">comments powered by Disqus.</a>
|
||||
</noscript>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="bottomsummary">
|
||||
<div class="container">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<footer>
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-sm-4 icon-bar">
|
||||
<a href="https://github.com/lektor/lektor/" title="Lektor on GitHub"
|
||||
><i class="fa fa-github"></i></a>
|
||||
<a href="https://github.com/lektor/lektor/issues/" title="Report Issues for Lektor"
|
||||
><i class="fa fa-bug"></i></a>
|
||||
<a href="https://twitter.com/getlektor" title="Find Lektor on Twitter"
|
||||
><i class="fa fa-twitter"></i></a>
|
||||
<a href="https://gitter.im/lektor/lektor" title="Chat on Gitter"
|
||||
><i class="fa fa-comment"></i></a>
|
||||
<a href="https://github.com/lektor/lektor-website/tree/master/content/docs/api/build/artifact/open/contents.lr" title="View source for this page"><i class="fa fa-code"></i></a>
|
||||
</div>
|
||||
<div class="col-sm-8">
|
||||
<a href="../../../../../license/">License & Copyright</a> •
|
||||
<a href="../../../../../contact/">Contact</a> •
|
||||
Made with <i class="fa fa-fw fa-heart" title="Heart"><span hidden>Heart</span></i> in Carinthia
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
|
||||
<script type=text/javascript src="../../../../../static/app.js?h=bb1b933a" charset="utf-8"></script>
|
||||
<script>
|
||||
((window.gitter = {}).chat = {}).options = {
|
||||
room: 'lektor/lektor',
|
||||
activationElement: null
|
||||
};
|
||||
document.write('<button class="js-gitter-toggle-chat-button">Toggle Chat</button>');
|
||||
var dnt = navigator.doNotTrack || window.doNotTrack || navigator.msDoNotTrack;
|
||||
if (dnt != "1" && dnt != "yes") {
|
||||
window.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments)};ga.l=+new Date;
|
||||
ga('create', 'UA-70822533-1', 'auto');
|
||||
ga('set', 'anonymizeIp', true);
|
||||
ga('send', 'pageview');
|
||||
} else {
|
||||
console.debug("Respecting Do-Not-Track, not running analytics.");
|
||||
}
|
||||
</script>
|
||||
<script async src='https://www.google-analytics.com/analytics.js'></script>
|
||||
<script async defer id="github-bjs" src="https://buttons.github.io/buttons.js"></script>
|
||||
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script>
|
||||
<script src="https://sidecar.gitter.im/dist/sidecar.v1.js" async defer></script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,293 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<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/pygments.css">
|
||||
<link rel="shortcut icon" href="../../../../../static/favicon.png?h=fa09bedd">
|
||||
<title>render_template_into | Documentation | Lektor Static Content Management System</title>
|
||||
</head>
|
||||
<body class="default">
|
||||
<nav class="navbar navbar-inverse navbar-static-top">
|
||||
<div class="container">
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle collapsed"
|
||||
data-toggle="collapse" data-target="#navbar"
|
||||
aria-expanded="false" aria-controls="navbar">
|
||||
<span class="sr-only">Toggle navigation</span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<a class="navbar-brand" href="../../../../../">Lektor</a>
|
||||
</div>
|
||||
<div id="navbar" class="collapse navbar-collapse">
|
||||
<ul class="nav navbar-nav">
|
||||
|
||||
<li><a href="../../../../../downloads/">Download</a></li>
|
||||
|
||||
<li class="active"><a href="../../../../">Documentation</a></li>
|
||||
|
||||
<li><a href="../../../../../showcase/">Showcase</a></li>
|
||||
|
||||
<li><a href="../../../../../plugins/">Plugins</a></li>
|
||||
|
||||
<li><a href="../../../../../community/">Community</a></li>
|
||||
|
||||
<li><a href="../../../../../blog/">Blog</a></li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<div class="body-wrapper">
|
||||
|
||||
<div class="container">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-3">
|
||||
<ul class="tree-nav nocontent">
|
||||
<li><a href="../../../../">Welcome</a></li>
|
||||
|
||||
|
||||
<li><a href="../../../../what/">What is Lektor</a>
|
||||
|
||||
|
||||
<li><a href="../../../../installation/">Installation</a>
|
||||
|
||||
|
||||
<li><a href="../../../../quickstart/">Quickstart</a>
|
||||
|
||||
|
||||
<li><a href="../../../../project/">Project</a>
|
||||
|
||||
|
||||
<li><a href="../../../../content/">Content</a>
|
||||
|
||||
|
||||
<li><a href="../../../../templates/">Templates</a>
|
||||
|
||||
|
||||
<li><a href="../../../../themes/">Themes</a>
|
||||
|
||||
|
||||
<li><a href="../../../../guides/">Guides</a>
|
||||
|
||||
|
||||
<li><a href="../../../../deployment/">Deployment</a>
|
||||
|
||||
|
||||
<li><a href="../../../../plugins/">Plugins</a>
|
||||
|
||||
|
||||
<li><a href="../../../../models/">Data Modelling</a>
|
||||
|
||||
|
||||
<li><a href="../../../../cli/">Command Line</a>
|
||||
|
||||
|
||||
<li><a href="../../../">API</a>
|
||||
|
||||
<ul>
|
||||
<li><a href="../../">Build System</a>
|
||||
|
||||
<ul>
|
||||
<li><a href="../">Artifact</a>
|
||||
|
||||
<ul>
|
||||
<li><a href="../artifact-name/">artifact_name</a>
|
||||
|
||||
|
||||
<li><a href="../is-current/">is_current</a>
|
||||
|
||||
|
||||
<li><a href="../open/">open()</a>
|
||||
|
||||
|
||||
<li class="active"><a href="./">render_template_into()</a>
|
||||
|
||||
<ul></ul>
|
||||
|
||||
|
||||
<li><a href="../replace-with-file/">replace_with_file()</a>
|
||||
|
||||
|
||||
<li><a href="../source-obj/">source_obj</a>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<li><a href="../../program/">BuildProgram</a>
|
||||
|
||||
|
||||
<li><a href="../../context/">Context</a>
|
||||
|
||||
|
||||
<li><a href="../../get-ctx/">get_ctx()</a>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<li><a href="../../../databags/">Databags</a>
|
||||
|
||||
|
||||
<li><a href="../../../db/">Database</a>
|
||||
|
||||
|
||||
<li><a href="../../../environment/">Environment</a>
|
||||
|
||||
|
||||
<li><a href="../../../plugins/">Plugins</a>
|
||||
|
||||
|
||||
<li><a href="../../../project/">Project</a>
|
||||
|
||||
|
||||
<li><a href="../../../publisher/">Publisher</a>
|
||||
|
||||
|
||||
<li><a href="../../../templates/">Template API</a>
|
||||
|
||||
|
||||
<li><a href="../../../utils/">Utilities</a>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<li><a href="../../../../search/">Search</a>
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<div class="visible-md-block visible-lg-block">
|
||||
<h4>This Page</h4>
|
||||
<ul class="toc">
|
||||
|
||||
<li><a href="#example">Example</a></li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-sm-9 doc-styling">
|
||||
|
||||
|
||||
<h1><i class="glyphicon glyphicon-cog"></i> <code class="obj">render_template_into</code> <span class="sig">(<code>template_name, this, fail=False, pad=None, this=None, values=None, alt=None</code>)</span></h1>
|
||||
|
||||
|
||||
|
||||
<ul class=page-meta>
|
||||
|
||||
<li>Method of <a href="../">Artifact</a></li>
|
||||
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
<p>This method renders a template into the artifact. The default behavior is to
|
||||
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>
|
||||
<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>
|
||||
<span class="n">artifact</span><span class="o">.</span><span class="n">render_template_into</span><span class="p">(</span>
|
||||
<span class="bp">self</span><span class="o">.</span><span class="n">source</span><span class="p">[</span><span class="s1">'_template'</span><span class="p">],</span> <span class="n">this</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">source</span><span class="p">)</span>
|
||||
</pre></div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="comment-box">
|
||||
<h2>Comments</h2>
|
||||
|
||||
<div id="disqus_thread"></div>
|
||||
<script>
|
||||
var disqus_config = function() { this.page.identifier = "/docs/api/build/artifact/render-template-into"; this.page.url = "https://www.getlektor.com/docs/api/build/artifact/render-template-into/"; };
|
||||
(function() {
|
||||
var d = document, s = d.createElement('script');
|
||||
s.src = '//lektordocumentation.disqus.com/embed.js';
|
||||
s.setAttribute('data-timestamp', +new Date());
|
||||
(d.head || d.body).appendChild(s);
|
||||
})();
|
||||
</script>
|
||||
<noscript>
|
||||
Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript"
|
||||
rel="nofollow">comments powered by Disqus.</a>
|
||||
</noscript>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="bottomsummary">
|
||||
<div class="container">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<footer>
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-sm-4 icon-bar">
|
||||
<a href="https://github.com/lektor/lektor/" title="Lektor on GitHub"
|
||||
><i class="fa fa-github"></i></a>
|
||||
<a href="https://github.com/lektor/lektor/issues/" title="Report Issues for Lektor"
|
||||
><i class="fa fa-bug"></i></a>
|
||||
<a href="https://twitter.com/getlektor" title="Find Lektor on Twitter"
|
||||
><i class="fa fa-twitter"></i></a>
|
||||
<a href="https://gitter.im/lektor/lektor" title="Chat on Gitter"
|
||||
><i class="fa fa-comment"></i></a>
|
||||
<a href="https://github.com/lektor/lektor-website/tree/master/content/docs/api/build/artifact/render-template-into/contents.lr" title="View source for this page"><i class="fa fa-code"></i></a>
|
||||
</div>
|
||||
<div class="col-sm-8">
|
||||
<a href="../../../../../license/">License & Copyright</a> •
|
||||
<a href="../../../../../contact/">Contact</a> •
|
||||
Made with <i class="fa fa-fw fa-heart" title="Heart"><span hidden>Heart</span></i> in Carinthia
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
|
||||
<script type=text/javascript src="../../../../../static/app.js?h=bb1b933a" charset="utf-8"></script>
|
||||
<script>
|
||||
((window.gitter = {}).chat = {}).options = {
|
||||
room: 'lektor/lektor',
|
||||
activationElement: null
|
||||
};
|
||||
document.write('<button class="js-gitter-toggle-chat-button">Toggle Chat</button>');
|
||||
var dnt = navigator.doNotTrack || window.doNotTrack || navigator.msDoNotTrack;
|
||||
if (dnt != "1" && dnt != "yes") {
|
||||
window.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments)};ga.l=+new Date;
|
||||
ga('create', 'UA-70822533-1', 'auto');
|
||||
ga('set', 'anonymizeIp', true);
|
||||
ga('send', 'pageview');
|
||||
} else {
|
||||
console.debug("Respecting Do-Not-Track, not running analytics.");
|
||||
}
|
||||
</script>
|
||||
<script async src='https://www.google-analytics.com/analytics.js'></script>
|
||||
<script async defer id="github-bjs" src="https://buttons.github.io/buttons.js"></script>
|
||||
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script>
|
||||
<script src="https://sidecar.gitter.im/dist/sidecar.v1.js" async defer></script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,291 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<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/pygments.css">
|
||||
<link rel="shortcut icon" href="../../../../../static/favicon.png?h=fa09bedd">
|
||||
<title>replace_with_file | Documentation | Lektor Static Content Management System</title>
|
||||
</head>
|
||||
<body class="default">
|
||||
<nav class="navbar navbar-inverse navbar-static-top">
|
||||
<div class="container">
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle collapsed"
|
||||
data-toggle="collapse" data-target="#navbar"
|
||||
aria-expanded="false" aria-controls="navbar">
|
||||
<span class="sr-only">Toggle navigation</span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<a class="navbar-brand" href="../../../../../">Lektor</a>
|
||||
</div>
|
||||
<div id="navbar" class="collapse navbar-collapse">
|
||||
<ul class="nav navbar-nav">
|
||||
|
||||
<li><a href="../../../../../downloads/">Download</a></li>
|
||||
|
||||
<li class="active"><a href="../../../../">Documentation</a></li>
|
||||
|
||||
<li><a href="../../../../../showcase/">Showcase</a></li>
|
||||
|
||||
<li><a href="../../../../../plugins/">Plugins</a></li>
|
||||
|
||||
<li><a href="../../../../../community/">Community</a></li>
|
||||
|
||||
<li><a href="../../../../../blog/">Blog</a></li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<div class="body-wrapper">
|
||||
|
||||
<div class="container">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-3">
|
||||
<ul class="tree-nav nocontent">
|
||||
<li><a href="../../../../">Welcome</a></li>
|
||||
|
||||
|
||||
<li><a href="../../../../what/">What is Lektor</a>
|
||||
|
||||
|
||||
<li><a href="../../../../installation/">Installation</a>
|
||||
|
||||
|
||||
<li><a href="../../../../quickstart/">Quickstart</a>
|
||||
|
||||
|
||||
<li><a href="../../../../project/">Project</a>
|
||||
|
||||
|
||||
<li><a href="../../../../content/">Content</a>
|
||||
|
||||
|
||||
<li><a href="../../../../templates/">Templates</a>
|
||||
|
||||
|
||||
<li><a href="../../../../themes/">Themes</a>
|
||||
|
||||
|
||||
<li><a href="../../../../guides/">Guides</a>
|
||||
|
||||
|
||||
<li><a href="../../../../deployment/">Deployment</a>
|
||||
|
||||
|
||||
<li><a href="../../../../plugins/">Plugins</a>
|
||||
|
||||
|
||||
<li><a href="../../../../models/">Data Modelling</a>
|
||||
|
||||
|
||||
<li><a href="../../../../cli/">Command Line</a>
|
||||
|
||||
|
||||
<li><a href="../../../">API</a>
|
||||
|
||||
<ul>
|
||||
<li><a href="../../">Build System</a>
|
||||
|
||||
<ul>
|
||||
<li><a href="../">Artifact</a>
|
||||
|
||||
<ul>
|
||||
<li><a href="../artifact-name/">artifact_name</a>
|
||||
|
||||
|
||||
<li><a href="../is-current/">is_current</a>
|
||||
|
||||
|
||||
<li><a href="../open/">open()</a>
|
||||
|
||||
|
||||
<li><a href="../render-template-into/">render_template_into()</a>
|
||||
|
||||
|
||||
<li class="active"><a href="./">replace_with_file()</a>
|
||||
|
||||
<ul></ul>
|
||||
|
||||
|
||||
<li><a href="../source-obj/">source_obj</a>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<li><a href="../../program/">BuildProgram</a>
|
||||
|
||||
|
||||
<li><a href="../../context/">Context</a>
|
||||
|
||||
|
||||
<li><a href="../../get-ctx/">get_ctx()</a>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<li><a href="../../../databags/">Databags</a>
|
||||
|
||||
|
||||
<li><a href="../../../db/">Database</a>
|
||||
|
||||
|
||||
<li><a href="../../../environment/">Environment</a>
|
||||
|
||||
|
||||
<li><a href="../../../plugins/">Plugins</a>
|
||||
|
||||
|
||||
<li><a href="../../../project/">Project</a>
|
||||
|
||||
|
||||
<li><a href="../../../publisher/">Publisher</a>
|
||||
|
||||
|
||||
<li><a href="../../../templates/">Template API</a>
|
||||
|
||||
|
||||
<li><a href="../../../utils/">Utilities</a>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<li><a href="../../../../search/">Search</a>
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<div class="visible-md-block visible-lg-block">
|
||||
<h4>This Page</h4>
|
||||
<ul class="toc">
|
||||
|
||||
<li><a href="#example">Example</a></li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-sm-9 doc-styling">
|
||||
|
||||
|
||||
<h1><i class="glyphicon glyphicon-cog"></i> <code class="obj">replace_with_file</code> <span class="sig">(<code>filename, ensure_dir=None, copy=False</code>)</span></h1>
|
||||
|
||||
|
||||
|
||||
<ul class=page-meta>
|
||||
|
||||
<li>Method of <a href="../">Artifact</a></li>
|
||||
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
<p>This method will replace the artifact with another file on the file system
|
||||
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>
|
||||
<span class="nd">@ctx</span><span class="o">.</span><span class="n">sub_artifact</span><span class="p">(</span><span class="s1">'artifact.txt'</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>
|
||||
<span class="n">artifact</span><span class="o">.</span><span class="n">replace_with_file</span><span class="p">(</span><span class="n">temporary_file</span><span class="p">)</span>
|
||||
</pre></div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="comment-box">
|
||||
<h2>Comments</h2>
|
||||
|
||||
<div id="disqus_thread"></div>
|
||||
<script>
|
||||
var disqus_config = function() { this.page.identifier = "/docs/api/build/artifact/replace-with-file"; this.page.url = "https://www.getlektor.com/docs/api/build/artifact/replace-with-file/"; };
|
||||
(function() {
|
||||
var d = document, s = d.createElement('script');
|
||||
s.src = '//lektordocumentation.disqus.com/embed.js';
|
||||
s.setAttribute('data-timestamp', +new Date());
|
||||
(d.head || d.body).appendChild(s);
|
||||
})();
|
||||
</script>
|
||||
<noscript>
|
||||
Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript"
|
||||
rel="nofollow">comments powered by Disqus.</a>
|
||||
</noscript>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="bottomsummary">
|
||||
<div class="container">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<footer>
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-sm-4 icon-bar">
|
||||
<a href="https://github.com/lektor/lektor/" title="Lektor on GitHub"
|
||||
><i class="fa fa-github"></i></a>
|
||||
<a href="https://github.com/lektor/lektor/issues/" title="Report Issues for Lektor"
|
||||
><i class="fa fa-bug"></i></a>
|
||||
<a href="https://twitter.com/getlektor" title="Find Lektor on Twitter"
|
||||
><i class="fa fa-twitter"></i></a>
|
||||
<a href="https://gitter.im/lektor/lektor" title="Chat on Gitter"
|
||||
><i class="fa fa-comment"></i></a>
|
||||
<a href="https://github.com/lektor/lektor-website/tree/master/content/docs/api/build/artifact/replace-with-file/contents.lr" title="View source for this page"><i class="fa fa-code"></i></a>
|
||||
</div>
|
||||
<div class="col-sm-8">
|
||||
<a href="../../../../../license/">License & Copyright</a> •
|
||||
<a href="../../../../../contact/">Contact</a> •
|
||||
Made with <i class="fa fa-fw fa-heart" title="Heart"><span hidden>Heart</span></i> in Carinthia
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
|
||||
<script type=text/javascript src="../../../../../static/app.js?h=bb1b933a" charset="utf-8"></script>
|
||||
<script>
|
||||
((window.gitter = {}).chat = {}).options = {
|
||||
room: 'lektor/lektor',
|
||||
activationElement: null
|
||||
};
|
||||
document.write('<button class="js-gitter-toggle-chat-button">Toggle Chat</button>');
|
||||
var dnt = navigator.doNotTrack || window.doNotTrack || navigator.msDoNotTrack;
|
||||
if (dnt != "1" && dnt != "yes") {
|
||||
window.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments)};ga.l=+new Date;
|
||||
ga('create', 'UA-70822533-1', 'auto');
|
||||
ga('set', 'anonymizeIp', true);
|
||||
ga('send', 'pageview');
|
||||
} else {
|
||||
console.debug("Respecting Do-Not-Track, not running analytics.");
|
||||
}
|
||||
</script>
|
||||
<script async src='https://www.google-analytics.com/analytics.js'></script>
|
||||
<script async defer id="github-bjs" src="https://buttons.github.io/buttons.js"></script>
|
||||
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script>
|
||||
<script src="https://sidecar.gitter.im/dist/sidecar.v1.js" async defer></script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,276 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<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/pygments.css">
|
||||
<link rel="shortcut icon" href="../../../../../static/favicon.png?h=fa09bedd">
|
||||
<title>source_obj | Documentation | Lektor Static Content Management System</title>
|
||||
</head>
|
||||
<body class="default">
|
||||
<nav class="navbar navbar-inverse navbar-static-top">
|
||||
<div class="container">
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle collapsed"
|
||||
data-toggle="collapse" data-target="#navbar"
|
||||
aria-expanded="false" aria-controls="navbar">
|
||||
<span class="sr-only">Toggle navigation</span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<a class="navbar-brand" href="../../../../../">Lektor</a>
|
||||
</div>
|
||||
<div id="navbar" class="collapse navbar-collapse">
|
||||
<ul class="nav navbar-nav">
|
||||
|
||||
<li><a href="../../../../../downloads/">Download</a></li>
|
||||
|
||||
<li class="active"><a href="../../../../">Documentation</a></li>
|
||||
|
||||
<li><a href="../../../../../showcase/">Showcase</a></li>
|
||||
|
||||
<li><a href="../../../../../plugins/">Plugins</a></li>
|
||||
|
||||
<li><a href="../../../../../community/">Community</a></li>
|
||||
|
||||
<li><a href="../../../../../blog/">Blog</a></li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<div class="body-wrapper">
|
||||
|
||||
<div class="container">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-3">
|
||||
<ul class="tree-nav nocontent">
|
||||
<li><a href="../../../../">Welcome</a></li>
|
||||
|
||||
|
||||
<li><a href="../../../../what/">What is Lektor</a>
|
||||
|
||||
|
||||
<li><a href="../../../../installation/">Installation</a>
|
||||
|
||||
|
||||
<li><a href="../../../../quickstart/">Quickstart</a>
|
||||
|
||||
|
||||
<li><a href="../../../../project/">Project</a>
|
||||
|
||||
|
||||
<li><a href="../../../../content/">Content</a>
|
||||
|
||||
|
||||
<li><a href="../../../../templates/">Templates</a>
|
||||
|
||||
|
||||
<li><a href="../../../../themes/">Themes</a>
|
||||
|
||||
|
||||
<li><a href="../../../../guides/">Guides</a>
|
||||
|
||||
|
||||
<li><a href="../../../../deployment/">Deployment</a>
|
||||
|
||||
|
||||
<li><a href="../../../../plugins/">Plugins</a>
|
||||
|
||||
|
||||
<li><a href="../../../../models/">Data Modelling</a>
|
||||
|
||||
|
||||
<li><a href="../../../../cli/">Command Line</a>
|
||||
|
||||
|
||||
<li><a href="../../../">API</a>
|
||||
|
||||
<ul>
|
||||
<li><a href="../../">Build System</a>
|
||||
|
||||
<ul>
|
||||
<li><a href="../">Artifact</a>
|
||||
|
||||
<ul>
|
||||
<li><a href="../artifact-name/">artifact_name</a>
|
||||
|
||||
|
||||
<li><a href="../is-current/">is_current</a>
|
||||
|
||||
|
||||
<li><a href="../open/">open()</a>
|
||||
|
||||
|
||||
<li><a href="../render-template-into/">render_template_into()</a>
|
||||
|
||||
|
||||
<li><a href="../replace-with-file/">replace_with_file()</a>
|
||||
|
||||
|
||||
<li class="active"><a href="./">source_obj</a>
|
||||
|
||||
<ul></ul>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<li><a href="../../program/">BuildProgram</a>
|
||||
|
||||
|
||||
<li><a href="../../context/">Context</a>
|
||||
|
||||
|
||||
<li><a href="../../get-ctx/">get_ctx()</a>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<li><a href="../../../databags/">Databags</a>
|
||||
|
||||
|
||||
<li><a href="../../../db/">Database</a>
|
||||
|
||||
|
||||
<li><a href="../../../environment/">Environment</a>
|
||||
|
||||
|
||||
<li><a href="../../../plugins/">Plugins</a>
|
||||
|
||||
|
||||
<li><a href="../../../project/">Project</a>
|
||||
|
||||
|
||||
<li><a href="../../../publisher/">Publisher</a>
|
||||
|
||||
|
||||
<li><a href="../../../templates/">Template API</a>
|
||||
|
||||
|
||||
<li><a href="../../../utils/">Utilities</a>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<li><a href="../../../../search/">Search</a>
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-sm-9 doc-styling">
|
||||
|
||||
|
||||
<h1><i class="glyphicon glyphicon-info-sign"></i> <code class="obj">source_obj</code></h1>
|
||||
|
||||
|
||||
|
||||
<ul class=page-meta>
|
||||
|
||||
<li>Property of <a href="../">Artifact</a></li>
|
||||
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
<p>If an artifact directly corresponds to a <a href="../../../db/obj/" class="ref">Source Object</a>
|
||||
then this will be a reference to it. For most plugins this is unlikely but
|
||||
if you provide a source obj in the <code>sub_artifact</code> call it will be available
|
||||
here.</p>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="comment-box">
|
||||
<h2>Comments</h2>
|
||||
|
||||
<div id="disqus_thread"></div>
|
||||
<script>
|
||||
var disqus_config = function() { this.page.identifier = "/docs/api/build/artifact/source-obj"; this.page.url = "https://www.getlektor.com/docs/api/build/artifact/source-obj/"; };
|
||||
(function() {
|
||||
var d = document, s = d.createElement('script');
|
||||
s.src = '//lektordocumentation.disqus.com/embed.js';
|
||||
s.setAttribute('data-timestamp', +new Date());
|
||||
(d.head || d.body).appendChild(s);
|
||||
})();
|
||||
</script>
|
||||
<noscript>
|
||||
Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript"
|
||||
rel="nofollow">comments powered by Disqus.</a>
|
||||
</noscript>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="bottomsummary">
|
||||
<div class="container">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<footer>
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-sm-4 icon-bar">
|
||||
<a href="https://github.com/lektor/lektor/" title="Lektor on GitHub"
|
||||
><i class="fa fa-github"></i></a>
|
||||
<a href="https://github.com/lektor/lektor/issues/" title="Report Issues for Lektor"
|
||||
><i class="fa fa-bug"></i></a>
|
||||
<a href="https://twitter.com/getlektor" title="Find Lektor on Twitter"
|
||||
><i class="fa fa-twitter"></i></a>
|
||||
<a href="https://gitter.im/lektor/lektor" title="Chat on Gitter"
|
||||
><i class="fa fa-comment"></i></a>
|
||||
<a href="https://github.com/lektor/lektor-website/tree/master/content/docs/api/build/artifact/source-obj/contents.lr" title="View source for this page"><i class="fa fa-code"></i></a>
|
||||
</div>
|
||||
<div class="col-sm-8">
|
||||
<a href="../../../../../license/">License & Copyright</a> •
|
||||
<a href="../../../../../contact/">Contact</a> •
|
||||
Made with <i class="fa fa-fw fa-heart" title="Heart"><span hidden>Heart</span></i> in Carinthia
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
|
||||
<script type=text/javascript src="../../../../../static/app.js?h=bb1b933a" charset="utf-8"></script>
|
||||
<script>
|
||||
((window.gitter = {}).chat = {}).options = {
|
||||
room: 'lektor/lektor',
|
||||
activationElement: null
|
||||
};
|
||||
document.write('<button class="js-gitter-toggle-chat-button">Toggle Chat</button>');
|
||||
var dnt = navigator.doNotTrack || window.doNotTrack || navigator.msDoNotTrack;
|
||||
if (dnt != "1" && dnt != "yes") {
|
||||
window.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments)};ga.l=+new Date;
|
||||
ga('create', 'UA-70822533-1', 'auto');
|
||||
ga('set', 'anonymizeIp', true);
|
||||
ga('send', 'pageview');
|
||||
} else {
|
||||
console.debug("Respecting Do-Not-Track, not running analytics.");
|
||||
}
|
||||
</script>
|
||||
<script async src='https://www.google-analytics.com/analytics.js'></script>
|
||||
<script async defer id="github-bjs" src="https://buttons.github.io/buttons.js"></script>
|
||||
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script>
|
||||
<script src="https://sidecar.gitter.im/dist/sidecar.v1.js" async defer></script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,294 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<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/pygments.css">
|
||||
<link rel="shortcut icon" href="../../../../../static/favicon.png?h=fa09bedd">
|
||||
<title>changed_base_url | Documentation | Lektor Static Content Management System</title>
|
||||
</head>
|
||||
<body class="default">
|
||||
<nav class="navbar navbar-inverse navbar-static-top">
|
||||
<div class="container">
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle collapsed"
|
||||
data-toggle="collapse" data-target="#navbar"
|
||||
aria-expanded="false" aria-controls="navbar">
|
||||
<span class="sr-only">Toggle navigation</span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<a class="navbar-brand" href="../../../../../">Lektor</a>
|
||||
</div>
|
||||
<div id="navbar" class="collapse navbar-collapse">
|
||||
<ul class="nav navbar-nav">
|
||||
|
||||
<li><a href="../../../../../downloads/">Download</a></li>
|
||||
|
||||
<li class="active"><a href="../../../../">Documentation</a></li>
|
||||
|
||||
<li><a href="../../../../../showcase/">Showcase</a></li>
|
||||
|
||||
<li><a href="../../../../../plugins/">Plugins</a></li>
|
||||
|
||||
<li><a href="../../../../../community/">Community</a></li>
|
||||
|
||||
<li><a href="../../../../../blog/">Blog</a></li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<div class="body-wrapper">
|
||||
|
||||
<div class="container">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-3">
|
||||
<ul class="tree-nav nocontent">
|
||||
<li><a href="../../../../">Welcome</a></li>
|
||||
|
||||
|
||||
<li><a href="../../../../what/">What is Lektor</a>
|
||||
|
||||
|
||||
<li><a href="../../../../installation/">Installation</a>
|
||||
|
||||
|
||||
<li><a href="../../../../quickstart/">Quickstart</a>
|
||||
|
||||
|
||||
<li><a href="../../../../project/">Project</a>
|
||||
|
||||
|
||||
<li><a href="../../../../content/">Content</a>
|
||||
|
||||
|
||||
<li><a href="../../../../templates/">Templates</a>
|
||||
|
||||
|
||||
<li><a href="../../../../themes/">Themes</a>
|
||||
|
||||
|
||||
<li><a href="../../../../guides/">Guides</a>
|
||||
|
||||
|
||||
<li><a href="../../../../deployment/">Deployment</a>
|
||||
|
||||
|
||||
<li><a href="../../../../plugins/">Plugins</a>
|
||||
|
||||
|
||||
<li><a href="../../../../models/">Data Modelling</a>
|
||||
|
||||
|
||||
<li><a href="../../../../cli/">Command Line</a>
|
||||
|
||||
|
||||
<li><a href="../../../">API</a>
|
||||
|
||||
<ul>
|
||||
<li><a href="../../">Build System</a>
|
||||
|
||||
<ul>
|
||||
<li><a href="../../artifact/">Artifact</a>
|
||||
|
||||
|
||||
<li><a href="../../program/">BuildProgram</a>
|
||||
|
||||
|
||||
<li><a href="../">Context</a>
|
||||
|
||||
<ul>
|
||||
<li class="active"><a href="./">changed_base_url()</a>
|
||||
|
||||
<ul></ul>
|
||||
|
||||
|
||||
<li><a href="../gather-dependencies/">gather_dependencies()</a>
|
||||
|
||||
|
||||
<li><a href="../locale/">locale</a>
|
||||
|
||||
|
||||
<li><a href="../pad/">pad</a>
|
||||
|
||||
|
||||
<li><a href="../record/">record</a>
|
||||
|
||||
|
||||
<li><a href="../record-dependency/">record_dependency()</a>
|
||||
|
||||
|
||||
<li><a href="../source/">source</a>
|
||||
|
||||
|
||||
<li><a href="../sub-artifact/">sub_artifact()</a>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<li><a href="../../get-ctx/">get_ctx()</a>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<li><a href="../../../databags/">Databags</a>
|
||||
|
||||
|
||||
<li><a href="../../../db/">Database</a>
|
||||
|
||||
|
||||
<li><a href="../../../environment/">Environment</a>
|
||||
|
||||
|
||||
<li><a href="../../../plugins/">Plugins</a>
|
||||
|
||||
|
||||
<li><a href="../../../project/">Project</a>
|
||||
|
||||
|
||||
<li><a href="../../../publisher/">Publisher</a>
|
||||
|
||||
|
||||
<li><a href="../../../templates/">Template API</a>
|
||||
|
||||
|
||||
<li><a href="../../../utils/">Utilities</a>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<li><a href="../../../../search/">Search</a>
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<div class="visible-md-block visible-lg-block">
|
||||
<h4>This Page</h4>
|
||||
<ul class="toc">
|
||||
|
||||
<li><a href="#example">Example</a></li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-sm-9 doc-styling">
|
||||
|
||||
|
||||
<h1><i class="glyphicon glyphicon-cog"></i> <code class="obj">changed_base_url</code> <span class="sig">(<code>value</code>)</span></h1>
|
||||
|
||||
|
||||
|
||||
<ul class=page-meta>
|
||||
|
||||
<li>Method of <a href="../">Context</a></li>
|
||||
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
<p>By default the URL generation is relative to the current source record
|
||||
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">'/downloads/'</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">'/'</span><span class="p">)</span>
|
||||
</pre></div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="comment-box">
|
||||
<h2>Comments</h2>
|
||||
|
||||
<div id="disqus_thread"></div>
|
||||
<script>
|
||||
var disqus_config = function() { this.page.identifier = "/docs/api/build/context/changed-base-url"; this.page.url = "https://www.getlektor.com/docs/api/build/context/changed-base-url/"; };
|
||||
(function() {
|
||||
var d = document, s = d.createElement('script');
|
||||
s.src = '//lektordocumentation.disqus.com/embed.js';
|
||||
s.setAttribute('data-timestamp', +new Date());
|
||||
(d.head || d.body).appendChild(s);
|
||||
})();
|
||||
</script>
|
||||
<noscript>
|
||||
Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript"
|
||||
rel="nofollow">comments powered by Disqus.</a>
|
||||
</noscript>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="bottomsummary">
|
||||
<div class="container">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<footer>
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-sm-4 icon-bar">
|
||||
<a href="https://github.com/lektor/lektor/" title="Lektor on GitHub"
|
||||
><i class="fa fa-github"></i></a>
|
||||
<a href="https://github.com/lektor/lektor/issues/" title="Report Issues for Lektor"
|
||||
><i class="fa fa-bug"></i></a>
|
||||
<a href="https://twitter.com/getlektor" title="Find Lektor on Twitter"
|
||||
><i class="fa fa-twitter"></i></a>
|
||||
<a href="https://gitter.im/lektor/lektor" title="Chat on Gitter"
|
||||
><i class="fa fa-comment"></i></a>
|
||||
<a href="https://github.com/lektor/lektor-website/tree/master/content/docs/api/build/context/changed-base-url/contents.lr" title="View source for this page"><i class="fa fa-code"></i></a>
|
||||
</div>
|
||||
<div class="col-sm-8">
|
||||
<a href="../../../../../license/">License & Copyright</a> •
|
||||
<a href="../../../../../contact/">Contact</a> •
|
||||
Made with <i class="fa fa-fw fa-heart" title="Heart"><span hidden>Heart</span></i> in Carinthia
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
|
||||
<script type=text/javascript src="../../../../../static/app.js?h=bb1b933a" charset="utf-8"></script>
|
||||
<script>
|
||||
((window.gitter = {}).chat = {}).options = {
|
||||
room: 'lektor/lektor',
|
||||
activationElement: null
|
||||
};
|
||||
document.write('<button class="js-gitter-toggle-chat-button">Toggle Chat</button>');
|
||||
var dnt = navigator.doNotTrack || window.doNotTrack || navigator.msDoNotTrack;
|
||||
if (dnt != "1" && dnt != "yes") {
|
||||
window.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments)};ga.l=+new Date;
|
||||
ga('create', 'UA-70822533-1', 'auto');
|
||||
ga('set', 'anonymizeIp', true);
|
||||
ga('send', 'pageview');
|
||||
} else {
|
||||
console.debug("Respecting Do-Not-Track, not running analytics.");
|
||||
}
|
||||
</script>
|
||||
<script async src='https://www.google-analytics.com/analytics.js'></script>
|
||||
<script async defer id="github-bjs" src="https://buttons.github.io/buttons.js"></script>
|
||||
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script>
|
||||
<script src="https://sidecar.gitter.im/dist/sidecar.v1.js" async defer></script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,297 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<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/pygments.css">
|
||||
<link rel="shortcut icon" href="../../../../../static/favicon.png?h=fa09bedd">
|
||||
<title>gather_dependencies | Documentation | Lektor Static Content Management System</title>
|
||||
</head>
|
||||
<body class="default">
|
||||
<nav class="navbar navbar-inverse navbar-static-top">
|
||||
<div class="container">
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle collapsed"
|
||||
data-toggle="collapse" data-target="#navbar"
|
||||
aria-expanded="false" aria-controls="navbar">
|
||||
<span class="sr-only">Toggle navigation</span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<a class="navbar-brand" href="../../../../../">Lektor</a>
|
||||
</div>
|
||||
<div id="navbar" class="collapse navbar-collapse">
|
||||
<ul class="nav navbar-nav">
|
||||
|
||||
<li><a href="../../../../../downloads/">Download</a></li>
|
||||
|
||||
<li class="active"><a href="../../../../">Documentation</a></li>
|
||||
|
||||
<li><a href="../../../../../showcase/">Showcase</a></li>
|
||||
|
||||
<li><a href="../../../../../plugins/">Plugins</a></li>
|
||||
|
||||
<li><a href="../../../../../community/">Community</a></li>
|
||||
|
||||
<li><a href="../../../../../blog/">Blog</a></li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<div class="body-wrapper">
|
||||
|
||||
<div class="container">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-3">
|
||||
<ul class="tree-nav nocontent">
|
||||
<li><a href="../../../../">Welcome</a></li>
|
||||
|
||||
|
||||
<li><a href="../../../../what/">What is Lektor</a>
|
||||
|
||||
|
||||
<li><a href="../../../../installation/">Installation</a>
|
||||
|
||||
|
||||
<li><a href="../../../../quickstart/">Quickstart</a>
|
||||
|
||||
|
||||
<li><a href="../../../../project/">Project</a>
|
||||
|
||||
|
||||
<li><a href="../../../../content/">Content</a>
|
||||
|
||||
|
||||
<li><a href="../../../../templates/">Templates</a>
|
||||
|
||||
|
||||
<li><a href="../../../../themes/">Themes</a>
|
||||
|
||||
|
||||
<li><a href="../../../../guides/">Guides</a>
|
||||
|
||||
|
||||
<li><a href="../../../../deployment/">Deployment</a>
|
||||
|
||||
|
||||
<li><a href="../../../../plugins/">Plugins</a>
|
||||
|
||||
|
||||
<li><a href="../../../../models/">Data Modelling</a>
|
||||
|
||||
|
||||
<li><a href="../../../../cli/">Command Line</a>
|
||||
|
||||
|
||||
<li><a href="../../../">API</a>
|
||||
|
||||
<ul>
|
||||
<li><a href="../../">Build System</a>
|
||||
|
||||
<ul>
|
||||
<li><a href="../../artifact/">Artifact</a>
|
||||
|
||||
|
||||
<li><a href="../../program/">BuildProgram</a>
|
||||
|
||||
|
||||
<li><a href="../">Context</a>
|
||||
|
||||
<ul>
|
||||
<li><a href="../changed-base-url/">changed_base_url()</a>
|
||||
|
||||
|
||||
<li class="active"><a href="./">gather_dependencies()</a>
|
||||
|
||||
<ul></ul>
|
||||
|
||||
|
||||
<li><a href="../locale/">locale</a>
|
||||
|
||||
|
||||
<li><a href="../pad/">pad</a>
|
||||
|
||||
|
||||
<li><a href="../record/">record</a>
|
||||
|
||||
|
||||
<li><a href="../record-dependency/">record_dependency()</a>
|
||||
|
||||
|
||||
<li><a href="../source/">source</a>
|
||||
|
||||
|
||||
<li><a href="../sub-artifact/">sub_artifact()</a>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<li><a href="../../get-ctx/">get_ctx()</a>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<li><a href="../../../databags/">Databags</a>
|
||||
|
||||
|
||||
<li><a href="../../../db/">Database</a>
|
||||
|
||||
|
||||
<li><a href="../../../environment/">Environment</a>
|
||||
|
||||
|
||||
<li><a href="../../../plugins/">Plugins</a>
|
||||
|
||||
|
||||
<li><a href="../../../project/">Project</a>
|
||||
|
||||
|
||||
<li><a href="../../../publisher/">Publisher</a>
|
||||
|
||||
|
||||
<li><a href="../../../templates/">Template API</a>
|
||||
|
||||
|
||||
<li><a href="../../../utils/">Utilities</a>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<li><a href="../../../../search/">Search</a>
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<div class="visible-md-block visible-lg-block">
|
||||
<h4>This Page</h4>
|
||||
<ul class="toc">
|
||||
|
||||
<li><a href="#example">Example</a></li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-sm-9 doc-styling">
|
||||
|
||||
|
||||
<h1><i class="glyphicon glyphicon-cog"></i> <code class="obj">gather_dependencies</code> <span class="sig">(<code>func</code>)</span></h1>
|
||||
|
||||
|
||||
|
||||
<ul class=page-meta>
|
||||
|
||||
<li>Method of <a href="../">Context</a></li>
|
||||
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
<p>As code is executing in the context of the build process Lektor will
|
||||
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>
|
||||
<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">'/path/to/some/pages'</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">'The dependencies are: </span><span class="si">%s</span><span class="s1">'</span> <span class="o">%</span> <span class="n">deps</span><span class="p">)</span>
|
||||
</pre></div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="comment-box">
|
||||
<h2>Comments</h2>
|
||||
|
||||
<div id="disqus_thread"></div>
|
||||
<script>
|
||||
var disqus_config = function() { this.page.identifier = "/docs/api/build/context/gather-dependencies"; this.page.url = "https://www.getlektor.com/docs/api/build/context/gather-dependencies/"; };
|
||||
(function() {
|
||||
var d = document, s = d.createElement('script');
|
||||
s.src = '//lektordocumentation.disqus.com/embed.js';
|
||||
s.setAttribute('data-timestamp', +new Date());
|
||||
(d.head || d.body).appendChild(s);
|
||||
})();
|
||||
</script>
|
||||
<noscript>
|
||||
Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript"
|
||||
rel="nofollow">comments powered by Disqus.</a>
|
||||
</noscript>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="bottomsummary">
|
||||
<div class="container">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<footer>
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-sm-4 icon-bar">
|
||||
<a href="https://github.com/lektor/lektor/" title="Lektor on GitHub"
|
||||
><i class="fa fa-github"></i></a>
|
||||
<a href="https://github.com/lektor/lektor/issues/" title="Report Issues for Lektor"
|
||||
><i class="fa fa-bug"></i></a>
|
||||
<a href="https://twitter.com/getlektor" title="Find Lektor on Twitter"
|
||||
><i class="fa fa-twitter"></i></a>
|
||||
<a href="https://gitter.im/lektor/lektor" title="Chat on Gitter"
|
||||
><i class="fa fa-comment"></i></a>
|
||||
<a href="https://github.com/lektor/lektor-website/tree/master/content/docs/api/build/context/gather-dependencies/contents.lr" title="View source for this page"><i class="fa fa-code"></i></a>
|
||||
</div>
|
||||
<div class="col-sm-8">
|
||||
<a href="../../../../../license/">License & Copyright</a> •
|
||||
<a href="../../../../../contact/">Contact</a> •
|
||||
Made with <i class="fa fa-fw fa-heart" title="Heart"><span hidden>Heart</span></i> in Carinthia
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
|
||||
<script type=text/javascript src="../../../../../static/app.js?h=bb1b933a" charset="utf-8"></script>
|
||||
<script>
|
||||
((window.gitter = {}).chat = {}).options = {
|
||||
room: 'lektor/lektor',
|
||||
activationElement: null
|
||||
};
|
||||
document.write('<button class="js-gitter-toggle-chat-button">Toggle Chat</button>');
|
||||
var dnt = navigator.doNotTrack || window.doNotTrack || navigator.msDoNotTrack;
|
||||
if (dnt != "1" && dnt != "yes") {
|
||||
window.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments)};ga.l=+new Date;
|
||||
ga('create', 'UA-70822533-1', 'auto');
|
||||
ga('set', 'anonymizeIp', true);
|
||||
ga('send', 'pageview');
|
||||
} else {
|
||||
console.debug("Respecting Do-Not-Track, not running analytics.");
|
||||
}
|
||||
</script>
|
||||
<script async src='https://www.google-analytics.com/analytics.js'></script>
|
||||
<script async defer id="github-bjs" src="https://buttons.github.io/buttons.js"></script>
|
||||
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script>
|
||||
<script src="https://sidecar.gitter.im/dist/sidecar.v1.js" async defer></script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,397 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<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/pygments.css">
|
||||
<link rel="shortcut icon" href="../../../../static/favicon.png?h=fa09bedd">
|
||||
<title>Context | Documentation | Lektor Static Content Management System</title>
|
||||
</head>
|
||||
<body class="default">
|
||||
<nav class="navbar navbar-inverse navbar-static-top">
|
||||
<div class="container">
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle collapsed"
|
||||
data-toggle="collapse" data-target="#navbar"
|
||||
aria-expanded="false" aria-controls="navbar">
|
||||
<span class="sr-only">Toggle navigation</span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<a class="navbar-brand" href="../../../../">Lektor</a>
|
||||
</div>
|
||||
<div id="navbar" class="collapse navbar-collapse">
|
||||
<ul class="nav navbar-nav">
|
||||
|
||||
<li><a href="../../../../downloads/">Download</a></li>
|
||||
|
||||
<li class="active"><a href="../../../">Documentation</a></li>
|
||||
|
||||
<li><a href="../../../../showcase/">Showcase</a></li>
|
||||
|
||||
<li><a href="../../../../plugins/">Plugins</a></li>
|
||||
|
||||
<li><a href="../../../../community/">Community</a></li>
|
||||
|
||||
<li><a href="../../../../blog/">Blog</a></li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<div class="body-wrapper">
|
||||
|
||||
<div class="container">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-3">
|
||||
<ul class="tree-nav nocontent">
|
||||
<li><a href="../../../">Welcome</a></li>
|
||||
|
||||
|
||||
<li><a href="../../../what/">What is Lektor</a>
|
||||
|
||||
|
||||
<li><a href="../../../installation/">Installation</a>
|
||||
|
||||
|
||||
<li><a href="../../../quickstart/">Quickstart</a>
|
||||
|
||||
|
||||
<li><a href="../../../project/">Project</a>
|
||||
|
||||
|
||||
<li><a href="../../../content/">Content</a>
|
||||
|
||||
|
||||
<li><a href="../../../templates/">Templates</a>
|
||||
|
||||
|
||||
<li><a href="../../../themes/">Themes</a>
|
||||
|
||||
|
||||
<li><a href="../../../guides/">Guides</a>
|
||||
|
||||
|
||||
<li><a href="../../../deployment/">Deployment</a>
|
||||
|
||||
|
||||
<li><a href="../../../plugins/">Plugins</a>
|
||||
|
||||
|
||||
<li><a href="../../../models/">Data Modelling</a>
|
||||
|
||||
|
||||
<li><a href="../../../cli/">Command Line</a>
|
||||
|
||||
|
||||
<li><a href="../../">API</a>
|
||||
|
||||
<ul>
|
||||
<li><a href="../">Build System</a>
|
||||
|
||||
<ul>
|
||||
<li><a href="../artifact/">Artifact</a>
|
||||
|
||||
|
||||
<li><a href="../program/">BuildProgram</a>
|
||||
|
||||
|
||||
<li class="active"><a href="./">Context</a>
|
||||
|
||||
<ul>
|
||||
<li><a href="changed-base-url/">changed_base_url()</a>
|
||||
|
||||
|
||||
<li><a href="gather-dependencies/">gather_dependencies()</a>
|
||||
|
||||
|
||||
<li><a href="locale/">locale</a>
|
||||
|
||||
|
||||
<li><a href="pad/">pad</a>
|
||||
|
||||
|
||||
<li><a href="record/">record</a>
|
||||
|
||||
|
||||
<li><a href="record-dependency/">record_dependency()</a>
|
||||
|
||||
|
||||
<li><a href="source/">source</a>
|
||||
|
||||
|
||||
<li><a href="sub-artifact/">sub_artifact()</a>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<li><a href="../get-ctx/">get_ctx()</a>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<li><a href="../../databags/">Databags</a>
|
||||
|
||||
|
||||
<li><a href="../../db/">Database</a>
|
||||
|
||||
|
||||
<li><a href="../../environment/">Environment</a>
|
||||
|
||||
|
||||
<li><a href="../../plugins/">Plugins</a>
|
||||
|
||||
|
||||
<li><a href="../../project/">Project</a>
|
||||
|
||||
|
||||
<li><a href="../../publisher/">Publisher</a>
|
||||
|
||||
|
||||
<li><a href="../../templates/">Template API</a>
|
||||
|
||||
|
||||
<li><a href="../../utils/">Utilities</a>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<li><a href="../../../search/">Search</a>
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<div class="visible-md-block visible-lg-block">
|
||||
<h4>This Page</h4>
|
||||
<ul class="toc">
|
||||
|
||||
<li><a href="#basic-example">Basic Example</a></li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-sm-9 doc-styling">
|
||||
|
||||
|
||||
<h1><i class="glyphicon glyphicon-leaf"></i> <code class="mod">lektor.context.</code><code class="obj">Context</code></h1>
|
||||
|
||||
|
||||
|
||||
<ul class=page-meta>
|
||||
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
<p>When Lektor builds sources into finished build artifacts it performs many
|
||||
operations in addition to just creating the end result. For instance it needs
|
||||
to perform dependency tracking, it needs to remember that there might be
|
||||
associated other artifacts and more. All this information is tracked on the
|
||||
<code>Context</code> during a build of a single source. At a later point the builder
|
||||
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>
|
||||
|
||||
<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">'The current source is </span><span class="si">%s</span><span class="s1">'</span> <span class="o">%</span> <span class="n">ctx</span><span class="o">.</span><span class="n">source</span><span class="p">)</span>
|
||||
</pre></div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="child-pages nocontent">
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-6 child">
|
||||
<h4>
|
||||
<i class="glyphicon glyphicon-cog"></i>
|
||||
<a href="changed-base-url/">changed_base_url()</a>
|
||||
</h4>
|
||||
|
||||
<p class="summary">Can override the base URL that is used for relative URL generation.</p>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-md-6 child">
|
||||
<h4>
|
||||
<i class="glyphicon glyphicon-cog"></i>
|
||||
<a href="gather-dependencies/">gather_dependencies()</a>
|
||||
</h4>
|
||||
|
||||
<p class="summary">Can collect dependencies for a code block.</p>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-6 child">
|
||||
<h4>
|
||||
<i class="glyphicon glyphicon-info-sign"></i>
|
||||
<a href="locale/">locale</a>
|
||||
</h4>
|
||||
|
||||
<p class="summary">The current locale (language/territory) code for the context.</p>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-md-6 child">
|
||||
<h4>
|
||||
<i class="glyphicon glyphicon-info-sign"></i>
|
||||
<a href="pad/">pad</a>
|
||||
</h4>
|
||||
|
||||
<p class="summary">A reference to the active database pad.</p>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-6 child">
|
||||
<h4>
|
||||
<i class="glyphicon glyphicon-info-sign"></i>
|
||||
<a href="record/">record</a>
|
||||
</h4>
|
||||
|
||||
<p class="summary">A reference to the current source record.</p>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-md-6 child">
|
||||
<h4>
|
||||
<i class="glyphicon glyphicon-cog"></i>
|
||||
<a href="record-dependency/">record_dependency()</a>
|
||||
</h4>
|
||||
|
||||
<p class="summary">Instructs the builder to record a new dependency for the current artifact.</p>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-6 child">
|
||||
<h4>
|
||||
<i class="glyphicon glyphicon-info-sign"></i>
|
||||
<a href="source/">source</a>
|
||||
</h4>
|
||||
|
||||
<p class="summary">A reference to the current source object.</p>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-md-6 child">
|
||||
<h4>
|
||||
<i class="glyphicon glyphicon-cog"></i>
|
||||
<a href="sub-artifact/">sub_artifact()</a>
|
||||
</h4>
|
||||
|
||||
<p class="summary">Creates a sub-artifact of the current one.</p>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="comment-box">
|
||||
<h2>Comments</h2>
|
||||
|
||||
<div id="disqus_thread"></div>
|
||||
<script>
|
||||
var disqus_config = function() { this.page.identifier = "/docs/api/build/context"; this.page.url = "https://www.getlektor.com/docs/api/build/context/"; };
|
||||
(function() {
|
||||
var d = document, s = d.createElement('script');
|
||||
s.src = '//lektordocumentation.disqus.com/embed.js';
|
||||
s.setAttribute('data-timestamp', +new Date());
|
||||
(d.head || d.body).appendChild(s);
|
||||
})();
|
||||
</script>
|
||||
<noscript>
|
||||
Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript"
|
||||
rel="nofollow">comments powered by Disqus.</a>
|
||||
</noscript>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="bottomsummary">
|
||||
<div class="container">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<footer>
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-sm-4 icon-bar">
|
||||
<a href="https://github.com/lektor/lektor/" title="Lektor on GitHub"
|
||||
><i class="fa fa-github"></i></a>
|
||||
<a href="https://github.com/lektor/lektor/issues/" title="Report Issues for Lektor"
|
||||
><i class="fa fa-bug"></i></a>
|
||||
<a href="https://twitter.com/getlektor" title="Find Lektor on Twitter"
|
||||
><i class="fa fa-twitter"></i></a>
|
||||
<a href="https://gitter.im/lektor/lektor" title="Chat on Gitter"
|
||||
><i class="fa fa-comment"></i></a>
|
||||
<a href="https://github.com/lektor/lektor-website/tree/master/content/docs/api/build/context/contents.lr" title="View source for this page"><i class="fa fa-code"></i></a>
|
||||
</div>
|
||||
<div class="col-sm-8">
|
||||
<a href="../../../../license/">License & Copyright</a> •
|
||||
<a href="../../../../contact/">Contact</a> •
|
||||
Made with <i class="fa fa-fw fa-heart" title="Heart"><span hidden>Heart</span></i> in Carinthia
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
|
||||
<script type=text/javascript src="../../../../static/app.js?h=bb1b933a" charset="utf-8"></script>
|
||||
<script>
|
||||
((window.gitter = {}).chat = {}).options = {
|
||||
room: 'lektor/lektor',
|
||||
activationElement: null
|
||||
};
|
||||
document.write('<button class="js-gitter-toggle-chat-button">Toggle Chat</button>');
|
||||
var dnt = navigator.doNotTrack || window.doNotTrack || navigator.msDoNotTrack;
|
||||
if (dnt != "1" && dnt != "yes") {
|
||||
window.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments)};ga.l=+new Date;
|
||||
ga('create', 'UA-70822533-1', 'auto');
|
||||
ga('set', 'anonymizeIp', true);
|
||||
ga('send', 'pageview');
|
||||
} else {
|
||||
console.debug("Respecting Do-Not-Track, not running analytics.");
|
||||
}
|
||||
</script>
|
||||
<script async src='https://www.google-analytics.com/analytics.js'></script>
|
||||
<script async defer id="github-bjs" src="https://buttons.github.io/buttons.js"></script>
|
||||
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script>
|
||||
<script src="https://sidecar.gitter.im/dist/sidecar.v1.js" async defer></script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,294 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<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/pygments.css">
|
||||
<link rel="shortcut icon" href="../../../../../static/favicon.png?h=fa09bedd">
|
||||
<title>locale | Documentation | Lektor Static Content Management System</title>
|
||||
</head>
|
||||
<body class="default">
|
||||
<nav class="navbar navbar-inverse navbar-static-top">
|
||||
<div class="container">
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle collapsed"
|
||||
data-toggle="collapse" data-target="#navbar"
|
||||
aria-expanded="false" aria-controls="navbar">
|
||||
<span class="sr-only">Toggle navigation</span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<a class="navbar-brand" href="../../../../../">Lektor</a>
|
||||
</div>
|
||||
<div id="navbar" class="collapse navbar-collapse">
|
||||
<ul class="nav navbar-nav">
|
||||
|
||||
<li><a href="../../../../../downloads/">Download</a></li>
|
||||
|
||||
<li class="active"><a href="../../../../">Documentation</a></li>
|
||||
|
||||
<li><a href="../../../../../showcase/">Showcase</a></li>
|
||||
|
||||
<li><a href="../../../../../plugins/">Plugins</a></li>
|
||||
|
||||
<li><a href="../../../../../community/">Community</a></li>
|
||||
|
||||
<li><a href="../../../../../blog/">Blog</a></li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<div class="body-wrapper">
|
||||
|
||||
<div class="container">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-3">
|
||||
<ul class="tree-nav nocontent">
|
||||
<li><a href="../../../../">Welcome</a></li>
|
||||
|
||||
|
||||
<li><a href="../../../../what/">What is Lektor</a>
|
||||
|
||||
|
||||
<li><a href="../../../../installation/">Installation</a>
|
||||
|
||||
|
||||
<li><a href="../../../../quickstart/">Quickstart</a>
|
||||
|
||||
|
||||
<li><a href="../../../../project/">Project</a>
|
||||
|
||||
|
||||
<li><a href="../../../../content/">Content</a>
|
||||
|
||||
|
||||
<li><a href="../../../../templates/">Templates</a>
|
||||
|
||||
|
||||
<li><a href="../../../../themes/">Themes</a>
|
||||
|
||||
|
||||
<li><a href="../../../../guides/">Guides</a>
|
||||
|
||||
|
||||
<li><a href="../../../../deployment/">Deployment</a>
|
||||
|
||||
|
||||
<li><a href="../../../../plugins/">Plugins</a>
|
||||
|
||||
|
||||
<li><a href="../../../../models/">Data Modelling</a>
|
||||
|
||||
|
||||
<li><a href="../../../../cli/">Command Line</a>
|
||||
|
||||
|
||||
<li><a href="../../../">API</a>
|
||||
|
||||
<ul>
|
||||
<li><a href="../../">Build System</a>
|
||||
|
||||
<ul>
|
||||
<li><a href="../../artifact/">Artifact</a>
|
||||
|
||||
|
||||
<li><a href="../../program/">BuildProgram</a>
|
||||
|
||||
|
||||
<li><a href="../">Context</a>
|
||||
|
||||
<ul>
|
||||
<li><a href="../changed-base-url/">changed_base_url()</a>
|
||||
|
||||
|
||||
<li><a href="../gather-dependencies/">gather_dependencies()</a>
|
||||
|
||||
|
||||
<li class="active"><a href="./">locale</a>
|
||||
|
||||
<ul></ul>
|
||||
|
||||
|
||||
<li><a href="../pad/">pad</a>
|
||||
|
||||
|
||||
<li><a href="../record/">record</a>
|
||||
|
||||
|
||||
<li><a href="../record-dependency/">record_dependency()</a>
|
||||
|
||||
|
||||
<li><a href="../source/">source</a>
|
||||
|
||||
|
||||
<li><a href="../sub-artifact/">sub_artifact()</a>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<li><a href="../../get-ctx/">get_ctx()</a>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<li><a href="../../../databags/">Databags</a>
|
||||
|
||||
|
||||
<li><a href="../../../db/">Database</a>
|
||||
|
||||
|
||||
<li><a href="../../../environment/">Environment</a>
|
||||
|
||||
|
||||
<li><a href="../../../plugins/">Plugins</a>
|
||||
|
||||
|
||||
<li><a href="../../../project/">Project</a>
|
||||
|
||||
|
||||
<li><a href="../../../publisher/">Publisher</a>
|
||||
|
||||
|
||||
<li><a href="../../../templates/">Template API</a>
|
||||
|
||||
|
||||
<li><a href="../../../utils/">Utilities</a>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<li><a href="../../../../search/">Search</a>
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<div class="visible-md-block visible-lg-block">
|
||||
<h4>This Page</h4>
|
||||
<ul class="toc">
|
||||
|
||||
<li><a href="#example">Example</a></li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-sm-9 doc-styling">
|
||||
|
||||
|
||||
<h1><i class="glyphicon glyphicon-info-sign"></i> <code class="obj">locale</code></h1>
|
||||
|
||||
|
||||
|
||||
<ul class=page-meta>
|
||||
|
||||
<li>Property of <a href="../">Context</a></li>
|
||||
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
<p>For functionality in Lektor that is dependent on the locale (technical
|
||||
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>
|
||||
</pre></div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="comment-box">
|
||||
<h2>Comments</h2>
|
||||
|
||||
<div id="disqus_thread"></div>
|
||||
<script>
|
||||
var disqus_config = function() { this.page.identifier = "/docs/api/build/context/locale"; this.page.url = "https://www.getlektor.com/docs/api/build/context/locale/"; };
|
||||
(function() {
|
||||
var d = document, s = d.createElement('script');
|
||||
s.src = '//lektordocumentation.disqus.com/embed.js';
|
||||
s.setAttribute('data-timestamp', +new Date());
|
||||
(d.head || d.body).appendChild(s);
|
||||
})();
|
||||
</script>
|
||||
<noscript>
|
||||
Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript"
|
||||
rel="nofollow">comments powered by Disqus.</a>
|
||||
</noscript>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="bottomsummary">
|
||||
<div class="container">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<footer>
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-sm-4 icon-bar">
|
||||
<a href="https://github.com/lektor/lektor/" title="Lektor on GitHub"
|
||||
><i class="fa fa-github"></i></a>
|
||||
<a href="https://github.com/lektor/lektor/issues/" title="Report Issues for Lektor"
|
||||
><i class="fa fa-bug"></i></a>
|
||||
<a href="https://twitter.com/getlektor" title="Find Lektor on Twitter"
|
||||
><i class="fa fa-twitter"></i></a>
|
||||
<a href="https://gitter.im/lektor/lektor" title="Chat on Gitter"
|
||||
><i class="fa fa-comment"></i></a>
|
||||
<a href="https://github.com/lektor/lektor-website/tree/master/content/docs/api/build/context/locale/contents.lr" title="View source for this page"><i class="fa fa-code"></i></a>
|
||||
</div>
|
||||
<div class="col-sm-8">
|
||||
<a href="../../../../../license/">License & Copyright</a> •
|
||||
<a href="../../../../../contact/">Contact</a> •
|
||||
Made with <i class="fa fa-fw fa-heart" title="Heart"><span hidden>Heart</span></i> in Carinthia
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
|
||||
<script type=text/javascript src="../../../../../static/app.js?h=bb1b933a" charset="utf-8"></script>
|
||||
<script>
|
||||
((window.gitter = {}).chat = {}).options = {
|
||||
room: 'lektor/lektor',
|
||||
activationElement: null
|
||||
};
|
||||
document.write('<button class="js-gitter-toggle-chat-button">Toggle Chat</button>');
|
||||
var dnt = navigator.doNotTrack || window.doNotTrack || navigator.msDoNotTrack;
|
||||
if (dnt != "1" && dnt != "yes") {
|
||||
window.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments)};ga.l=+new Date;
|
||||
ga('create', 'UA-70822533-1', 'auto');
|
||||
ga('set', 'anonymizeIp', true);
|
||||
ga('send', 'pageview');
|
||||
} else {
|
||||
console.debug("Respecting Do-Not-Track, not running analytics.");
|
||||
}
|
||||
</script>
|
||||
<script async src='https://www.google-analytics.com/analytics.js'></script>
|
||||
<script async defer id="github-bjs" src="https://buttons.github.io/buttons.js"></script>
|
||||
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script>
|
||||
<script src="https://sidecar.gitter.im/dist/sidecar.v1.js" async defer></script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,295 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<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/pygments.css">
|
||||
<link rel="shortcut icon" href="../../../../../static/favicon.png?h=fa09bedd">
|
||||
<title>pad | Documentation | Lektor Static Content Management System</title>
|
||||
</head>
|
||||
<body class="default">
|
||||
<nav class="navbar navbar-inverse navbar-static-top">
|
||||
<div class="container">
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle collapsed"
|
||||
data-toggle="collapse" data-target="#navbar"
|
||||
aria-expanded="false" aria-controls="navbar">
|
||||
<span class="sr-only">Toggle navigation</span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<a class="navbar-brand" href="../../../../../">Lektor</a>
|
||||
</div>
|
||||
<div id="navbar" class="collapse navbar-collapse">
|
||||
<ul class="nav navbar-nav">
|
||||
|
||||
<li><a href="../../../../../downloads/">Download</a></li>
|
||||
|
||||
<li class="active"><a href="../../../../">Documentation</a></li>
|
||||
|
||||
<li><a href="../../../../../showcase/">Showcase</a></li>
|
||||
|
||||
<li><a href="../../../../../plugins/">Plugins</a></li>
|
||||
|
||||
<li><a href="../../../../../community/">Community</a></li>
|
||||
|
||||
<li><a href="../../../../../blog/">Blog</a></li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<div class="body-wrapper">
|
||||
|
||||
<div class="container">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-3">
|
||||
<ul class="tree-nav nocontent">
|
||||
<li><a href="../../../../">Welcome</a></li>
|
||||
|
||||
|
||||
<li><a href="../../../../what/">What is Lektor</a>
|
||||
|
||||
|
||||
<li><a href="../../../../installation/">Installation</a>
|
||||
|
||||
|
||||
<li><a href="../../../../quickstart/">Quickstart</a>
|
||||
|
||||
|
||||
<li><a href="../../../../project/">Project</a>
|
||||
|
||||
|
||||
<li><a href="../../../../content/">Content</a>
|
||||
|
||||
|
||||
<li><a href="../../../../templates/">Templates</a>
|
||||
|
||||
|
||||
<li><a href="../../../../themes/">Themes</a>
|
||||
|
||||
|
||||
<li><a href="../../../../guides/">Guides</a>
|
||||
|
||||
|
||||
<li><a href="../../../../deployment/">Deployment</a>
|
||||
|
||||
|
||||
<li><a href="../../../../plugins/">Plugins</a>
|
||||
|
||||
|
||||
<li><a href="../../../../models/">Data Modelling</a>
|
||||
|
||||
|
||||
<li><a href="../../../../cli/">Command Line</a>
|
||||
|
||||
|
||||
<li><a href="../../../">API</a>
|
||||
|
||||
<ul>
|
||||
<li><a href="../../">Build System</a>
|
||||
|
||||
<ul>
|
||||
<li><a href="../../artifact/">Artifact</a>
|
||||
|
||||
|
||||
<li><a href="../../program/">BuildProgram</a>
|
||||
|
||||
|
||||
<li><a href="../">Context</a>
|
||||
|
||||
<ul>
|
||||
<li><a href="../changed-base-url/">changed_base_url()</a>
|
||||
|
||||
|
||||
<li><a href="../gather-dependencies/">gather_dependencies()</a>
|
||||
|
||||
|
||||
<li><a href="../locale/">locale</a>
|
||||
|
||||
|
||||
<li class="active"><a href="./">pad</a>
|
||||
|
||||
<ul></ul>
|
||||
|
||||
|
||||
<li><a href="../record/">record</a>
|
||||
|
||||
|
||||
<li><a href="../record-dependency/">record_dependency()</a>
|
||||
|
||||
|
||||
<li><a href="../source/">source</a>
|
||||
|
||||
|
||||
<li><a href="../sub-artifact/">sub_artifact()</a>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<li><a href="../../get-ctx/">get_ctx()</a>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<li><a href="../../../databags/">Databags</a>
|
||||
|
||||
|
||||
<li><a href="../../../db/">Database</a>
|
||||
|
||||
|
||||
<li><a href="../../../environment/">Environment</a>
|
||||
|
||||
|
||||
<li><a href="../../../plugins/">Plugins</a>
|
||||
|
||||
|
||||
<li><a href="../../../project/">Project</a>
|
||||
|
||||
|
||||
<li><a href="../../../publisher/">Publisher</a>
|
||||
|
||||
|
||||
<li><a href="../../../templates/">Template API</a>
|
||||
|
||||
|
||||
<li><a href="../../../utils/">Utilities</a>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<li><a href="../../../../search/">Search</a>
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<div class="visible-md-block visible-lg-block">
|
||||
<h4>This Page</h4>
|
||||
<ul class="toc">
|
||||
|
||||
<li><a href="#example">Example</a></li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-sm-9 doc-styling">
|
||||
|
||||
|
||||
<h1><i class="glyphicon glyphicon-info-sign"></i> <code class="obj">pad</code></h1>
|
||||
|
||||
|
||||
|
||||
<ul class=page-meta>
|
||||
|
||||
<li>Property of <a href="../">Context</a></li>
|
||||
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
<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>
|
||||
|
||||
<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>
|
||||
<span class="n">do_something_with</span><span class="p">(</span><span class="n">child</span><span class="p">)</span>
|
||||
</pre></div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="comment-box">
|
||||
<h2>Comments</h2>
|
||||
|
||||
<div id="disqus_thread"></div>
|
||||
<script>
|
||||
var disqus_config = function() { this.page.identifier = "/docs/api/build/context/pad"; this.page.url = "https://www.getlektor.com/docs/api/build/context/pad/"; };
|
||||
(function() {
|
||||
var d = document, s = d.createElement('script');
|
||||
s.src = '//lektordocumentation.disqus.com/embed.js';
|
||||
s.setAttribute('data-timestamp', +new Date());
|
||||
(d.head || d.body).appendChild(s);
|
||||
})();
|
||||
</script>
|
||||
<noscript>
|
||||
Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript"
|
||||
rel="nofollow">comments powered by Disqus.</a>
|
||||
</noscript>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="bottomsummary">
|
||||
<div class="container">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<footer>
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-sm-4 icon-bar">
|
||||
<a href="https://github.com/lektor/lektor/" title="Lektor on GitHub"
|
||||
><i class="fa fa-github"></i></a>
|
||||
<a href="https://github.com/lektor/lektor/issues/" title="Report Issues for Lektor"
|
||||
><i class="fa fa-bug"></i></a>
|
||||
<a href="https://twitter.com/getlektor" title="Find Lektor on Twitter"
|
||||
><i class="fa fa-twitter"></i></a>
|
||||
<a href="https://gitter.im/lektor/lektor" title="Chat on Gitter"
|
||||
><i class="fa fa-comment"></i></a>
|
||||
<a href="https://github.com/lektor/lektor-website/tree/master/content/docs/api/build/context/pad/contents.lr" title="View source for this page"><i class="fa fa-code"></i></a>
|
||||
</div>
|
||||
<div class="col-sm-8">
|
||||
<a href="../../../../../license/">License & Copyright</a> •
|
||||
<a href="../../../../../contact/">Contact</a> •
|
||||
Made with <i class="fa fa-fw fa-heart" title="Heart"><span hidden>Heart</span></i> in Carinthia
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
|
||||
<script type=text/javascript src="../../../../../static/app.js?h=bb1b933a" charset="utf-8"></script>
|
||||
<script>
|
||||
((window.gitter = {}).chat = {}).options = {
|
||||
room: 'lektor/lektor',
|
||||
activationElement: null
|
||||
};
|
||||
document.write('<button class="js-gitter-toggle-chat-button">Toggle Chat</button>');
|
||||
var dnt = navigator.doNotTrack || window.doNotTrack || navigator.msDoNotTrack;
|
||||
if (dnt != "1" && dnt != "yes") {
|
||||
window.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments)};ga.l=+new Date;
|
||||
ga('create', 'UA-70822533-1', 'auto');
|
||||
ga('set', 'anonymizeIp', true);
|
||||
ga('send', 'pageview');
|
||||
} else {
|
||||
console.debug("Respecting Do-Not-Track, not running analytics.");
|
||||
}
|
||||
</script>
|
||||
<script async src='https://www.google-analytics.com/analytics.js'></script>
|
||||
<script async defer id="github-bjs" src="https://buttons.github.io/buttons.js"></script>
|
||||
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script>
|
||||
<script src="https://sidecar.gitter.im/dist/sidecar.v1.js" async defer></script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,313 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<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/pygments.css">
|
||||
<link rel="shortcut icon" href="../../../../../static/favicon.png?h=fa09bedd">
|
||||
<title>record_dependency | Documentation | Lektor Static Content Management System</title>
|
||||
</head>
|
||||
<body class="default">
|
||||
<nav class="navbar navbar-inverse navbar-static-top">
|
||||
<div class="container">
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle collapsed"
|
||||
data-toggle="collapse" data-target="#navbar"
|
||||
aria-expanded="false" aria-controls="navbar">
|
||||
<span class="sr-only">Toggle navigation</span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<a class="navbar-brand" href="../../../../../">Lektor</a>
|
||||
</div>
|
||||
<div id="navbar" class="collapse navbar-collapse">
|
||||
<ul class="nav navbar-nav">
|
||||
|
||||
<li><a href="../../../../../downloads/">Download</a></li>
|
||||
|
||||
<li class="active"><a href="../../../../">Documentation</a></li>
|
||||
|
||||
<li><a href="../../../../../showcase/">Showcase</a></li>
|
||||
|
||||
<li><a href="../../../../../plugins/">Plugins</a></li>
|
||||
|
||||
<li><a href="../../../../../community/">Community</a></li>
|
||||
|
||||
<li><a href="../../../../../blog/">Blog</a></li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<div class="body-wrapper">
|
||||
|
||||
<div class="container">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-3">
|
||||
<ul class="tree-nav nocontent">
|
||||
<li><a href="../../../../">Welcome</a></li>
|
||||
|
||||
|
||||
<li><a href="../../../../what/">What is Lektor</a>
|
||||
|
||||
|
||||
<li><a href="../../../../installation/">Installation</a>
|
||||
|
||||
|
||||
<li><a href="../../../../quickstart/">Quickstart</a>
|
||||
|
||||
|
||||
<li><a href="../../../../project/">Project</a>
|
||||
|
||||
|
||||
<li><a href="../../../../content/">Content</a>
|
||||
|
||||
|
||||
<li><a href="../../../../templates/">Templates</a>
|
||||
|
||||
|
||||
<li><a href="../../../../themes/">Themes</a>
|
||||
|
||||
|
||||
<li><a href="../../../../guides/">Guides</a>
|
||||
|
||||
|
||||
<li><a href="../../../../deployment/">Deployment</a>
|
||||
|
||||
|
||||
<li><a href="../../../../plugins/">Plugins</a>
|
||||
|
||||
|
||||
<li><a href="../../../../models/">Data Modelling</a>
|
||||
|
||||
|
||||
<li><a href="../../../../cli/">Command Line</a>
|
||||
|
||||
|
||||
<li><a href="../../../">API</a>
|
||||
|
||||
<ul>
|
||||
<li><a href="../../">Build System</a>
|
||||
|
||||
<ul>
|
||||
<li><a href="../../artifact/">Artifact</a>
|
||||
|
||||
|
||||
<li><a href="../../program/">BuildProgram</a>
|
||||
|
||||
|
||||
<li><a href="../">Context</a>
|
||||
|
||||
<ul>
|
||||
<li><a href="../changed-base-url/">changed_base_url()</a>
|
||||
|
||||
|
||||
<li><a href="../gather-dependencies/">gather_dependencies()</a>
|
||||
|
||||
|
||||
<li><a href="../locale/">locale</a>
|
||||
|
||||
|
||||
<li><a href="../pad/">pad</a>
|
||||
|
||||
|
||||
<li><a href="../record/">record</a>
|
||||
|
||||
|
||||
<li class="active"><a href="./">record_dependency()</a>
|
||||
|
||||
<ul></ul>
|
||||
|
||||
|
||||
<li><a href="../source/">source</a>
|
||||
|
||||
|
||||
<li><a href="../sub-artifact/">sub_artifact()</a>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<li><a href="../../get-ctx/">get_ctx()</a>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<li><a href="../../../databags/">Databags</a>
|
||||
|
||||
|
||||
<li><a href="../../../db/">Database</a>
|
||||
|
||||
|
||||
<li><a href="../../../environment/">Environment</a>
|
||||
|
||||
|
||||
<li><a href="../../../plugins/">Plugins</a>
|
||||
|
||||
|
||||
<li><a href="../../../project/">Project</a>
|
||||
|
||||
|
||||
<li><a href="../../../publisher/">Publisher</a>
|
||||
|
||||
|
||||
<li><a href="../../../templates/">Template API</a>
|
||||
|
||||
|
||||
<li><a href="../../../utils/">Utilities</a>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<li><a href="../../../../search/">Search</a>
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<div class="visible-md-block visible-lg-block">
|
||||
<h4>This Page</h4>
|
||||
<ul class="toc">
|
||||
|
||||
<li><a href="#example">Example</a></li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-sm-9 doc-styling">
|
||||
|
||||
|
||||
<h1><i class="glyphicon glyphicon-cog"></i> <code class="obj">record_dependency</code> <span class="sig">(<code>filename</code>)</span></h1>
|
||||
|
||||
|
||||
|
||||
<ul class=page-meta>
|
||||
|
||||
<li>Method of <a href="../">Context</a></li>
|
||||
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
<p>Because Lektor is a system that builds artifacts into static files, an
|
||||
important part of it is the dependency graph. It tracks dependencies between
|
||||
produced artifacts and source files to automatically determine which files
|
||||
need to be rebuilt when sources change.</p>
|
||||
<p>As such it's crucial that plugins record dependencies properly or changes
|
||||
will not show up, even if sources change.</p>
|
||||
<p>This can be achieved with the <code>record_dependency</code> context method. If a plugin
|
||||
references a file which can affect the output of the plugin, it's important
|
||||
to record this as a dependency.</p>
|
||||
<p>Note that you should only track dependencies below the project folder. It
|
||||
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>
|
||||
<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>
|
||||
|
||||
<span class="k">def</span> <span class="nf">setup_env</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="o">**</span><span class="n">extra</span><span class="p">):</span>
|
||||
<span class="k">def</span> <span class="nf">include_file</span><span class="p">(</span><span class="n">filename</span><span class="p">):</span>
|
||||
<span class="n">fn</span> <span class="o">=</span> <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">env</span><span class="o">.</span><span class="n">root_path</span><span class="p">,</span> <span class="s1">'inc'</span><span class="p">,</span> <span class="n">filename</span><span class="p">)</span>
|
||||
<span class="n">get_ctx</span><span class="p">()</span><span class="o">.</span><span class="n">record_dependency</span><span class="p">(</span><span class="n">fn</span><span class="p">)</span>
|
||||
<span class="k">with</span> <span class="nb">open</span><span class="p">(</span><span class="n">fn</span><span class="p">)</span> <span class="k">as</span> <span class="n">f</span><span class="p">:</span>
|
||||
<span class="k">return</span> <span class="n">f</span><span class="o">.</span><span class="n">read</span><span class="p">()</span><span class="o">.</span><span class="n">decode</span><span class="p">(</span><span class="s1">'utf-8'</span><span class="p">)</span>
|
||||
<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">'include_file'</span><span class="p">]</span> <span class="o">=</span> <span class="n">include_file</span>
|
||||
</pre></div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="comment-box">
|
||||
<h2>Comments</h2>
|
||||
|
||||
<div id="disqus_thread"></div>
|
||||
<script>
|
||||
var disqus_config = function() { this.page.identifier = "/docs/api/build/context/record-dependency"; this.page.url = "https://www.getlektor.com/docs/api/build/context/record-dependency/"; };
|
||||
(function() {
|
||||
var d = document, s = d.createElement('script');
|
||||
s.src = '//lektordocumentation.disqus.com/embed.js';
|
||||
s.setAttribute('data-timestamp', +new Date());
|
||||
(d.head || d.body).appendChild(s);
|
||||
})();
|
||||
</script>
|
||||
<noscript>
|
||||
Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript"
|
||||
rel="nofollow">comments powered by Disqus.</a>
|
||||
</noscript>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="bottomsummary">
|
||||
<div class="container">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<footer>
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-sm-4 icon-bar">
|
||||
<a href="https://github.com/lektor/lektor/" title="Lektor on GitHub"
|
||||
><i class="fa fa-github"></i></a>
|
||||
<a href="https://github.com/lektor/lektor/issues/" title="Report Issues for Lektor"
|
||||
><i class="fa fa-bug"></i></a>
|
||||
<a href="https://twitter.com/getlektor" title="Find Lektor on Twitter"
|
||||
><i class="fa fa-twitter"></i></a>
|
||||
<a href="https://gitter.im/lektor/lektor" title="Chat on Gitter"
|
||||
><i class="fa fa-comment"></i></a>
|
||||
<a href="https://github.com/lektor/lektor-website/tree/master/content/docs/api/build/context/record-dependency/contents.lr" title="View source for this page"><i class="fa fa-code"></i></a>
|
||||
</div>
|
||||
<div class="col-sm-8">
|
||||
<a href="../../../../../license/">License & Copyright</a> •
|
||||
<a href="../../../../../contact/">Contact</a> •
|
||||
Made with <i class="fa fa-fw fa-heart" title="Heart"><span hidden>Heart</span></i> in Carinthia
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
|
||||
<script type=text/javascript src="../../../../../static/app.js?h=bb1b933a" charset="utf-8"></script>
|
||||
<script>
|
||||
((window.gitter = {}).chat = {}).options = {
|
||||
room: 'lektor/lektor',
|
||||
activationElement: null
|
||||
};
|
||||
document.write('<button class="js-gitter-toggle-chat-button">Toggle Chat</button>');
|
||||
var dnt = navigator.doNotTrack || window.doNotTrack || navigator.msDoNotTrack;
|
||||
if (dnt != "1" && dnt != "yes") {
|
||||
window.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments)};ga.l=+new Date;
|
||||
ga('create', 'UA-70822533-1', 'auto');
|
||||
ga('set', 'anonymizeIp', true);
|
||||
ga('send', 'pageview');
|
||||
} else {
|
||||
console.debug("Respecting Do-Not-Track, not running analytics.");
|
||||
}
|
||||
</script>
|
||||
<script async src='https://www.google-analytics.com/analytics.js'></script>
|
||||
<script async defer id="github-bjs" src="https://buttons.github.io/buttons.js"></script>
|
||||
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script>
|
||||
<script src="https://sidecar.gitter.im/dist/sidecar.v1.js" async defer></script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,295 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<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/pygments.css">
|
||||
<link rel="shortcut icon" href="../../../../../static/favicon.png?h=fa09bedd">
|
||||
<title>record | Documentation | Lektor Static Content Management System</title>
|
||||
</head>
|
||||
<body class="default">
|
||||
<nav class="navbar navbar-inverse navbar-static-top">
|
||||
<div class="container">
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle collapsed"
|
||||
data-toggle="collapse" data-target="#navbar"
|
||||
aria-expanded="false" aria-controls="navbar">
|
||||
<span class="sr-only">Toggle navigation</span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<a class="navbar-brand" href="../../../../../">Lektor</a>
|
||||
</div>
|
||||
<div id="navbar" class="collapse navbar-collapse">
|
||||
<ul class="nav navbar-nav">
|
||||
|
||||
<li><a href="../../../../../downloads/">Download</a></li>
|
||||
|
||||
<li class="active"><a href="../../../../">Documentation</a></li>
|
||||
|
||||
<li><a href="../../../../../showcase/">Showcase</a></li>
|
||||
|
||||
<li><a href="../../../../../plugins/">Plugins</a></li>
|
||||
|
||||
<li><a href="../../../../../community/">Community</a></li>
|
||||
|
||||
<li><a href="../../../../../blog/">Blog</a></li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<div class="body-wrapper">
|
||||
|
||||
<div class="container">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-3">
|
||||
<ul class="tree-nav nocontent">
|
||||
<li><a href="../../../../">Welcome</a></li>
|
||||
|
||||
|
||||
<li><a href="../../../../what/">What is Lektor</a>
|
||||
|
||||
|
||||
<li><a href="../../../../installation/">Installation</a>
|
||||
|
||||
|
||||
<li><a href="../../../../quickstart/">Quickstart</a>
|
||||
|
||||
|
||||
<li><a href="../../../../project/">Project</a>
|
||||
|
||||
|
||||
<li><a href="../../../../content/">Content</a>
|
||||
|
||||
|
||||
<li><a href="../../../../templates/">Templates</a>
|
||||
|
||||
|
||||
<li><a href="../../../../themes/">Themes</a>
|
||||
|
||||
|
||||
<li><a href="../../../../guides/">Guides</a>
|
||||
|
||||
|
||||
<li><a href="../../../../deployment/">Deployment</a>
|
||||
|
||||
|
||||
<li><a href="../../../../plugins/">Plugins</a>
|
||||
|
||||
|
||||
<li><a href="../../../../models/">Data Modelling</a>
|
||||
|
||||
|
||||
<li><a href="../../../../cli/">Command Line</a>
|
||||
|
||||
|
||||
<li><a href="../../../">API</a>
|
||||
|
||||
<ul>
|
||||
<li><a href="../../">Build System</a>
|
||||
|
||||
<ul>
|
||||
<li><a href="../../artifact/">Artifact</a>
|
||||
|
||||
|
||||
<li><a href="../../program/">BuildProgram</a>
|
||||
|
||||
|
||||
<li><a href="../">Context</a>
|
||||
|
||||
<ul>
|
||||
<li><a href="../changed-base-url/">changed_base_url()</a>
|
||||
|
||||
|
||||
<li><a href="../gather-dependencies/">gather_dependencies()</a>
|
||||
|
||||
|
||||
<li><a href="../locale/">locale</a>
|
||||
|
||||
|
||||
<li><a href="../pad/">pad</a>
|
||||
|
||||
|
||||
<li class="active"><a href="./">record</a>
|
||||
|
||||
<ul></ul>
|
||||
|
||||
|
||||
<li><a href="../record-dependency/">record_dependency()</a>
|
||||
|
||||
|
||||
<li><a href="../source/">source</a>
|
||||
|
||||
|
||||
<li><a href="../sub-artifact/">sub_artifact()</a>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<li><a href="../../get-ctx/">get_ctx()</a>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<li><a href="../../../databags/">Databags</a>
|
||||
|
||||
|
||||
<li><a href="../../../db/">Database</a>
|
||||
|
||||
|
||||
<li><a href="../../../environment/">Environment</a>
|
||||
|
||||
|
||||
<li><a href="../../../plugins/">Plugins</a>
|
||||
|
||||
|
||||
<li><a href="../../../project/">Project</a>
|
||||
|
||||
|
||||
<li><a href="../../../publisher/">Publisher</a>
|
||||
|
||||
|
||||
<li><a href="../../../templates/">Template API</a>
|
||||
|
||||
|
||||
<li><a href="../../../utils/">Utilities</a>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<li><a href="../../../../search/">Search</a>
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<div class="visible-md-block visible-lg-block">
|
||||
<h4>This Page</h4>
|
||||
<ul class="toc">
|
||||
|
||||
<li><a href="#example">Example</a></li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-sm-9 doc-styling">
|
||||
|
||||
|
||||
<h1><i class="glyphicon glyphicon-info-sign"></i> <code class="obj">record</code></h1>
|
||||
|
||||
|
||||
|
||||
<ul class=page-meta>
|
||||
|
||||
<li>Property of <a href="../">Context</a></li>
|
||||
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
<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>
|
||||
|
||||
<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>
|
||||
</pre></div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="comment-box">
|
||||
<h2>Comments</h2>
|
||||
|
||||
<div id="disqus_thread"></div>
|
||||
<script>
|
||||
var disqus_config = function() { this.page.identifier = "/docs/api/build/context/record"; this.page.url = "https://www.getlektor.com/docs/api/build/context/record/"; };
|
||||
(function() {
|
||||
var d = document, s = d.createElement('script');
|
||||
s.src = '//lektordocumentation.disqus.com/embed.js';
|
||||
s.setAttribute('data-timestamp', +new Date());
|
||||
(d.head || d.body).appendChild(s);
|
||||
})();
|
||||
</script>
|
||||
<noscript>
|
||||
Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript"
|
||||
rel="nofollow">comments powered by Disqus.</a>
|
||||
</noscript>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="bottomsummary">
|
||||
<div class="container">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<footer>
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-sm-4 icon-bar">
|
||||
<a href="https://github.com/lektor/lektor/" title="Lektor on GitHub"
|
||||
><i class="fa fa-github"></i></a>
|
||||
<a href="https://github.com/lektor/lektor/issues/" title="Report Issues for Lektor"
|
||||
><i class="fa fa-bug"></i></a>
|
||||
<a href="https://twitter.com/getlektor" title="Find Lektor on Twitter"
|
||||
><i class="fa fa-twitter"></i></a>
|
||||
<a href="https://gitter.im/lektor/lektor" title="Chat on Gitter"
|
||||
><i class="fa fa-comment"></i></a>
|
||||
<a href="https://github.com/lektor/lektor-website/tree/master/content/docs/api/build/context/record/contents.lr" title="View source for this page"><i class="fa fa-code"></i></a>
|
||||
</div>
|
||||
<div class="col-sm-8">
|
||||
<a href="../../../../../license/">License & Copyright</a> •
|
||||
<a href="../../../../../contact/">Contact</a> •
|
||||
Made with <i class="fa fa-fw fa-heart" title="Heart"><span hidden>Heart</span></i> in Carinthia
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
|
||||
<script type=text/javascript src="../../../../../static/app.js?h=bb1b933a" charset="utf-8"></script>
|
||||
<script>
|
||||
((window.gitter = {}).chat = {}).options = {
|
||||
room: 'lektor/lektor',
|
||||
activationElement: null
|
||||
};
|
||||
document.write('<button class="js-gitter-toggle-chat-button">Toggle Chat</button>');
|
||||
var dnt = navigator.doNotTrack || window.doNotTrack || navigator.msDoNotTrack;
|
||||
if (dnt != "1" && dnt != "yes") {
|
||||
window.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments)};ga.l=+new Date;
|
||||
ga('create', 'UA-70822533-1', 'auto');
|
||||
ga('set', 'anonymizeIp', true);
|
||||
ga('send', 'pageview');
|
||||
} else {
|
||||
console.debug("Respecting Do-Not-Track, not running analytics.");
|
||||
}
|
||||
</script>
|
||||
<script async src='https://www.google-analytics.com/analytics.js'></script>
|
||||
<script async defer id="github-bjs" src="https://buttons.github.io/buttons.js"></script>
|
||||
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script>
|
||||
<script src="https://sidecar.gitter.im/dist/sidecar.v1.js" async defer></script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,296 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<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/pygments.css">
|
||||
<link rel="shortcut icon" href="../../../../../static/favicon.png?h=fa09bedd">
|
||||
<title>source | Documentation | Lektor Static Content Management System</title>
|
||||
</head>
|
||||
<body class="default">
|
||||
<nav class="navbar navbar-inverse navbar-static-top">
|
||||
<div class="container">
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle collapsed"
|
||||
data-toggle="collapse" data-target="#navbar"
|
||||
aria-expanded="false" aria-controls="navbar">
|
||||
<span class="sr-only">Toggle navigation</span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<a class="navbar-brand" href="../../../../../">Lektor</a>
|
||||
</div>
|
||||
<div id="navbar" class="collapse navbar-collapse">
|
||||
<ul class="nav navbar-nav">
|
||||
|
||||
<li><a href="../../../../../downloads/">Download</a></li>
|
||||
|
||||
<li class="active"><a href="../../../../">Documentation</a></li>
|
||||
|
||||
<li><a href="../../../../../showcase/">Showcase</a></li>
|
||||
|
||||
<li><a href="../../../../../plugins/">Plugins</a></li>
|
||||
|
||||
<li><a href="../../../../../community/">Community</a></li>
|
||||
|
||||
<li><a href="../../../../../blog/">Blog</a></li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<div class="body-wrapper">
|
||||
|
||||
<div class="container">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-3">
|
||||
<ul class="tree-nav nocontent">
|
||||
<li><a href="../../../../">Welcome</a></li>
|
||||
|
||||
|
||||
<li><a href="../../../../what/">What is Lektor</a>
|
||||
|
||||
|
||||
<li><a href="../../../../installation/">Installation</a>
|
||||
|
||||
|
||||
<li><a href="../../../../quickstart/">Quickstart</a>
|
||||
|
||||
|
||||
<li><a href="../../../../project/">Project</a>
|
||||
|
||||
|
||||
<li><a href="../../../../content/">Content</a>
|
||||
|
||||
|
||||
<li><a href="../../../../templates/">Templates</a>
|
||||
|
||||
|
||||
<li><a href="../../../../themes/">Themes</a>
|
||||
|
||||
|
||||
<li><a href="../../../../guides/">Guides</a>
|
||||
|
||||
|
||||
<li><a href="../../../../deployment/">Deployment</a>
|
||||
|
||||
|
||||
<li><a href="../../../../plugins/">Plugins</a>
|
||||
|
||||
|
||||
<li><a href="../../../../models/">Data Modelling</a>
|
||||
|
||||
|
||||
<li><a href="../../../../cli/">Command Line</a>
|
||||
|
||||
|
||||
<li><a href="../../../">API</a>
|
||||
|
||||
<ul>
|
||||
<li><a href="../../">Build System</a>
|
||||
|
||||
<ul>
|
||||
<li><a href="../../artifact/">Artifact</a>
|
||||
|
||||
|
||||
<li><a href="../../program/">BuildProgram</a>
|
||||
|
||||
|
||||
<li><a href="../">Context</a>
|
||||
|
||||
<ul>
|
||||
<li><a href="../changed-base-url/">changed_base_url()</a>
|
||||
|
||||
|
||||
<li><a href="../gather-dependencies/">gather_dependencies()</a>
|
||||
|
||||
|
||||
<li><a href="../locale/">locale</a>
|
||||
|
||||
|
||||
<li><a href="../pad/">pad</a>
|
||||
|
||||
|
||||
<li><a href="../record/">record</a>
|
||||
|
||||
|
||||
<li><a href="../record-dependency/">record_dependency()</a>
|
||||
|
||||
|
||||
<li class="active"><a href="./">source</a>
|
||||
|
||||
<ul></ul>
|
||||
|
||||
|
||||
<li><a href="../sub-artifact/">sub_artifact()</a>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<li><a href="../../get-ctx/">get_ctx()</a>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<li><a href="../../../databags/">Databags</a>
|
||||
|
||||
|
||||
<li><a href="../../../db/">Database</a>
|
||||
|
||||
|
||||
<li><a href="../../../environment/">Environment</a>
|
||||
|
||||
|
||||
<li><a href="../../../plugins/">Plugins</a>
|
||||
|
||||
|
||||
<li><a href="../../../project/">Project</a>
|
||||
|
||||
|
||||
<li><a href="../../../publisher/">Publisher</a>
|
||||
|
||||
|
||||
<li><a href="../../../templates/">Template API</a>
|
||||
|
||||
|
||||
<li><a href="../../../utils/">Utilities</a>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<li><a href="../../../../search/">Search</a>
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<div class="visible-md-block visible-lg-block">
|
||||
<h4>This Page</h4>
|
||||
<ul class="toc">
|
||||
|
||||
<li><a href="#example">Example</a></li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-sm-9 doc-styling">
|
||||
|
||||
|
||||
<h1><i class="glyphicon glyphicon-info-sign"></i> <code class="obj">source</code></h1>
|
||||
|
||||
|
||||
|
||||
<ul class=page-meta>
|
||||
|
||||
<li>Property of <a href="../">Context</a></li>
|
||||
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
<p>The context is created for each target artifact. As most artifacts are
|
||||
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>
|
||||
|
||||
<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>
|
||||
</pre></div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="comment-box">
|
||||
<h2>Comments</h2>
|
||||
|
||||
<div id="disqus_thread"></div>
|
||||
<script>
|
||||
var disqus_config = function() { this.page.identifier = "/docs/api/build/context/source"; this.page.url = "https://www.getlektor.com/docs/api/build/context/source/"; };
|
||||
(function() {
|
||||
var d = document, s = d.createElement('script');
|
||||
s.src = '//lektordocumentation.disqus.com/embed.js';
|
||||
s.setAttribute('data-timestamp', +new Date());
|
||||
(d.head || d.body).appendChild(s);
|
||||
})();
|
||||
</script>
|
||||
<noscript>
|
||||
Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript"
|
||||
rel="nofollow">comments powered by Disqus.</a>
|
||||
</noscript>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="bottomsummary">
|
||||
<div class="container">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<footer>
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-sm-4 icon-bar">
|
||||
<a href="https://github.com/lektor/lektor/" title="Lektor on GitHub"
|
||||
><i class="fa fa-github"></i></a>
|
||||
<a href="https://github.com/lektor/lektor/issues/" title="Report Issues for Lektor"
|
||||
><i class="fa fa-bug"></i></a>
|
||||
<a href="https://twitter.com/getlektor" title="Find Lektor on Twitter"
|
||||
><i class="fa fa-twitter"></i></a>
|
||||
<a href="https://gitter.im/lektor/lektor" title="Chat on Gitter"
|
||||
><i class="fa fa-comment"></i></a>
|
||||
<a href="https://github.com/lektor/lektor-website/tree/master/content/docs/api/build/context/source/contents.lr" title="View source for this page"><i class="fa fa-code"></i></a>
|
||||
</div>
|
||||
<div class="col-sm-8">
|
||||
<a href="../../../../../license/">License & Copyright</a> •
|
||||
<a href="../../../../../contact/">Contact</a> •
|
||||
Made with <i class="fa fa-fw fa-heart" title="Heart"><span hidden>Heart</span></i> in Carinthia
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
|
||||
<script type=text/javascript src="../../../../../static/app.js?h=bb1b933a" charset="utf-8"></script>
|
||||
<script>
|
||||
((window.gitter = {}).chat = {}).options = {
|
||||
room: 'lektor/lektor',
|
||||
activationElement: null
|
||||
};
|
||||
document.write('<button class="js-gitter-toggle-chat-button">Toggle Chat</button>');
|
||||
var dnt = navigator.doNotTrack || window.doNotTrack || navigator.msDoNotTrack;
|
||||
if (dnt != "1" && dnt != "yes") {
|
||||
window.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments)};ga.l=+new Date;
|
||||
ga('create', 'UA-70822533-1', 'auto');
|
||||
ga('set', 'anonymizeIp', true);
|
||||
ga('send', 'pageview');
|
||||
} else {
|
||||
console.debug("Respecting Do-Not-Track, not running analytics.");
|
||||
}
|
||||
</script>
|
||||
<script async src='https://www.google-analytics.com/analytics.js'></script>
|
||||
<script async defer id="github-bjs" src="https://buttons.github.io/buttons.js"></script>
|
||||
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script>
|
||||
<script src="https://sidecar.gitter.im/dist/sidecar.v1.js" async defer></script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,323 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<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/pygments.css">
|
||||
<link rel="shortcut icon" href="../../../../../static/favicon.png?h=fa09bedd">
|
||||
<title>sub_artifact | Documentation | Lektor Static Content Management System</title>
|
||||
</head>
|
||||
<body class="default">
|
||||
<nav class="navbar navbar-inverse navbar-static-top">
|
||||
<div class="container">
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle collapsed"
|
||||
data-toggle="collapse" data-target="#navbar"
|
||||
aria-expanded="false" aria-controls="navbar">
|
||||
<span class="sr-only">Toggle navigation</span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<a class="navbar-brand" href="../../../../../">Lektor</a>
|
||||
</div>
|
||||
<div id="navbar" class="collapse navbar-collapse">
|
||||
<ul class="nav navbar-nav">
|
||||
|
||||
<li><a href="../../../../../downloads/">Download</a></li>
|
||||
|
||||
<li class="active"><a href="../../../../">Documentation</a></li>
|
||||
|
||||
<li><a href="../../../../../showcase/">Showcase</a></li>
|
||||
|
||||
<li><a href="../../../../../plugins/">Plugins</a></li>
|
||||
|
||||
<li><a href="../../../../../community/">Community</a></li>
|
||||
|
||||
<li><a href="../../../../../blog/">Blog</a></li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<div class="body-wrapper">
|
||||
|
||||
<div class="container">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-3">
|
||||
<ul class="tree-nav nocontent">
|
||||
<li><a href="../../../../">Welcome</a></li>
|
||||
|
||||
|
||||
<li><a href="../../../../what/">What is Lektor</a>
|
||||
|
||||
|
||||
<li><a href="../../../../installation/">Installation</a>
|
||||
|
||||
|
||||
<li><a href="../../../../quickstart/">Quickstart</a>
|
||||
|
||||
|
||||
<li><a href="../../../../project/">Project</a>
|
||||
|
||||
|
||||
<li><a href="../../../../content/">Content</a>
|
||||
|
||||
|
||||
<li><a href="../../../../templates/">Templates</a>
|
||||
|
||||
|
||||
<li><a href="../../../../themes/">Themes</a>
|
||||
|
||||
|
||||
<li><a href="../../../../guides/">Guides</a>
|
||||
|
||||
|
||||
<li><a href="../../../../deployment/">Deployment</a>
|
||||
|
||||
|
||||
<li><a href="../../../../plugins/">Plugins</a>
|
||||
|
||||
|
||||
<li><a href="../../../../models/">Data Modelling</a>
|
||||
|
||||
|
||||
<li><a href="../../../../cli/">Command Line</a>
|
||||
|
||||
|
||||
<li><a href="../../../">API</a>
|
||||
|
||||
<ul>
|
||||
<li><a href="../../">Build System</a>
|
||||
|
||||
<ul>
|
||||
<li><a href="../../artifact/">Artifact</a>
|
||||
|
||||
|
||||
<li><a href="../../program/">BuildProgram</a>
|
||||
|
||||
|
||||
<li><a href="../">Context</a>
|
||||
|
||||
<ul>
|
||||
<li><a href="../changed-base-url/">changed_base_url()</a>
|
||||
|
||||
|
||||
<li><a href="../gather-dependencies/">gather_dependencies()</a>
|
||||
|
||||
|
||||
<li><a href="../locale/">locale</a>
|
||||
|
||||
|
||||
<li><a href="../pad/">pad</a>
|
||||
|
||||
|
||||
<li><a href="../record/">record</a>
|
||||
|
||||
|
||||
<li><a href="../record-dependency/">record_dependency()</a>
|
||||
|
||||
|
||||
<li><a href="../source/">source</a>
|
||||
|
||||
|
||||
<li class="active"><a href="./">sub_artifact()</a>
|
||||
|
||||
<ul></ul>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<li><a href="../../get-ctx/">get_ctx()</a>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<li><a href="../../../databags/">Databags</a>
|
||||
|
||||
|
||||
<li><a href="../../../db/">Database</a>
|
||||
|
||||
|
||||
<li><a href="../../../environment/">Environment</a>
|
||||
|
||||
|
||||
<li><a href="../../../plugins/">Plugins</a>
|
||||
|
||||
|
||||
<li><a href="../../../project/">Project</a>
|
||||
|
||||
|
||||
<li><a href="../../../publisher/">Publisher</a>
|
||||
|
||||
|
||||
<li><a href="../../../templates/">Template API</a>
|
||||
|
||||
|
||||
<li><a href="../../../utils/">Utilities</a>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<li><a href="../../../../search/">Search</a>
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<div class="visible-md-block visible-lg-block">
|
||||
<h4>This Page</h4>
|
||||
<ul class="toc">
|
||||
|
||||
<li><a href="#example">Example</a></li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-sm-9 doc-styling">
|
||||
|
||||
|
||||
<h1><i class="glyphicon glyphicon-cog"></i> <code class="obj">sub_artifact</code> <span class="sig">(<code>artifact_name, sources=None, source_obj=None, config_hash=None</code>)</span></h1>
|
||||
|
||||
|
||||
|
||||
<ul class=page-meta>
|
||||
|
||||
<li>Method of <a href="../">Context</a></li>
|
||||
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
<p>This method can be used as Python decorator to inform the builder to create
|
||||
an artifact that is related to the current artifact but locally contained
|
||||
within it. For instance this is used to implement the thumbnailing and
|
||||
similar things.</p>
|
||||
<p>Each artifact needs at least a name which is what the final file will be
|
||||
called. For instance <code>/demo.css</code> would place an artifact named <code>demo.css</code>
|
||||
in the root folder. The <code>sources</code> is an optional list of files that indicate
|
||||
that they are responsible for creating this artifact. It can be left empty
|
||||
in which case the artifact just tracks the current file. The <code>source_obj</code>
|
||||
can optionally point to a source object but for most plugins this will never
|
||||
be set.</p>
|
||||
<p>The artifact passed to the function is then the <a href="../../artifact/" class="ref">Artifact</a>
|
||||
object for modification. Note that the function will not be invoked if the
|
||||
artifact is already considered up to date.</p>
|
||||
<p>In addition a <code>config_hash</code> can be provided with can be a hash value. If
|
||||
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>
|
||||
<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>
|
||||
|
||||
<span class="k">def</span> <span class="nf">setup_env</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="o">**</span><span class="n">extra</span><span class="p">):</span>
|
||||
<span class="k">def</span> <span class="nf">get_css</span><span class="p">(</span><span class="n">artifact_name</span><span class="o">=</span><span class="s1">'/demo.css'</span><span class="p">):</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="n">artifact_name</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">'w'</span><span class="p">)</span> <span class="k">as</span> <span class="n">f</span><span class="p">:</span>
|
||||
<span class="n">f</span><span class="o">.</span><span class="n">write</span><span class="p">(</span><span class="s1">'body { background: red; }</span><span class="se">\n</span><span class="s1">'</span><span class="p">)</span>
|
||||
<span class="k">return</span> <span class="n">artifact_name</span>
|
||||
<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">'get_demo_css'</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"><</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">"</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">"</span><span class="p">></span>
|
||||
</pre></div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="comment-box">
|
||||
<h2>Comments</h2>
|
||||
|
||||
<div id="disqus_thread"></div>
|
||||
<script>
|
||||
var disqus_config = function() { this.page.identifier = "/docs/api/build/context/sub-artifact"; this.page.url = "https://www.getlektor.com/docs/api/build/context/sub-artifact/"; };
|
||||
(function() {
|
||||
var d = document, s = d.createElement('script');
|
||||
s.src = '//lektordocumentation.disqus.com/embed.js';
|
||||
s.setAttribute('data-timestamp', +new Date());
|
||||
(d.head || d.body).appendChild(s);
|
||||
})();
|
||||
</script>
|
||||
<noscript>
|
||||
Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript"
|
||||
rel="nofollow">comments powered by Disqus.</a>
|
||||
</noscript>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="bottomsummary">
|
||||
<div class="container">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<footer>
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-sm-4 icon-bar">
|
||||
<a href="https://github.com/lektor/lektor/" title="Lektor on GitHub"
|
||||
><i class="fa fa-github"></i></a>
|
||||
<a href="https://github.com/lektor/lektor/issues/" title="Report Issues for Lektor"
|
||||
><i class="fa fa-bug"></i></a>
|
||||
<a href="https://twitter.com/getlektor" title="Find Lektor on Twitter"
|
||||
><i class="fa fa-twitter"></i></a>
|
||||
<a href="https://gitter.im/lektor/lektor" title="Chat on Gitter"
|
||||
><i class="fa fa-comment"></i></a>
|
||||
<a href="https://github.com/lektor/lektor-website/tree/master/content/docs/api/build/context/sub-artifact/contents.lr" title="View source for this page"><i class="fa fa-code"></i></a>
|
||||
</div>
|
||||
<div class="col-sm-8">
|
||||
<a href="../../../../../license/">License & Copyright</a> •
|
||||
<a href="../../../../../contact/">Contact</a> •
|
||||
Made with <i class="fa fa-fw fa-heart" title="Heart"><span hidden>Heart</span></i> in Carinthia
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
|
||||
<script type=text/javascript src="../../../../../static/app.js?h=bb1b933a" charset="utf-8"></script>
|
||||
<script>
|
||||
((window.gitter = {}).chat = {}).options = {
|
||||
room: 'lektor/lektor',
|
||||
activationElement: null
|
||||
};
|
||||
document.write('<button class="js-gitter-toggle-chat-button">Toggle Chat</button>');
|
||||
var dnt = navigator.doNotTrack || window.doNotTrack || navigator.msDoNotTrack;
|
||||
if (dnt != "1" && dnt != "yes") {
|
||||
window.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments)};ga.l=+new Date;
|
||||
ga('create', 'UA-70822533-1', 'auto');
|
||||
ga('set', 'anonymizeIp', true);
|
||||
ga('send', 'pageview');
|
||||
} else {
|
||||
console.debug("Respecting Do-Not-Track, not running analytics.");
|
||||
}
|
||||
</script>
|
||||
<script async src='https://www.google-analytics.com/analytics.js'></script>
|
||||
<script async defer id="github-bjs" src="https://buttons.github.io/buttons.js"></script>
|
||||
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script>
|
||||
<script src="https://sidecar.gitter.im/dist/sidecar.v1.js" async defer></script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,270 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<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/pygments.css">
|
||||
<link rel="shortcut icon" href="../../../../static/favicon.png?h=fa09bedd">
|
||||
<title>get_ctx | Documentation | Lektor Static Content Management System</title>
|
||||
</head>
|
||||
<body class="default">
|
||||
<nav class="navbar navbar-inverse navbar-static-top">
|
||||
<div class="container">
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle collapsed"
|
||||
data-toggle="collapse" data-target="#navbar"
|
||||
aria-expanded="false" aria-controls="navbar">
|
||||
<span class="sr-only">Toggle navigation</span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<a class="navbar-brand" href="../../../../">Lektor</a>
|
||||
</div>
|
||||
<div id="navbar" class="collapse navbar-collapse">
|
||||
<ul class="nav navbar-nav">
|
||||
|
||||
<li><a href="../../../../downloads/">Download</a></li>
|
||||
|
||||
<li class="active"><a href="../../../">Documentation</a></li>
|
||||
|
||||
<li><a href="../../../../showcase/">Showcase</a></li>
|
||||
|
||||
<li><a href="../../../../plugins/">Plugins</a></li>
|
||||
|
||||
<li><a href="../../../../community/">Community</a></li>
|
||||
|
||||
<li><a href="../../../../blog/">Blog</a></li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<div class="body-wrapper">
|
||||
|
||||
<div class="container">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-3">
|
||||
<ul class="tree-nav nocontent">
|
||||
<li><a href="../../../">Welcome</a></li>
|
||||
|
||||
|
||||
<li><a href="../../../what/">What is Lektor</a>
|
||||
|
||||
|
||||
<li><a href="../../../installation/">Installation</a>
|
||||
|
||||
|
||||
<li><a href="../../../quickstart/">Quickstart</a>
|
||||
|
||||
|
||||
<li><a href="../../../project/">Project</a>
|
||||
|
||||
|
||||
<li><a href="../../../content/">Content</a>
|
||||
|
||||
|
||||
<li><a href="../../../templates/">Templates</a>
|
||||
|
||||
|
||||
<li><a href="../../../themes/">Themes</a>
|
||||
|
||||
|
||||
<li><a href="../../../guides/">Guides</a>
|
||||
|
||||
|
||||
<li><a href="../../../deployment/">Deployment</a>
|
||||
|
||||
|
||||
<li><a href="../../../plugins/">Plugins</a>
|
||||
|
||||
|
||||
<li><a href="../../../models/">Data Modelling</a>
|
||||
|
||||
|
||||
<li><a href="../../../cli/">Command Line</a>
|
||||
|
||||
|
||||
<li><a href="../../">API</a>
|
||||
|
||||
<ul>
|
||||
<li><a href="../">Build System</a>
|
||||
|
||||
<ul>
|
||||
<li><a href="../artifact/">Artifact</a>
|
||||
|
||||
|
||||
<li><a href="../program/">BuildProgram</a>
|
||||
|
||||
|
||||
<li><a href="../context/">Context</a>
|
||||
|
||||
|
||||
<li class="active"><a href="./">get_ctx()</a>
|
||||
|
||||
<ul></ul>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<li><a href="../../databags/">Databags</a>
|
||||
|
||||
|
||||
<li><a href="../../db/">Database</a>
|
||||
|
||||
|
||||
<li><a href="../../environment/">Environment</a>
|
||||
|
||||
|
||||
<li><a href="../../plugins/">Plugins</a>
|
||||
|
||||
|
||||
<li><a href="../../project/">Project</a>
|
||||
|
||||
|
||||
<li><a href="../../publisher/">Publisher</a>
|
||||
|
||||
|
||||
<li><a href="../../templates/">Template API</a>
|
||||
|
||||
|
||||
<li><a href="../../utils/">Utilities</a>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<li><a href="../../../search/">Search</a>
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<div class="visible-md-block visible-lg-block">
|
||||
<h4>This Page</h4>
|
||||
<ul class="toc">
|
||||
|
||||
<li><a href="#example">Example</a></li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-sm-9 doc-styling">
|
||||
|
||||
|
||||
<h1><i class="glyphicon glyphicon-cog"></i> <code class="mod">lektor.context.</code><code class="obj">get_ctx</code> <span class="sig">(<code></code>)</span></h1>
|
||||
|
||||
|
||||
|
||||
<ul class=page-meta>
|
||||
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
<p>This function returns the currently active <a href="../context/" class="ref">Build Context</a>
|
||||
or <code>None</code> if no context is active. This is the main method to access the
|
||||
context. Generally the context is available if a build is active and <code>None</code>
|
||||
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>
|
||||
|
||||
<span class="n">ctx</span> <span class="o">=</span> <span class="n">get_ctx</span><span class="p">()</span>
|
||||
</pre></div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="comment-box">
|
||||
<h2>Comments</h2>
|
||||
|
||||
<div id="disqus_thread"></div>
|
||||
<script>
|
||||
var disqus_config = function() { this.page.identifier = "/docs/api/build/get-ctx"; this.page.url = "https://www.getlektor.com/docs/api/build/get-ctx/"; };
|
||||
(function() {
|
||||
var d = document, s = d.createElement('script');
|
||||
s.src = '//lektordocumentation.disqus.com/embed.js';
|
||||
s.setAttribute('data-timestamp', +new Date());
|
||||
(d.head || d.body).appendChild(s);
|
||||
})();
|
||||
</script>
|
||||
<noscript>
|
||||
Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript"
|
||||
rel="nofollow">comments powered by Disqus.</a>
|
||||
</noscript>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="bottomsummary">
|
||||
<div class="container">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<footer>
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-sm-4 icon-bar">
|
||||
<a href="https://github.com/lektor/lektor/" title="Lektor on GitHub"
|
||||
><i class="fa fa-github"></i></a>
|
||||
<a href="https://github.com/lektor/lektor/issues/" title="Report Issues for Lektor"
|
||||
><i class="fa fa-bug"></i></a>
|
||||
<a href="https://twitter.com/getlektor" title="Find Lektor on Twitter"
|
||||
><i class="fa fa-twitter"></i></a>
|
||||
<a href="https://gitter.im/lektor/lektor" title="Chat on Gitter"
|
||||
><i class="fa fa-comment"></i></a>
|
||||
<a href="https://github.com/lektor/lektor-website/tree/master/content/docs/api/build/get-ctx/contents.lr" title="View source for this page"><i class="fa fa-code"></i></a>
|
||||
</div>
|
||||
<div class="col-sm-8">
|
||||
<a href="../../../../license/">License & Copyright</a> •
|
||||
<a href="../../../../contact/">Contact</a> •
|
||||
Made with <i class="fa fa-fw fa-heart" title="Heart"><span hidden>Heart</span></i> in Carinthia
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
|
||||
<script type=text/javascript src="../../../../static/app.js?h=bb1b933a" charset="utf-8"></script>
|
||||
<script>
|
||||
((window.gitter = {}).chat = {}).options = {
|
||||
room: 'lektor/lektor',
|
||||
activationElement: null
|
||||
};
|
||||
document.write('<button class="js-gitter-toggle-chat-button">Toggle Chat</button>');
|
||||
var dnt = navigator.doNotTrack || window.doNotTrack || navigator.msDoNotTrack;
|
||||
if (dnt != "1" && dnt != "yes") {
|
||||
window.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments)};ga.l=+new Date;
|
||||
ga('create', 'UA-70822533-1', 'auto');
|
||||
ga('set', 'anonymizeIp', true);
|
||||
ga('send', 'pageview');
|
||||
} else {
|
||||
console.debug("Respecting Do-Not-Track, not running analytics.");
|
||||
}
|
||||
</script>
|
||||
<script async src='https://www.google-analytics.com/analytics.js'></script>
|
||||
<script async defer id="github-bjs" src="https://buttons.github.io/buttons.js"></script>
|
||||
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script>
|
||||
<script src="https://sidecar.gitter.im/dist/sidecar.v1.js" async defer></script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,303 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<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/pygments.css">
|
||||
<link rel="shortcut icon" href="../../../static/favicon.png?h=fa09bedd">
|
||||
<title>Build System | Documentation | Lektor Static Content Management System</title>
|
||||
</head>
|
||||
<body class="default">
|
||||
<nav class="navbar navbar-inverse navbar-static-top">
|
||||
<div class="container">
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle collapsed"
|
||||
data-toggle="collapse" data-target="#navbar"
|
||||
aria-expanded="false" aria-controls="navbar">
|
||||
<span class="sr-only">Toggle navigation</span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<a class="navbar-brand" href="../../../">Lektor</a>
|
||||
</div>
|
||||
<div id="navbar" class="collapse navbar-collapse">
|
||||
<ul class="nav navbar-nav">
|
||||
|
||||
<li><a href="../../../downloads/">Download</a></li>
|
||||
|
||||
<li class="active"><a href="../../">Documentation</a></li>
|
||||
|
||||
<li><a href="../../../showcase/">Showcase</a></li>
|
||||
|
||||
<li><a href="../../../plugins/">Plugins</a></li>
|
||||
|
||||
<li><a href="../../../community/">Community</a></li>
|
||||
|
||||
<li><a href="../../../blog/">Blog</a></li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<div class="body-wrapper">
|
||||
|
||||
<div class="container">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-3">
|
||||
<ul class="tree-nav nocontent">
|
||||
<li><a href="../../">Welcome</a></li>
|
||||
|
||||
|
||||
<li><a href="../../what/">What is Lektor</a>
|
||||
|
||||
|
||||
<li><a href="../../installation/">Installation</a>
|
||||
|
||||
|
||||
<li><a href="../../quickstart/">Quickstart</a>
|
||||
|
||||
|
||||
<li><a href="../../project/">Project</a>
|
||||
|
||||
|
||||
<li><a href="../../content/">Content</a>
|
||||
|
||||
|
||||
<li><a href="../../templates/">Templates</a>
|
||||
|
||||
|
||||
<li><a href="../../themes/">Themes</a>
|
||||
|
||||
|
||||
<li><a href="../../guides/">Guides</a>
|
||||
|
||||
|
||||
<li><a href="../../deployment/">Deployment</a>
|
||||
|
||||
|
||||
<li><a href="../../plugins/">Plugins</a>
|
||||
|
||||
|
||||
<li><a href="../../models/">Data Modelling</a>
|
||||
|
||||
|
||||
<li><a href="../../cli/">Command Line</a>
|
||||
|
||||
|
||||
<li><a href="../">API</a>
|
||||
|
||||
<ul>
|
||||
<li class="active"><a href="./">Build System</a>
|
||||
|
||||
<ul>
|
||||
<li><a href="artifact/">Artifact</a>
|
||||
|
||||
|
||||
<li><a href="program/">BuildProgram</a>
|
||||
|
||||
|
||||
<li><a href="context/">Context</a>
|
||||
|
||||
|
||||
<li><a href="get-ctx/">get_ctx()</a>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<li><a href="../databags/">Databags</a>
|
||||
|
||||
|
||||
<li><a href="../db/">Database</a>
|
||||
|
||||
|
||||
<li><a href="../environment/">Environment</a>
|
||||
|
||||
|
||||
<li><a href="../plugins/">Plugins</a>
|
||||
|
||||
|
||||
<li><a href="../project/">Project</a>
|
||||
|
||||
|
||||
<li><a href="../publisher/">Publisher</a>
|
||||
|
||||
|
||||
<li><a href="../templates/">Template API</a>
|
||||
|
||||
|
||||
<li><a href="../utils/">Utilities</a>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<li><a href="../../search/">Search</a>
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-sm-9 doc-styling">
|
||||
|
||||
|
||||
<h1>Build System</h1>
|
||||
|
||||
|
||||
|
||||
<ul class=page-meta>
|
||||
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
<p>The build system in Lektor is what is responsible for converting the source
|
||||
files into the final website. Parts of it are currently documented so that
|
||||
the plugin system can interact with it.</p>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="child-pages nocontent">
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-6 child">
|
||||
<h4>
|
||||
<i class="glyphicon glyphicon-leaf"></i>
|
||||
<a href="artifact/">Artifact</a>
|
||||
</h4>
|
||||
|
||||
<p class="summary">Represents an artifact during the build process.</p>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-md-6 child">
|
||||
<h4>
|
||||
<i class="glyphicon glyphicon-leaf"></i>
|
||||
<a href="program/">BuildProgram</a>
|
||||
</h4>
|
||||
|
||||
<p class="summary">The class for build programs.</p>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-6 child">
|
||||
<h4>
|
||||
<i class="glyphicon glyphicon-leaf"></i>
|
||||
<a href="context/">Context</a>
|
||||
</h4>
|
||||
|
||||
<p class="summary">Provides context information for the current build.</p>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-md-6 child">
|
||||
<h4>
|
||||
<i class="glyphicon glyphicon-cog"></i>
|
||||
<a href="get-ctx/">get_ctx()</a>
|
||||
</h4>
|
||||
|
||||
<p class="summary">Returns the currently active build context.</p>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="comment-box">
|
||||
<h2>Comments</h2>
|
||||
|
||||
<div id="disqus_thread"></div>
|
||||
<script>
|
||||
var disqus_config = function() { this.page.identifier = "/docs/api/build"; this.page.url = "https://www.getlektor.com/docs/api/build/"; };
|
||||
(function() {
|
||||
var d = document, s = d.createElement('script');
|
||||
s.src = '//lektordocumentation.disqus.com/embed.js';
|
||||
s.setAttribute('data-timestamp', +new Date());
|
||||
(d.head || d.body).appendChild(s);
|
||||
})();
|
||||
</script>
|
||||
<noscript>
|
||||
Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript"
|
||||
rel="nofollow">comments powered by Disqus.</a>
|
||||
</noscript>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="bottomsummary">
|
||||
<div class="container">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<footer>
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-sm-4 icon-bar">
|
||||
<a href="https://github.com/lektor/lektor/" title="Lektor on GitHub"
|
||||
><i class="fa fa-github"></i></a>
|
||||
<a href="https://github.com/lektor/lektor/issues/" title="Report Issues for Lektor"
|
||||
><i class="fa fa-bug"></i></a>
|
||||
<a href="https://twitter.com/getlektor" title="Find Lektor on Twitter"
|
||||
><i class="fa fa-twitter"></i></a>
|
||||
<a href="https://gitter.im/lektor/lektor" title="Chat on Gitter"
|
||||
><i class="fa fa-comment"></i></a>
|
||||
<a href="https://github.com/lektor/lektor-website/tree/master/content/docs/api/build/contents.lr" title="View source for this page"><i class="fa fa-code"></i></a>
|
||||
</div>
|
||||
<div class="col-sm-8">
|
||||
<a href="../../../license/">License & Copyright</a> •
|
||||
<a href="../../../contact/">Contact</a> •
|
||||
Made with <i class="fa fa-fw fa-heart" title="Heart"><span hidden>Heart</span></i> in Carinthia
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
|
||||
<script type=text/javascript src="../../../static/app.js?h=bb1b933a" charset="utf-8"></script>
|
||||
<script>
|
||||
((window.gitter = {}).chat = {}).options = {
|
||||
room: 'lektor/lektor',
|
||||
activationElement: null
|
||||
};
|
||||
document.write('<button class="js-gitter-toggle-chat-button">Toggle Chat</button>');
|
||||
var dnt = navigator.doNotTrack || window.doNotTrack || navigator.msDoNotTrack;
|
||||
if (dnt != "1" && dnt != "yes") {
|
||||
window.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments)};ga.l=+new Date;
|
||||
ga('create', 'UA-70822533-1', 'auto');
|
||||
ga('set', 'anonymizeIp', true);
|
||||
ga('send', 'pageview');
|
||||
} else {
|
||||
console.debug("Respecting Do-Not-Track, not running analytics.");
|
||||
}
|
||||
</script>
|
||||
<script async src='https://www.google-analytics.com/analytics.js'></script>
|
||||
<script async defer id="github-bjs" src="https://buttons.github.io/buttons.js"></script>
|
||||
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script>
|
||||
<script src="https://sidecar.gitter.im/dist/sidecar.v1.js" async defer></script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,273 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<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/pygments.css">
|
||||
<link rel="shortcut icon" href="../../../../../static/favicon.png?h=fa09bedd">
|
||||
<title>build_artifact | Documentation | Lektor Static Content Management System</title>
|
||||
</head>
|
||||
<body class="default">
|
||||
<nav class="navbar navbar-inverse navbar-static-top">
|
||||
<div class="container">
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle collapsed"
|
||||
data-toggle="collapse" data-target="#navbar"
|
||||
aria-expanded="false" aria-controls="navbar">
|
||||
<span class="sr-only">Toggle navigation</span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<a class="navbar-brand" href="../../../../../">Lektor</a>
|
||||
</div>
|
||||
<div id="navbar" class="collapse navbar-collapse">
|
||||
<ul class="nav navbar-nav">
|
||||
|
||||
<li><a href="../../../../../downloads/">Download</a></li>
|
||||
|
||||
<li class="active"><a href="../../../../">Documentation</a></li>
|
||||
|
||||
<li><a href="../../../../../showcase/">Showcase</a></li>
|
||||
|
||||
<li><a href="../../../../../plugins/">Plugins</a></li>
|
||||
|
||||
<li><a href="../../../../../community/">Community</a></li>
|
||||
|
||||
<li><a href="../../../../../blog/">Blog</a></li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<div class="body-wrapper">
|
||||
|
||||
<div class="container">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-3">
|
||||
<ul class="tree-nav nocontent">
|
||||
<li><a href="../../../../">Welcome</a></li>
|
||||
|
||||
|
||||
<li><a href="../../../../what/">What is Lektor</a>
|
||||
|
||||
|
||||
<li><a href="../../../../installation/">Installation</a>
|
||||
|
||||
|
||||
<li><a href="../../../../quickstart/">Quickstart</a>
|
||||
|
||||
|
||||
<li><a href="../../../../project/">Project</a>
|
||||
|
||||
|
||||
<li><a href="../../../../content/">Content</a>
|
||||
|
||||
|
||||
<li><a href="../../../../templates/">Templates</a>
|
||||
|
||||
|
||||
<li><a href="../../../../themes/">Themes</a>
|
||||
|
||||
|
||||
<li><a href="../../../../guides/">Guides</a>
|
||||
|
||||
|
||||
<li><a href="../../../../deployment/">Deployment</a>
|
||||
|
||||
|
||||
<li><a href="../../../../plugins/">Plugins</a>
|
||||
|
||||
|
||||
<li><a href="../../../../models/">Data Modelling</a>
|
||||
|
||||
|
||||
<li><a href="../../../../cli/">Command Line</a>
|
||||
|
||||
|
||||
<li><a href="../../../">API</a>
|
||||
|
||||
<ul>
|
||||
<li><a href="../../">Build System</a>
|
||||
|
||||
<ul>
|
||||
<li><a href="../../artifact/">Artifact</a>
|
||||
|
||||
|
||||
<li><a href="../">BuildProgram</a>
|
||||
|
||||
<ul>
|
||||
<li class="active"><a href="./">build_artifact()</a>
|
||||
|
||||
<ul></ul>
|
||||
|
||||
|
||||
<li><a href="../declare-artifact/">declare_artifact()</a>
|
||||
|
||||
|
||||
<li><a href="../iter-child-sources/">iter_child_sources()</a>
|
||||
|
||||
|
||||
<li><a href="../produce-artifacts/">produce_artifacts()</a>
|
||||
|
||||
|
||||
<li><a href="../source/">source</a>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<li><a href="../../context/">Context</a>
|
||||
|
||||
|
||||
<li><a href="../../get-ctx/">get_ctx()</a>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<li><a href="../../../databags/">Databags</a>
|
||||
|
||||
|
||||
<li><a href="../../../db/">Database</a>
|
||||
|
||||
|
||||
<li><a href="../../../environment/">Environment</a>
|
||||
|
||||
|
||||
<li><a href="../../../plugins/">Plugins</a>
|
||||
|
||||
|
||||
<li><a href="../../../project/">Project</a>
|
||||
|
||||
|
||||
<li><a href="../../../publisher/">Publisher</a>
|
||||
|
||||
|
||||
<li><a href="../../../templates/">Template API</a>
|
||||
|
||||
|
||||
<li><a href="../../../utils/">Utilities</a>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<li><a href="../../../../search/">Search</a>
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-sm-9 doc-styling">
|
||||
|
||||
|
||||
<h1><i class="glyphicon glyphicon-cog"></i> <code class="obj">build_artifact</code> <span class="sig">(<code>artifact</code>)</span></h1>
|
||||
|
||||
|
||||
|
||||
<ul class=page-meta>
|
||||
|
||||
<li>Method of <a href="../">BuildProgram</a></li>
|
||||
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
<p>This method is invoked for previously declared artifacts and is supposed to
|
||||
write out the artifact. It's only invoked if the builder decided that the
|
||||
artifact is outdated based on the information at hand.</p>
|
||||
<p>For an example refer to the <a href="../../../environment/add-build-program/" class="ref">add_build_program</a> documentation.</p>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="comment-box">
|
||||
<h2>Comments</h2>
|
||||
|
||||
<div id="disqus_thread"></div>
|
||||
<script>
|
||||
var disqus_config = function() { this.page.identifier = "/docs/api/build/program/build-artifact"; this.page.url = "https://www.getlektor.com/docs/api/build/program/build-artifact/"; };
|
||||
(function() {
|
||||
var d = document, s = d.createElement('script');
|
||||
s.src = '//lektordocumentation.disqus.com/embed.js';
|
||||
s.setAttribute('data-timestamp', +new Date());
|
||||
(d.head || d.body).appendChild(s);
|
||||
})();
|
||||
</script>
|
||||
<noscript>
|
||||
Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript"
|
||||
rel="nofollow">comments powered by Disqus.</a>
|
||||
</noscript>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="bottomsummary">
|
||||
<div class="container">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<footer>
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-sm-4 icon-bar">
|
||||
<a href="https://github.com/lektor/lektor/" title="Lektor on GitHub"
|
||||
><i class="fa fa-github"></i></a>
|
||||
<a href="https://github.com/lektor/lektor/issues/" title="Report Issues for Lektor"
|
||||
><i class="fa fa-bug"></i></a>
|
||||
<a href="https://twitter.com/getlektor" title="Find Lektor on Twitter"
|
||||
><i class="fa fa-twitter"></i></a>
|
||||
<a href="https://gitter.im/lektor/lektor" title="Chat on Gitter"
|
||||
><i class="fa fa-comment"></i></a>
|
||||
<a href="https://github.com/lektor/lektor-website/tree/master/content/docs/api/build/program/build-artifact/contents.lr" title="View source for this page"><i class="fa fa-code"></i></a>
|
||||
</div>
|
||||
<div class="col-sm-8">
|
||||
<a href="../../../../../license/">License & Copyright</a> •
|
||||
<a href="../../../../../contact/">Contact</a> •
|
||||
Made with <i class="fa fa-fw fa-heart" title="Heart"><span hidden>Heart</span></i> in Carinthia
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
|
||||
<script type=text/javascript src="../../../../../static/app.js?h=bb1b933a" charset="utf-8"></script>
|
||||
<script>
|
||||
((window.gitter = {}).chat = {}).options = {
|
||||
room: 'lektor/lektor',
|
||||
activationElement: null
|
||||
};
|
||||
document.write('<button class="js-gitter-toggle-chat-button">Toggle Chat</button>');
|
||||
var dnt = navigator.doNotTrack || window.doNotTrack || navigator.msDoNotTrack;
|
||||
if (dnt != "1" && dnt != "yes") {
|
||||
window.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments)};ga.l=+new Date;
|
||||
ga('create', 'UA-70822533-1', 'auto');
|
||||
ga('set', 'anonymizeIp', true);
|
||||
ga('send', 'pageview');
|
||||
} else {
|
||||
console.debug("Respecting Do-Not-Track, not running analytics.");
|
||||
}
|
||||
</script>
|
||||
<script async src='https://www.google-analytics.com/analytics.js'></script>
|
||||
<script async defer id="github-bjs" src="https://buttons.github.io/buttons.js"></script>
|
||||
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script>
|
||||
<script src="https://sidecar.gitter.im/dist/sidecar.v1.js" async defer></script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,281 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<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/pygments.css">
|
||||
<link rel="shortcut icon" href="../../../../../static/favicon.png?h=fa09bedd">
|
||||
<title>declare_artifact | Documentation | Lektor Static Content Management System</title>
|
||||
</head>
|
||||
<body class="default">
|
||||
<nav class="navbar navbar-inverse navbar-static-top">
|
||||
<div class="container">
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle collapsed"
|
||||
data-toggle="collapse" data-target="#navbar"
|
||||
aria-expanded="false" aria-controls="navbar">
|
||||
<span class="sr-only">Toggle navigation</span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<a class="navbar-brand" href="../../../../../">Lektor</a>
|
||||
</div>
|
||||
<div id="navbar" class="collapse navbar-collapse">
|
||||
<ul class="nav navbar-nav">
|
||||
|
||||
<li><a href="../../../../../downloads/">Download</a></li>
|
||||
|
||||
<li class="active"><a href="../../../../">Documentation</a></li>
|
||||
|
||||
<li><a href="../../../../../showcase/">Showcase</a></li>
|
||||
|
||||
<li><a href="../../../../../plugins/">Plugins</a></li>
|
||||
|
||||
<li><a href="../../../../../community/">Community</a></li>
|
||||
|
||||
<li><a href="../../../../../blog/">Blog</a></li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<div class="body-wrapper">
|
||||
|
||||
<div class="container">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-3">
|
||||
<ul class="tree-nav nocontent">
|
||||
<li><a href="../../../../">Welcome</a></li>
|
||||
|
||||
|
||||
<li><a href="../../../../what/">What is Lektor</a>
|
||||
|
||||
|
||||
<li><a href="../../../../installation/">Installation</a>
|
||||
|
||||
|
||||
<li><a href="../../../../quickstart/">Quickstart</a>
|
||||
|
||||
|
||||
<li><a href="../../../../project/">Project</a>
|
||||
|
||||
|
||||
<li><a href="../../../../content/">Content</a>
|
||||
|
||||
|
||||
<li><a href="../../../../templates/">Templates</a>
|
||||
|
||||
|
||||
<li><a href="../../../../themes/">Themes</a>
|
||||
|
||||
|
||||
<li><a href="../../../../guides/">Guides</a>
|
||||
|
||||
|
||||
<li><a href="../../../../deployment/">Deployment</a>
|
||||
|
||||
|
||||
<li><a href="../../../../plugins/">Plugins</a>
|
||||
|
||||
|
||||
<li><a href="../../../../models/">Data Modelling</a>
|
||||
|
||||
|
||||
<li><a href="../../../../cli/">Command Line</a>
|
||||
|
||||
|
||||
<li><a href="../../../">API</a>
|
||||
|
||||
<ul>
|
||||
<li><a href="../../">Build System</a>
|
||||
|
||||
<ul>
|
||||
<li><a href="../../artifact/">Artifact</a>
|
||||
|
||||
|
||||
<li><a href="../">BuildProgram</a>
|
||||
|
||||
<ul>
|
||||
<li><a href="../build-artifact/">build_artifact()</a>
|
||||
|
||||
|
||||
<li class="active"><a href="./">declare_artifact()</a>
|
||||
|
||||
<ul></ul>
|
||||
|
||||
|
||||
<li><a href="../iter-child-sources/">iter_child_sources()</a>
|
||||
|
||||
|
||||
<li><a href="../produce-artifacts/">produce_artifacts()</a>
|
||||
|
||||
|
||||
<li><a href="../source/">source</a>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<li><a href="../../context/">Context</a>
|
||||
|
||||
|
||||
<li><a href="../../get-ctx/">get_ctx()</a>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<li><a href="../../../databags/">Databags</a>
|
||||
|
||||
|
||||
<li><a href="../../../db/">Database</a>
|
||||
|
||||
|
||||
<li><a href="../../../environment/">Environment</a>
|
||||
|
||||
|
||||
<li><a href="../../../plugins/">Plugins</a>
|
||||
|
||||
|
||||
<li><a href="../../../project/">Project</a>
|
||||
|
||||
|
||||
<li><a href="../../../publisher/">Publisher</a>
|
||||
|
||||
|
||||
<li><a href="../../../templates/">Template API</a>
|
||||
|
||||
|
||||
<li><a href="../../../utils/">Utilities</a>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<li><a href="../../../../search/">Search</a>
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-sm-9 doc-styling">
|
||||
|
||||
|
||||
<h1><i class="glyphicon glyphicon-cog"></i> <code class="obj">declare_artifact</code> <span class="sig">(<code>artifact_name, sources=None, extra=None</code>)</span></h1>
|
||||
|
||||
|
||||
|
||||
<ul class=page-meta>
|
||||
|
||||
<li>Method of <a href="../">BuildProgram</a></li>
|
||||
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
<p>This method is supposed to be called from <a href="../produce-artifacts/" class="ref">produce_artifacts</a>. For each of these invocations the builder will
|
||||
later invoke the <a href="../build-artifact/" class="ref">build_artifact</a> function.</p>
|
||||
<p>The parameters behave as follows:</p>
|
||||
<ul>
|
||||
<li><code>artifact_name</code>: the name of the final artifact that will be built. This
|
||||
will be converted into a filename appropriate for the operating system
|
||||
automatically and should thus always use forward slashes.</li>
|
||||
<li><code>sources</code>: a list of source filenames that make up the artifact. This will
|
||||
be tracked as main indication about how artifacts change.</li>
|
||||
<li><code>extra</code>: arbitrary extra information that is associated with the artifact so
|
||||
that <a href="../build-artifact/" class="ref">build_artifact</a> can use it.</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="comment-box">
|
||||
<h2>Comments</h2>
|
||||
|
||||
<div id="disqus_thread"></div>
|
||||
<script>
|
||||
var disqus_config = function() { this.page.identifier = "/docs/api/build/program/declare-artifact"; this.page.url = "https://www.getlektor.com/docs/api/build/program/declare-artifact/"; };
|
||||
(function() {
|
||||
var d = document, s = d.createElement('script');
|
||||
s.src = '//lektordocumentation.disqus.com/embed.js';
|
||||
s.setAttribute('data-timestamp', +new Date());
|
||||
(d.head || d.body).appendChild(s);
|
||||
})();
|
||||
</script>
|
||||
<noscript>
|
||||
Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript"
|
||||
rel="nofollow">comments powered by Disqus.</a>
|
||||
</noscript>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="bottomsummary">
|
||||
<div class="container">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<footer>
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-sm-4 icon-bar">
|
||||
<a href="https://github.com/lektor/lektor/" title="Lektor on GitHub"
|
||||
><i class="fa fa-github"></i></a>
|
||||
<a href="https://github.com/lektor/lektor/issues/" title="Report Issues for Lektor"
|
||||
><i class="fa fa-bug"></i></a>
|
||||
<a href="https://twitter.com/getlektor" title="Find Lektor on Twitter"
|
||||
><i class="fa fa-twitter"></i></a>
|
||||
<a href="https://gitter.im/lektor/lektor" title="Chat on Gitter"
|
||||
><i class="fa fa-comment"></i></a>
|
||||
<a href="https://github.com/lektor/lektor-website/tree/master/content/docs/api/build/program/declare-artifact/contents.lr" title="View source for this page"><i class="fa fa-code"></i></a>
|
||||
</div>
|
||||
<div class="col-sm-8">
|
||||
<a href="../../../../../license/">License & Copyright</a> •
|
||||
<a href="../../../../../contact/">Contact</a> •
|
||||
Made with <i class="fa fa-fw fa-heart" title="Heart"><span hidden>Heart</span></i> in Carinthia
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
|
||||
<script type=text/javascript src="../../../../../static/app.js?h=bb1b933a" charset="utf-8"></script>
|
||||
<script>
|
||||
((window.gitter = {}).chat = {}).options = {
|
||||
room: 'lektor/lektor',
|
||||
activationElement: null
|
||||
};
|
||||
document.write('<button class="js-gitter-toggle-chat-button">Toggle Chat</button>');
|
||||
var dnt = navigator.doNotTrack || window.doNotTrack || navigator.msDoNotTrack;
|
||||
if (dnt != "1" && dnt != "yes") {
|
||||
window.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments)};ga.l=+new Date;
|
||||
ga('create', 'UA-70822533-1', 'auto');
|
||||
ga('set', 'anonymizeIp', true);
|
||||
ga('send', 'pageview');
|
||||
} else {
|
||||
console.debug("Respecting Do-Not-Track, not running analytics.");
|
||||
}
|
||||
</script>
|
||||
<script async src='https://www.google-analytics.com/analytics.js'></script>
|
||||
<script async defer id="github-bjs" src="https://buttons.github.io/buttons.js"></script>
|
||||
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script>
|
||||
<script src="https://sidecar.gitter.im/dist/sidecar.v1.js" async defer></script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,339 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<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/pygments.css">
|
||||
<link rel="shortcut icon" href="../../../../static/favicon.png?h=fa09bedd">
|
||||
<title>BuildProgram | Documentation | Lektor Static Content Management System</title>
|
||||
</head>
|
||||
<body class="default">
|
||||
<nav class="navbar navbar-inverse navbar-static-top">
|
||||
<div class="container">
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle collapsed"
|
||||
data-toggle="collapse" data-target="#navbar"
|
||||
aria-expanded="false" aria-controls="navbar">
|
||||
<span class="sr-only">Toggle navigation</span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<a class="navbar-brand" href="../../../../">Lektor</a>
|
||||
</div>
|
||||
<div id="navbar" class="collapse navbar-collapse">
|
||||
<ul class="nav navbar-nav">
|
||||
|
||||
<li><a href="../../../../downloads/">Download</a></li>
|
||||
|
||||
<li class="active"><a href="../../../">Documentation</a></li>
|
||||
|
||||
<li><a href="../../../../showcase/">Showcase</a></li>
|
||||
|
||||
<li><a href="../../../../plugins/">Plugins</a></li>
|
||||
|
||||
<li><a href="../../../../community/">Community</a></li>
|
||||
|
||||
<li><a href="../../../../blog/">Blog</a></li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<div class="body-wrapper">
|
||||
|
||||
<div class="container">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-3">
|
||||
<ul class="tree-nav nocontent">
|
||||
<li><a href="../../../">Welcome</a></li>
|
||||
|
||||
|
||||
<li><a href="../../../what/">What is Lektor</a>
|
||||
|
||||
|
||||
<li><a href="../../../installation/">Installation</a>
|
||||
|
||||
|
||||
<li><a href="../../../quickstart/">Quickstart</a>
|
||||
|
||||
|
||||
<li><a href="../../../project/">Project</a>
|
||||
|
||||
|
||||
<li><a href="../../../content/">Content</a>
|
||||
|
||||
|
||||
<li><a href="../../../templates/">Templates</a>
|
||||
|
||||
|
||||
<li><a href="../../../themes/">Themes</a>
|
||||
|
||||
|
||||
<li><a href="../../../guides/">Guides</a>
|
||||
|
||||
|
||||
<li><a href="../../../deployment/">Deployment</a>
|
||||
|
||||
|
||||
<li><a href="../../../plugins/">Plugins</a>
|
||||
|
||||
|
||||
<li><a href="../../../models/">Data Modelling</a>
|
||||
|
||||
|
||||
<li><a href="../../../cli/">Command Line</a>
|
||||
|
||||
|
||||
<li><a href="../../">API</a>
|
||||
|
||||
<ul>
|
||||
<li><a href="../">Build System</a>
|
||||
|
||||
<ul>
|
||||
<li><a href="../artifact/">Artifact</a>
|
||||
|
||||
|
||||
<li class="active"><a href="./">BuildProgram</a>
|
||||
|
||||
<ul>
|
||||
<li><a href="build-artifact/">build_artifact()</a>
|
||||
|
||||
|
||||
<li><a href="declare-artifact/">declare_artifact()</a>
|
||||
|
||||
|
||||
<li><a href="iter-child-sources/">iter_child_sources()</a>
|
||||
|
||||
|
||||
<li><a href="produce-artifacts/">produce_artifacts()</a>
|
||||
|
||||
|
||||
<li><a href="source/">source</a>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<li><a href="../context/">Context</a>
|
||||
|
||||
|
||||
<li><a href="../get-ctx/">get_ctx()</a>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<li><a href="../../databags/">Databags</a>
|
||||
|
||||
|
||||
<li><a href="../../db/">Database</a>
|
||||
|
||||
|
||||
<li><a href="../../environment/">Environment</a>
|
||||
|
||||
|
||||
<li><a href="../../plugins/">Plugins</a>
|
||||
|
||||
|
||||
<li><a href="../../project/">Project</a>
|
||||
|
||||
|
||||
<li><a href="../../publisher/">Publisher</a>
|
||||
|
||||
|
||||
<li><a href="../../templates/">Template API</a>
|
||||
|
||||
|
||||
<li><a href="../../utils/">Utilities</a>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<li><a href="../../../search/">Search</a>
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-sm-9 doc-styling">
|
||||
|
||||
|
||||
<h1><i class="glyphicon glyphicon-leaf"></i> <code class="mod">lektor.build_programs.</code><code class="obj">BuildProgram</code></h1>
|
||||
|
||||
|
||||
|
||||
<ul class=page-meta>
|
||||
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
<p>A build program is responsible for converting a <a href="../../db/obj/" class="ref">Source Object</a> into final build artifacts. Typically such a build
|
||||
program implements two methods: <a href="produce-artifacts/" class="ref">produce_artifacts</a>
|
||||
and <a href="build-artifact/" class="ref">build_artifact</a>.</p>
|
||||
<p>The former should invoke <a href="declare-artifact/" class="ref">declare_artifact</a> for each
|
||||
artifact that should be created from the source. The builder will then
|
||||
invoke <a href="build-artifact/" class="ref">build_artifact</a> for each of these declared
|
||||
artifacts if the builder determiend that the artifact needs to be built.</p>
|
||||
<p>For an example refer to the <a href="../../environment/add-build-program/" class="ref">add_build_program</a> documentation.</p>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="child-pages nocontent">
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-6 child">
|
||||
<h4>
|
||||
<i class="glyphicon glyphicon-cog"></i>
|
||||
<a href="build-artifact/">build_artifact()</a>
|
||||
</h4>
|
||||
|
||||
<p class="summary">Invoked to build a previously declared artifact.</p>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-md-6 child">
|
||||
<h4>
|
||||
<i class="glyphicon glyphicon-cog"></i>
|
||||
<a href="declare-artifact/">declare_artifact()</a>
|
||||
</h4>
|
||||
|
||||
<p class="summary">Declares an artifact to build from this program.</p>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-6 child">
|
||||
<h4>
|
||||
<i class="glyphicon glyphicon-cog"></i>
|
||||
<a href="iter-child-sources/">iter_child_sources()</a>
|
||||
</h4>
|
||||
|
||||
<p class="summary">Optionally this method can be implemented to produce child sources.</p>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-md-6 child">
|
||||
<h4>
|
||||
<i class="glyphicon glyphicon-cog"></i>
|
||||
<a href="produce-artifacts/">produce_artifacts()</a>
|
||||
</h4>
|
||||
|
||||
<p class="summary">Method that needs to be overridden for the build to work.</p>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-6 child">
|
||||
<h4>
|
||||
<i class="glyphicon glyphicon-info-sign"></i>
|
||||
<a href="source/">source</a>
|
||||
</h4>
|
||||
|
||||
<p class="summary">A reference to the source object.</p>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="comment-box">
|
||||
<h2>Comments</h2>
|
||||
|
||||
<div id="disqus_thread"></div>
|
||||
<script>
|
||||
var disqus_config = function() { this.page.identifier = "/docs/api/build/program"; this.page.url = "https://www.getlektor.com/docs/api/build/program/"; };
|
||||
(function() {
|
||||
var d = document, s = d.createElement('script');
|
||||
s.src = '//lektordocumentation.disqus.com/embed.js';
|
||||
s.setAttribute('data-timestamp', +new Date());
|
||||
(d.head || d.body).appendChild(s);
|
||||
})();
|
||||
</script>
|
||||
<noscript>
|
||||
Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript"
|
||||
rel="nofollow">comments powered by Disqus.</a>
|
||||
</noscript>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="bottomsummary">
|
||||
<div class="container">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<footer>
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-sm-4 icon-bar">
|
||||
<a href="https://github.com/lektor/lektor/" title="Lektor on GitHub"
|
||||
><i class="fa fa-github"></i></a>
|
||||
<a href="https://github.com/lektor/lektor/issues/" title="Report Issues for Lektor"
|
||||
><i class="fa fa-bug"></i></a>
|
||||
<a href="https://twitter.com/getlektor" title="Find Lektor on Twitter"
|
||||
><i class="fa fa-twitter"></i></a>
|
||||
<a href="https://gitter.im/lektor/lektor" title="Chat on Gitter"
|
||||
><i class="fa fa-comment"></i></a>
|
||||
<a href="https://github.com/lektor/lektor-website/tree/master/content/docs/api/build/program/contents.lr" title="View source for this page"><i class="fa fa-code"></i></a>
|
||||
</div>
|
||||
<div class="col-sm-8">
|
||||
<a href="../../../../license/">License & Copyright</a> •
|
||||
<a href="../../../../contact/">Contact</a> •
|
||||
Made with <i class="fa fa-fw fa-heart" title="Heart"><span hidden>Heart</span></i> in Carinthia
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
|
||||
<script type=text/javascript src="../../../../static/app.js?h=bb1b933a" charset="utf-8"></script>
|
||||
<script>
|
||||
((window.gitter = {}).chat = {}).options = {
|
||||
room: 'lektor/lektor',
|
||||
activationElement: null
|
||||
};
|
||||
document.write('<button class="js-gitter-toggle-chat-button">Toggle Chat</button>');
|
||||
var dnt = navigator.doNotTrack || window.doNotTrack || navigator.msDoNotTrack;
|
||||
if (dnt != "1" && dnt != "yes") {
|
||||
window.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments)};ga.l=+new Date;
|
||||
ga('create', 'UA-70822533-1', 'auto');
|
||||
ga('set', 'anonymizeIp', true);
|
||||
ga('send', 'pageview');
|
||||
} else {
|
||||
console.debug("Respecting Do-Not-Track, not running analytics.");
|
||||
}
|
||||
</script>
|
||||
<script async src='https://www.google-analytics.com/analytics.js'></script>
|
||||
<script async defer id="github-bjs" src="https://buttons.github.io/buttons.js"></script>
|
||||
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script>
|
||||
<script src="https://sidecar.gitter.im/dist/sidecar.v1.js" async defer></script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,285 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<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/pygments.css">
|
||||
<link rel="shortcut icon" href="../../../../../static/favicon.png?h=fa09bedd">
|
||||
<title>iter_child_sources | Documentation | Lektor Static Content Management System</title>
|
||||
</head>
|
||||
<body class="default">
|
||||
<nav class="navbar navbar-inverse navbar-static-top">
|
||||
<div class="container">
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle collapsed"
|
||||
data-toggle="collapse" data-target="#navbar"
|
||||
aria-expanded="false" aria-controls="navbar">
|
||||
<span class="sr-only">Toggle navigation</span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<a class="navbar-brand" href="../../../../../">Lektor</a>
|
||||
</div>
|
||||
<div id="navbar" class="collapse navbar-collapse">
|
||||
<ul class="nav navbar-nav">
|
||||
|
||||
<li><a href="../../../../../downloads/">Download</a></li>
|
||||
|
||||
<li class="active"><a href="../../../../">Documentation</a></li>
|
||||
|
||||
<li><a href="../../../../../showcase/">Showcase</a></li>
|
||||
|
||||
<li><a href="../../../../../plugins/">Plugins</a></li>
|
||||
|
||||
<li><a href="../../../../../community/">Community</a></li>
|
||||
|
||||
<li><a href="../../../../../blog/">Blog</a></li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<div class="body-wrapper">
|
||||
|
||||
<div class="container">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-3">
|
||||
<ul class="tree-nav nocontent">
|
||||
<li><a href="../../../../">Welcome</a></li>
|
||||
|
||||
|
||||
<li><a href="../../../../what/">What is Lektor</a>
|
||||
|
||||
|
||||
<li><a href="../../../../installation/">Installation</a>
|
||||
|
||||
|
||||
<li><a href="../../../../quickstart/">Quickstart</a>
|
||||
|
||||
|
||||
<li><a href="../../../../project/">Project</a>
|
||||
|
||||
|
||||
<li><a href="../../../../content/">Content</a>
|
||||
|
||||
|
||||
<li><a href="../../../../templates/">Templates</a>
|
||||
|
||||
|
||||
<li><a href="../../../../themes/">Themes</a>
|
||||
|
||||
|
||||
<li><a href="../../../../guides/">Guides</a>
|
||||
|
||||
|
||||
<li><a href="../../../../deployment/">Deployment</a>
|
||||
|
||||
|
||||
<li><a href="../../../../plugins/">Plugins</a>
|
||||
|
||||
|
||||
<li><a href="../../../../models/">Data Modelling</a>
|
||||
|
||||
|
||||
<li><a href="../../../../cli/">Command Line</a>
|
||||
|
||||
|
||||
<li><a href="../../../">API</a>
|
||||
|
||||
<ul>
|
||||
<li><a href="../../">Build System</a>
|
||||
|
||||
<ul>
|
||||
<li><a href="../../artifact/">Artifact</a>
|
||||
|
||||
|
||||
<li><a href="../">BuildProgram</a>
|
||||
|
||||
<ul>
|
||||
<li><a href="../build-artifact/">build_artifact()</a>
|
||||
|
||||
|
||||
<li><a href="../declare-artifact/">declare_artifact()</a>
|
||||
|
||||
|
||||
<li class="active"><a href="./">iter_child_sources()</a>
|
||||
|
||||
<ul></ul>
|
||||
|
||||
|
||||
<li><a href="../produce-artifacts/">produce_artifacts()</a>
|
||||
|
||||
|
||||
<li><a href="../source/">source</a>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<li><a href="../../context/">Context</a>
|
||||
|
||||
|
||||
<li><a href="../../get-ctx/">get_ctx()</a>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<li><a href="../../../databags/">Databags</a>
|
||||
|
||||
|
||||
<li><a href="../../../db/">Database</a>
|
||||
|
||||
|
||||
<li><a href="../../../environment/">Environment</a>
|
||||
|
||||
|
||||
<li><a href="../../../plugins/">Plugins</a>
|
||||
|
||||
|
||||
<li><a href="../../../project/">Project</a>
|
||||
|
||||
|
||||
<li><a href="../../../publisher/">Publisher</a>
|
||||
|
||||
|
||||
<li><a href="../../../templates/">Template API</a>
|
||||
|
||||
|
||||
<li><a href="../../../utils/">Utilities</a>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<li><a href="../../../../search/">Search</a>
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<div class="visible-md-block visible-lg-block">
|
||||
<h4>This Page</h4>
|
||||
<ul class="toc">
|
||||
|
||||
<li><a href="#example">Example</a></li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-sm-9 doc-styling">
|
||||
|
||||
|
||||
<h1><i class="glyphicon glyphicon-cog"></i> <code class="obj">iter_child_sources</code> <span class="sig">(<code></code>)</span></h1>
|
||||
|
||||
|
||||
|
||||
<ul class=page-meta>
|
||||
|
||||
<li>Method of <a href="../">BuildProgram</a></li>
|
||||
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
<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>
|
||||
<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>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="comment-box">
|
||||
<h2>Comments</h2>
|
||||
|
||||
<div id="disqus_thread"></div>
|
||||
<script>
|
||||
var disqus_config = function() { this.page.identifier = "/docs/api/build/program/iter-child-sources"; this.page.url = "https://www.getlektor.com/docs/api/build/program/iter-child-sources/"; };
|
||||
(function() {
|
||||
var d = document, s = d.createElement('script');
|
||||
s.src = '//lektordocumentation.disqus.com/embed.js';
|
||||
s.setAttribute('data-timestamp', +new Date());
|
||||
(d.head || d.body).appendChild(s);
|
||||
})();
|
||||
</script>
|
||||
<noscript>
|
||||
Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript"
|
||||
rel="nofollow">comments powered by Disqus.</a>
|
||||
</noscript>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="bottomsummary">
|
||||
<div class="container">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<footer>
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-sm-4 icon-bar">
|
||||
<a href="https://github.com/lektor/lektor/" title="Lektor on GitHub"
|
||||
><i class="fa fa-github"></i></a>
|
||||
<a href="https://github.com/lektor/lektor/issues/" title="Report Issues for Lektor"
|
||||
><i class="fa fa-bug"></i></a>
|
||||
<a href="https://twitter.com/getlektor" title="Find Lektor on Twitter"
|
||||
><i class="fa fa-twitter"></i></a>
|
||||
<a href="https://gitter.im/lektor/lektor" title="Chat on Gitter"
|
||||
><i class="fa fa-comment"></i></a>
|
||||
<a href="https://github.com/lektor/lektor-website/tree/master/content/docs/api/build/program/iter-child-sources/contents.lr" title="View source for this page"><i class="fa fa-code"></i></a>
|
||||
</div>
|
||||
<div class="col-sm-8">
|
||||
<a href="../../../../../license/">License & Copyright</a> •
|
||||
<a href="../../../../../contact/">Contact</a> •
|
||||
Made with <i class="fa fa-fw fa-heart" title="Heart"><span hidden>Heart</span></i> in Carinthia
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
|
||||
<script type=text/javascript src="../../../../../static/app.js?h=bb1b933a" charset="utf-8"></script>
|
||||
<script>
|
||||
((window.gitter = {}).chat = {}).options = {
|
||||
room: 'lektor/lektor',
|
||||
activationElement: null
|
||||
};
|
||||
document.write('<button class="js-gitter-toggle-chat-button">Toggle Chat</button>');
|
||||
var dnt = navigator.doNotTrack || window.doNotTrack || navigator.msDoNotTrack;
|
||||
if (dnt != "1" && dnt != "yes") {
|
||||
window.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments)};ga.l=+new Date;
|
||||
ga('create', 'UA-70822533-1', 'auto');
|
||||
ga('set', 'anonymizeIp', true);
|
||||
ga('send', 'pageview');
|
||||
} else {
|
||||
console.debug("Respecting Do-Not-Track, not running analytics.");
|
||||
}
|
||||
</script>
|
||||
<script async src='https://www.google-analytics.com/analytics.js'></script>
|
||||
<script async defer id="github-bjs" src="https://buttons.github.io/buttons.js"></script>
|
||||
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script>
|
||||
<script src="https://sidecar.gitter.im/dist/sidecar.v1.js" async defer></script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,276 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<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/pygments.css">
|
||||
<link rel="shortcut icon" href="../../../../../static/favicon.png?h=fa09bedd">
|
||||
<title>produce_artifacts | Documentation | Lektor Static Content Management System</title>
|
||||
</head>
|
||||
<body class="default">
|
||||
<nav class="navbar navbar-inverse navbar-static-top">
|
||||
<div class="container">
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle collapsed"
|
||||
data-toggle="collapse" data-target="#navbar"
|
||||
aria-expanded="false" aria-controls="navbar">
|
||||
<span class="sr-only">Toggle navigation</span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<a class="navbar-brand" href="../../../../../">Lektor</a>
|
||||
</div>
|
||||
<div id="navbar" class="collapse navbar-collapse">
|
||||
<ul class="nav navbar-nav">
|
||||
|
||||
<li><a href="../../../../../downloads/">Download</a></li>
|
||||
|
||||
<li class="active"><a href="../../../../">Documentation</a></li>
|
||||
|
||||
<li><a href="../../../../../showcase/">Showcase</a></li>
|
||||
|
||||
<li><a href="../../../../../plugins/">Plugins</a></li>
|
||||
|
||||
<li><a href="../../../../../community/">Community</a></li>
|
||||
|
||||
<li><a href="../../../../../blog/">Blog</a></li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<div class="body-wrapper">
|
||||
|
||||
<div class="container">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-3">
|
||||
<ul class="tree-nav nocontent">
|
||||
<li><a href="../../../../">Welcome</a></li>
|
||||
|
||||
|
||||
<li><a href="../../../../what/">What is Lektor</a>
|
||||
|
||||
|
||||
<li><a href="../../../../installation/">Installation</a>
|
||||
|
||||
|
||||
<li><a href="../../../../quickstart/">Quickstart</a>
|
||||
|
||||
|
||||
<li><a href="../../../../project/">Project</a>
|
||||
|
||||
|
||||
<li><a href="../../../../content/">Content</a>
|
||||
|
||||
|
||||
<li><a href="../../../../templates/">Templates</a>
|
||||
|
||||
|
||||
<li><a href="../../../../themes/">Themes</a>
|
||||
|
||||
|
||||
<li><a href="../../../../guides/">Guides</a>
|
||||
|
||||
|
||||
<li><a href="../../../../deployment/">Deployment</a>
|
||||
|
||||
|
||||
<li><a href="../../../../plugins/">Plugins</a>
|
||||
|
||||
|
||||
<li><a href="../../../../models/">Data Modelling</a>
|
||||
|
||||
|
||||
<li><a href="../../../../cli/">Command Line</a>
|
||||
|
||||
|
||||
<li><a href="../../../">API</a>
|
||||
|
||||
<ul>
|
||||
<li><a href="../../">Build System</a>
|
||||
|
||||
<ul>
|
||||
<li><a href="../../artifact/">Artifact</a>
|
||||
|
||||
|
||||
<li><a href="../">BuildProgram</a>
|
||||
|
||||
<ul>
|
||||
<li><a href="../build-artifact/">build_artifact()</a>
|
||||
|
||||
|
||||
<li><a href="../declare-artifact/">declare_artifact()</a>
|
||||
|
||||
|
||||
<li><a href="../iter-child-sources/">iter_child_sources()</a>
|
||||
|
||||
|
||||
<li class="active"><a href="./">produce_artifacts()</a>
|
||||
|
||||
<ul></ul>
|
||||
|
||||
|
||||
<li><a href="../source/">source</a>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<li><a href="../../context/">Context</a>
|
||||
|
||||
|
||||
<li><a href="../../get-ctx/">get_ctx()</a>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<li><a href="../../../databags/">Databags</a>
|
||||
|
||||
|
||||
<li><a href="../../../db/">Database</a>
|
||||
|
||||
|
||||
<li><a href="../../../environment/">Environment</a>
|
||||
|
||||
|
||||
<li><a href="../../../plugins/">Plugins</a>
|
||||
|
||||
|
||||
<li><a href="../../../project/">Project</a>
|
||||
|
||||
|
||||
<li><a href="../../../publisher/">Publisher</a>
|
||||
|
||||
|
||||
<li><a href="../../../templates/">Template API</a>
|
||||
|
||||
|
||||
<li><a href="../../../utils/">Utilities</a>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<li><a href="../../../../search/">Search</a>
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-sm-9 doc-styling">
|
||||
|
||||
|
||||
<h1><i class="glyphicon glyphicon-cog"></i> <code class="obj">produce_artifacts</code> <span class="sig">(<code></code>)</span></h1>
|
||||
|
||||
|
||||
|
||||
<ul class=page-meta>
|
||||
|
||||
<li>Method of <a href="../">BuildProgram</a></li>
|
||||
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
<p>This method needs to be overridden by subclasses. It's invoked at the
|
||||
beginning of the build process and it's purpose is to invoke the
|
||||
<a href="../declare-artifact/" class="ref">declare_artifact</a> method for each artifact
|
||||
that the build should generate. For each of these invocations later the
|
||||
<a href="../build-artifact/" class="ref">build_artifact</a> method will be invoked if the
|
||||
builder determined that the artifact needs to be rebuild.</p>
|
||||
<p>For an example refer to the <a href="../../../environment/add-build-program/" class="ref">add_build_program</a> documentation.</p>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="comment-box">
|
||||
<h2>Comments</h2>
|
||||
|
||||
<div id="disqus_thread"></div>
|
||||
<script>
|
||||
var disqus_config = function() { this.page.identifier = "/docs/api/build/program/produce-artifacts"; this.page.url = "https://www.getlektor.com/docs/api/build/program/produce-artifacts/"; };
|
||||
(function() {
|
||||
var d = document, s = d.createElement('script');
|
||||
s.src = '//lektordocumentation.disqus.com/embed.js';
|
||||
s.setAttribute('data-timestamp', +new Date());
|
||||
(d.head || d.body).appendChild(s);
|
||||
})();
|
||||
</script>
|
||||
<noscript>
|
||||
Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript"
|
||||
rel="nofollow">comments powered by Disqus.</a>
|
||||
</noscript>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="bottomsummary">
|
||||
<div class="container">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<footer>
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-sm-4 icon-bar">
|
||||
<a href="https://github.com/lektor/lektor/" title="Lektor on GitHub"
|
||||
><i class="fa fa-github"></i></a>
|
||||
<a href="https://github.com/lektor/lektor/issues/" title="Report Issues for Lektor"
|
||||
><i class="fa fa-bug"></i></a>
|
||||
<a href="https://twitter.com/getlektor" title="Find Lektor on Twitter"
|
||||
><i class="fa fa-twitter"></i></a>
|
||||
<a href="https://gitter.im/lektor/lektor" title="Chat on Gitter"
|
||||
><i class="fa fa-comment"></i></a>
|
||||
<a href="https://github.com/lektor/lektor-website/tree/master/content/docs/api/build/program/produce-artifacts/contents.lr" title="View source for this page"><i class="fa fa-code"></i></a>
|
||||
</div>
|
||||
<div class="col-sm-8">
|
||||
<a href="../../../../../license/">License & Copyright</a> •
|
||||
<a href="../../../../../contact/">Contact</a> •
|
||||
Made with <i class="fa fa-fw fa-heart" title="Heart"><span hidden>Heart</span></i> in Carinthia
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
|
||||
<script type=text/javascript src="../../../../../static/app.js?h=bb1b933a" charset="utf-8"></script>
|
||||
<script>
|
||||
((window.gitter = {}).chat = {}).options = {
|
||||
room: 'lektor/lektor',
|
||||
activationElement: null
|
||||
};
|
||||
document.write('<button class="js-gitter-toggle-chat-button">Toggle Chat</button>');
|
||||
var dnt = navigator.doNotTrack || window.doNotTrack || navigator.msDoNotTrack;
|
||||
if (dnt != "1" && dnt != "yes") {
|
||||
window.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments)};ga.l=+new Date;
|
||||
ga('create', 'UA-70822533-1', 'auto');
|
||||
ga('set', 'anonymizeIp', true);
|
||||
ga('send', 'pageview');
|
||||
} else {
|
||||
console.debug("Respecting Do-Not-Track, not running analytics.");
|
||||
}
|
||||
</script>
|
||||
<script async src='https://www.google-analytics.com/analytics.js'></script>
|
||||
<script async defer id="github-bjs" src="https://buttons.github.io/buttons.js"></script>
|
||||
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script>
|
||||
<script src="https://sidecar.gitter.im/dist/sidecar.v1.js" async defer></script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,271 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<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/pygments.css">
|
||||
<link rel="shortcut icon" href="../../../../../static/favicon.png?h=fa09bedd">
|
||||
<title>source | Documentation | Lektor Static Content Management System</title>
|
||||
</head>
|
||||
<body class="default">
|
||||
<nav class="navbar navbar-inverse navbar-static-top">
|
||||
<div class="container">
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle collapsed"
|
||||
data-toggle="collapse" data-target="#navbar"
|
||||
aria-expanded="false" aria-controls="navbar">
|
||||
<span class="sr-only">Toggle navigation</span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<a class="navbar-brand" href="../../../../../">Lektor</a>
|
||||
</div>
|
||||
<div id="navbar" class="collapse navbar-collapse">
|
||||
<ul class="nav navbar-nav">
|
||||
|
||||
<li><a href="../../../../../downloads/">Download</a></li>
|
||||
|
||||
<li class="active"><a href="../../../../">Documentation</a></li>
|
||||
|
||||
<li><a href="../../../../../showcase/">Showcase</a></li>
|
||||
|
||||
<li><a href="../../../../../plugins/">Plugins</a></li>
|
||||
|
||||
<li><a href="../../../../../community/">Community</a></li>
|
||||
|
||||
<li><a href="../../../../../blog/">Blog</a></li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<div class="body-wrapper">
|
||||
|
||||
<div class="container">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-3">
|
||||
<ul class="tree-nav nocontent">
|
||||
<li><a href="../../../../">Welcome</a></li>
|
||||
|
||||
|
||||
<li><a href="../../../../what/">What is Lektor</a>
|
||||
|
||||
|
||||
<li><a href="../../../../installation/">Installation</a>
|
||||
|
||||
|
||||
<li><a href="../../../../quickstart/">Quickstart</a>
|
||||
|
||||
|
||||
<li><a href="../../../../project/">Project</a>
|
||||
|
||||
|
||||
<li><a href="../../../../content/">Content</a>
|
||||
|
||||
|
||||
<li><a href="../../../../templates/">Templates</a>
|
||||
|
||||
|
||||
<li><a href="../../../../themes/">Themes</a>
|
||||
|
||||
|
||||
<li><a href="../../../../guides/">Guides</a>
|
||||
|
||||
|
||||
<li><a href="../../../../deployment/">Deployment</a>
|
||||
|
||||
|
||||
<li><a href="../../../../plugins/">Plugins</a>
|
||||
|
||||
|
||||
<li><a href="../../../../models/">Data Modelling</a>
|
||||
|
||||
|
||||
<li><a href="../../../../cli/">Command Line</a>
|
||||
|
||||
|
||||
<li><a href="../../../">API</a>
|
||||
|
||||
<ul>
|
||||
<li><a href="../../">Build System</a>
|
||||
|
||||
<ul>
|
||||
<li><a href="../../artifact/">Artifact</a>
|
||||
|
||||
|
||||
<li><a href="../">BuildProgram</a>
|
||||
|
||||
<ul>
|
||||
<li><a href="../build-artifact/">build_artifact()</a>
|
||||
|
||||
|
||||
<li><a href="../declare-artifact/">declare_artifact()</a>
|
||||
|
||||
|
||||
<li><a href="../iter-child-sources/">iter_child_sources()</a>
|
||||
|
||||
|
||||
<li><a href="../produce-artifacts/">produce_artifacts()</a>
|
||||
|
||||
|
||||
<li class="active"><a href="./">source</a>
|
||||
|
||||
<ul></ul>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<li><a href="../../context/">Context</a>
|
||||
|
||||
|
||||
<li><a href="../../get-ctx/">get_ctx()</a>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<li><a href="../../../databags/">Databags</a>
|
||||
|
||||
|
||||
<li><a href="../../../db/">Database</a>
|
||||
|
||||
|
||||
<li><a href="../../../environment/">Environment</a>
|
||||
|
||||
|
||||
<li><a href="../../../plugins/">Plugins</a>
|
||||
|
||||
|
||||
<li><a href="../../../project/">Project</a>
|
||||
|
||||
|
||||
<li><a href="../../../publisher/">Publisher</a>
|
||||
|
||||
|
||||
<li><a href="../../../templates/">Template API</a>
|
||||
|
||||
|
||||
<li><a href="../../../utils/">Utilities</a>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<li><a href="../../../../search/">Search</a>
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-sm-9 doc-styling">
|
||||
|
||||
|
||||
<h1><i class="glyphicon glyphicon-info-sign"></i> <code class="obj">source</code></h1>
|
||||
|
||||
|
||||
|
||||
<ul class=page-meta>
|
||||
|
||||
<li>Property of <a href="../">BuildProgram</a></li>
|
||||
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
<p>This refers to the source object that created the build program. It's primary
|
||||
use is to build the artifact in <a href="../build-artifact/" class="ref">build_artifact</a>.</p>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="comment-box">
|
||||
<h2>Comments</h2>
|
||||
|
||||
<div id="disqus_thread"></div>
|
||||
<script>
|
||||
var disqus_config = function() { this.page.identifier = "/docs/api/build/program/source"; this.page.url = "https://www.getlektor.com/docs/api/build/program/source/"; };
|
||||
(function() {
|
||||
var d = document, s = d.createElement('script');
|
||||
s.src = '//lektordocumentation.disqus.com/embed.js';
|
||||
s.setAttribute('data-timestamp', +new Date());
|
||||
(d.head || d.body).appendChild(s);
|
||||
})();
|
||||
</script>
|
||||
<noscript>
|
||||
Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript"
|
||||
rel="nofollow">comments powered by Disqus.</a>
|
||||
</noscript>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="bottomsummary">
|
||||
<div class="container">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<footer>
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-sm-4 icon-bar">
|
||||
<a href="https://github.com/lektor/lektor/" title="Lektor on GitHub"
|
||||
><i class="fa fa-github"></i></a>
|
||||
<a href="https://github.com/lektor/lektor/issues/" title="Report Issues for Lektor"
|
||||
><i class="fa fa-bug"></i></a>
|
||||
<a href="https://twitter.com/getlektor" title="Find Lektor on Twitter"
|
||||
><i class="fa fa-twitter"></i></a>
|
||||
<a href="https://gitter.im/lektor/lektor" title="Chat on Gitter"
|
||||
><i class="fa fa-comment"></i></a>
|
||||
<a href="https://github.com/lektor/lektor-website/tree/master/content/docs/api/build/program/source/contents.lr" title="View source for this page"><i class="fa fa-code"></i></a>
|
||||
</div>
|
||||
<div class="col-sm-8">
|
||||
<a href="../../../../../license/">License & Copyright</a> •
|
||||
<a href="../../../../../contact/">Contact</a> •
|
||||
Made with <i class="fa fa-fw fa-heart" title="Heart"><span hidden>Heart</span></i> in Carinthia
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
|
||||
<script type=text/javascript src="../../../../../static/app.js?h=bb1b933a" charset="utf-8"></script>
|
||||
<script>
|
||||
((window.gitter = {}).chat = {}).options = {
|
||||
room: 'lektor/lektor',
|
||||
activationElement: null
|
||||
};
|
||||
document.write('<button class="js-gitter-toggle-chat-button">Toggle Chat</button>');
|
||||
var dnt = navigator.doNotTrack || window.doNotTrack || navigator.msDoNotTrack;
|
||||
if (dnt != "1" && dnt != "yes") {
|
||||
window.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments)};ga.l=+new Date;
|
||||
ga('create', 'UA-70822533-1', 'auto');
|
||||
ga('set', 'anonymizeIp', true);
|
||||
ga('send', 'pageview');
|
||||
} else {
|
||||
console.debug("Respecting Do-Not-Track, not running analytics.");
|
||||
}
|
||||
</script>
|
||||
<script async src='https://www.google-analytics.com/analytics.js'></script>
|
||||
<script async defer id="github-bjs" src="https://buttons.github.io/buttons.js"></script>
|
||||
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script>
|
||||
<script src="https://sidecar.gitter.im/dist/sidecar.v1.js" async defer></script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,249 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<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/pygments.css">
|
||||
<link rel="shortcut icon" href="../../../../static/favicon.png?h=fa09bedd">
|
||||
<title>get_bag | Documentation | Lektor Static Content Management System</title>
|
||||
</head>
|
||||
<body class="default">
|
||||
<nav class="navbar navbar-inverse navbar-static-top">
|
||||
<div class="container">
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle collapsed"
|
||||
data-toggle="collapse" data-target="#navbar"
|
||||
aria-expanded="false" aria-controls="navbar">
|
||||
<span class="sr-only">Toggle navigation</span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<a class="navbar-brand" href="../../../../">Lektor</a>
|
||||
</div>
|
||||
<div id="navbar" class="collapse navbar-collapse">
|
||||
<ul class="nav navbar-nav">
|
||||
|
||||
<li><a href="../../../../downloads/">Download</a></li>
|
||||
|
||||
<li class="active"><a href="../../../">Documentation</a></li>
|
||||
|
||||
<li><a href="../../../../showcase/">Showcase</a></li>
|
||||
|
||||
<li><a href="../../../../plugins/">Plugins</a></li>
|
||||
|
||||
<li><a href="../../../../community/">Community</a></li>
|
||||
|
||||
<li><a href="../../../../blog/">Blog</a></li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<div class="body-wrapper">
|
||||
|
||||
<div class="container">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-3">
|
||||
<ul class="tree-nav nocontent">
|
||||
<li><a href="../../../">Welcome</a></li>
|
||||
|
||||
|
||||
<li><a href="../../../what/">What is Lektor</a>
|
||||
|
||||
|
||||
<li><a href="../../../installation/">Installation</a>
|
||||
|
||||
|
||||
<li><a href="../../../quickstart/">Quickstart</a>
|
||||
|
||||
|
||||
<li><a href="../../../project/">Project</a>
|
||||
|
||||
|
||||
<li><a href="../../../content/">Content</a>
|
||||
|
||||
|
||||
<li><a href="../../../templates/">Templates</a>
|
||||
|
||||
|
||||
<li><a href="../../../themes/">Themes</a>
|
||||
|
||||
|
||||
<li><a href="../../../guides/">Guides</a>
|
||||
|
||||
|
||||
<li><a href="../../../deployment/">Deployment</a>
|
||||
|
||||
|
||||
<li><a href="../../../plugins/">Plugins</a>
|
||||
|
||||
|
||||
<li><a href="../../../models/">Data Modelling</a>
|
||||
|
||||
|
||||
<li><a href="../../../cli/">Command Line</a>
|
||||
|
||||
|
||||
<li><a href="../../">API</a>
|
||||
|
||||
<ul>
|
||||
<li><a href="../../build/">Build System</a>
|
||||
|
||||
|
||||
<li><a href="../">Databags</a>
|
||||
|
||||
<ul>
|
||||
<li class="active"><a href="./">get_bag()</a>
|
||||
|
||||
<ul></ul>
|
||||
|
||||
|
||||
<li><a href="../lookup/">lookup()</a>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<li><a href="../../db/">Database</a>
|
||||
|
||||
|
||||
<li><a href="../../environment/">Environment</a>
|
||||
|
||||
|
||||
<li><a href="../../plugins/">Plugins</a>
|
||||
|
||||
|
||||
<li><a href="../../project/">Project</a>
|
||||
|
||||
|
||||
<li><a href="../../publisher/">Publisher</a>
|
||||
|
||||
|
||||
<li><a href="../../templates/">Template API</a>
|
||||
|
||||
|
||||
<li><a href="../../utils/">Utilities</a>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<li><a href="../../../search/">Search</a>
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-sm-9 doc-styling">
|
||||
|
||||
|
||||
<h1><i class="glyphicon glyphicon-cog"></i> <code class="obj">get_bag</code> <span class="sig">(<code>name</code>)</span></h1>
|
||||
|
||||
|
||||
|
||||
<ul class=page-meta>
|
||||
|
||||
<li>Method of <a href="../">Databags</a></li>
|
||||
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
<p>This method is a special case of <a href="../lookup/" class="ref">lookup</a> which just
|
||||
looks up an entire data bag and returns it as dictionary. For most
|
||||
intents and purposes <code>lookup</code> is what you want.</p>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="comment-box">
|
||||
<h2>Comments</h2>
|
||||
|
||||
<div id="disqus_thread"></div>
|
||||
<script>
|
||||
var disqus_config = function() { this.page.identifier = "/docs/api/databags/get-bag"; this.page.url = "https://www.getlektor.com/docs/api/databags/get-bag/"; };
|
||||
(function() {
|
||||
var d = document, s = d.createElement('script');
|
||||
s.src = '//lektordocumentation.disqus.com/embed.js';
|
||||
s.setAttribute('data-timestamp', +new Date());
|
||||
(d.head || d.body).appendChild(s);
|
||||
})();
|
||||
</script>
|
||||
<noscript>
|
||||
Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript"
|
||||
rel="nofollow">comments powered by Disqus.</a>
|
||||
</noscript>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="bottomsummary">
|
||||
<div class="container">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<footer>
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-sm-4 icon-bar">
|
||||
<a href="https://github.com/lektor/lektor/" title="Lektor on GitHub"
|
||||
><i class="fa fa-github"></i></a>
|
||||
<a href="https://github.com/lektor/lektor/issues/" title="Report Issues for Lektor"
|
||||
><i class="fa fa-bug"></i></a>
|
||||
<a href="https://twitter.com/getlektor" title="Find Lektor on Twitter"
|
||||
><i class="fa fa-twitter"></i></a>
|
||||
<a href="https://gitter.im/lektor/lektor" title="Chat on Gitter"
|
||||
><i class="fa fa-comment"></i></a>
|
||||
<a href="https://github.com/lektor/lektor-website/tree/master/content/docs/api/databags/get-bag/contents.lr" title="View source for this page"><i class="fa fa-code"></i></a>
|
||||
</div>
|
||||
<div class="col-sm-8">
|
||||
<a href="../../../../license/">License & Copyright</a> •
|
||||
<a href="../../../../contact/">Contact</a> •
|
||||
Made with <i class="fa fa-fw fa-heart" title="Heart"><span hidden>Heart</span></i> in Carinthia
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
|
||||
<script type=text/javascript src="../../../../static/app.js?h=bb1b933a" charset="utf-8"></script>
|
||||
<script>
|
||||
((window.gitter = {}).chat = {}).options = {
|
||||
room: 'lektor/lektor',
|
||||
activationElement: null
|
||||
};
|
||||
document.write('<button class="js-gitter-toggle-chat-button">Toggle Chat</button>');
|
||||
var dnt = navigator.doNotTrack || window.doNotTrack || navigator.msDoNotTrack;
|
||||
if (dnt != "1" && dnt != "yes") {
|
||||
window.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments)};ga.l=+new Date;
|
||||
ga('create', 'UA-70822533-1', 'auto');
|
||||
ga('set', 'anonymizeIp', true);
|
||||
ga('send', 'pageview');
|
||||
} else {
|
||||
console.debug("Respecting Do-Not-Track, not running analytics.");
|
||||
}
|
||||
</script>
|
||||
<script async src='https://www.google-analytics.com/analytics.js'></script>
|
||||
<script async defer id="github-bjs" src="https://buttons.github.io/buttons.js"></script>
|
||||
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script>
|
||||
<script src="https://sidecar.gitter.im/dist/sidecar.v1.js" async defer></script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,330 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<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/pygments.css">
|
||||
<link rel="shortcut icon" href="../../../static/favicon.png?h=fa09bedd">
|
||||
<title>Databags | Documentation | Lektor Static Content Management System</title>
|
||||
</head>
|
||||
<body class="default">
|
||||
<nav class="navbar navbar-inverse navbar-static-top">
|
||||
<div class="container">
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle collapsed"
|
||||
data-toggle="collapse" data-target="#navbar"
|
||||
aria-expanded="false" aria-controls="navbar">
|
||||
<span class="sr-only">Toggle navigation</span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<a class="navbar-brand" href="../../../">Lektor</a>
|
||||
</div>
|
||||
<div id="navbar" class="collapse navbar-collapse">
|
||||
<ul class="nav navbar-nav">
|
||||
|
||||
<li><a href="../../../downloads/">Download</a></li>
|
||||
|
||||
<li class="active"><a href="../../">Documentation</a></li>
|
||||
|
||||
<li><a href="../../../showcase/">Showcase</a></li>
|
||||
|
||||
<li><a href="../../../plugins/">Plugins</a></li>
|
||||
|
||||
<li><a href="../../../community/">Community</a></li>
|
||||
|
||||
<li><a href="../../../blog/">Blog</a></li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<div class="body-wrapper">
|
||||
|
||||
<div class="container">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-3">
|
||||
<ul class="tree-nav nocontent">
|
||||
<li><a href="../../">Welcome</a></li>
|
||||
|
||||
|
||||
<li><a href="../../what/">What is Lektor</a>
|
||||
|
||||
|
||||
<li><a href="../../installation/">Installation</a>
|
||||
|
||||
|
||||
<li><a href="../../quickstart/">Quickstart</a>
|
||||
|
||||
|
||||
<li><a href="../../project/">Project</a>
|
||||
|
||||
|
||||
<li><a href="../../content/">Content</a>
|
||||
|
||||
|
||||
<li><a href="../../templates/">Templates</a>
|
||||
|
||||
|
||||
<li><a href="../../themes/">Themes</a>
|
||||
|
||||
|
||||
<li><a href="../../guides/">Guides</a>
|
||||
|
||||
|
||||
<li><a href="../../deployment/">Deployment</a>
|
||||
|
||||
|
||||
<li><a href="../../plugins/">Plugins</a>
|
||||
|
||||
|
||||
<li><a href="../../models/">Data Modelling</a>
|
||||
|
||||
|
||||
<li><a href="../../cli/">Command Line</a>
|
||||
|
||||
|
||||
<li><a href="../">API</a>
|
||||
|
||||
<ul>
|
||||
<li><a href="../build/">Build System</a>
|
||||
|
||||
|
||||
<li class="active"><a href="./">Databags</a>
|
||||
|
||||
<ul>
|
||||
<li><a href="get-bag/">get_bag()</a>
|
||||
|
||||
|
||||
<li><a href="lookup/">lookup()</a>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<li><a href="../db/">Database</a>
|
||||
|
||||
|
||||
<li><a href="../environment/">Environment</a>
|
||||
|
||||
|
||||
<li><a href="../plugins/">Plugins</a>
|
||||
|
||||
|
||||
<li><a href="../project/">Project</a>
|
||||
|
||||
|
||||
<li><a href="../publisher/">Publisher</a>
|
||||
|
||||
|
||||
<li><a href="../templates/">Template API</a>
|
||||
|
||||
|
||||
<li><a href="../utils/">Utilities</a>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<li><a href="../../search/">Search</a>
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<div class="visible-md-block visible-lg-block">
|
||||
<h4>This Page</h4>
|
||||
<ul class="toc">
|
||||
|
||||
<li><a href="#supported-formats">Supported Formats</a></li>
|
||||
|
||||
<li><a href="#navigating-bags">Navigating Bags</a></li>
|
||||
|
||||
<li><a href="#example-databag">Example Databag</a></li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-sm-9 doc-styling">
|
||||
|
||||
|
||||
<h1><i class="glyphicon glyphicon-leaf"></i> <code class="mod">lektor.databags.</code><code class="obj">Databags</code></h1>
|
||||
|
||||
|
||||
|
||||
<ul class=page-meta>
|
||||
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
<p>The databag system is a simple support system in Lektor that allows a
|
||||
Lektor website to load variables from simple key/value or JSON files.
|
||||
This is primarily useful to load translations, API keys and similar
|
||||
things that are needed in multiple templates.</p>
|
||||
<p>From within templates you can use the <a href="../templates/globals/bag/" class="ref">bag</a>
|
||||
function to access databags.</p>
|
||||
<h2 id="supported-formats">Supported Formats</h2><p>Databags go into the <code>databags/</code> folder in your project. There are two
|
||||
formats supported: key/value pairs as ini files as well as JSON files:</p>
|
||||
<table>
|
||||
<thead><tr>
|
||||
<th>Extension</th>
|
||||
<th>Format</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><code>.json</code></td>
|
||||
<td>JSON</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>.ini</code></td>
|
||||
<td>INI Files with or without sections</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<h2 id="navigating-bags">Navigating Bags</h2><p>Dotted notation is used to navigate into data bags which are globally
|
||||
merged together. This means that if you have a file named <code>i18n.ini</code>
|
||||
with a section <code>[en]</code> and a key <code>CLICK_HERE</code> the path <code>i18n.en.CLICK_HERE</code>
|
||||
will target that key. For JSON files further nesting is possible. You
|
||||
can also just target a section and the return value will be a dictionary
|
||||
which can for instance be used with the <a href="../templates/filters/tojson/" class="ref">tojson</a>
|
||||
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>
|
||||
<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>
|
||||
<span class="p"><</span><span class="nt">iframe</span>
|
||||
<span class="na">width</span><span class="o">=</span><span class="s">"</span><span class="cp">{{</span> <span class="nv">width</span> <span class="cp">}}</span><span class="s">"</span> <span class="na">height</span><span class="o">=</span><span class="s">"</span><span class="cp">{{</span> <span class="nv">height</span> <span class="cp">}}</span><span class="s">"</span>
|
||||
<span class="na">frameborder</span><span class="o">=</span><span class="s">"0"</span> <span class="na">style</span><span class="o">=</span><span class="s">"border:0"</span>
|
||||
<span class="na">src</span><span class="o">=</span><span class="s">"</span><span class="cp">{{</span> <span class="nv">bag</span><span class="o">(</span><span class="s1">'gmaps.api_url'</span><span class="o">)</span> <span class="cp">}}</span><span class="s">?q=</span><span class="cp">{{</span> <span class="nv">location</span><span class="o">|</span><span class="nf">urlencode</span>
|
||||
<span class="cp">}}</span><span class="s">&key=</span><span class="cp">{{</span> <span class="nv">bag</span><span class="o">(</span><span class="s1">'gmaps.key'</span><span class="o">)|</span><span class="nf">urlencode</span> <span class="cp">}}</span><span class="s">"</span>
|
||||
<span class="na">allowfullscreen</span><span class="p">></</span><span class="nt">iframe</span><span class="p">></span>
|
||||
<span class="cp">{%</span> <span class="k">endmacro</span> <span class="cp">%}</span>
|
||||
</pre></div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="child-pages nocontent">
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-6 child">
|
||||
<h4>
|
||||
<i class="glyphicon glyphicon-cog"></i>
|
||||
<a href="get-bag/">get_bag()</a>
|
||||
</h4>
|
||||
|
||||
<p class="summary">Looks up an entire databag by its name.</p>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-md-6 child">
|
||||
<h4>
|
||||
<i class="glyphicon glyphicon-cog"></i>
|
||||
<a href="lookup/">lookup()</a>
|
||||
</h4>
|
||||
|
||||
<p class="summary">Looks up data from databags.</p>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="comment-box">
|
||||
<h2>Comments</h2>
|
||||
|
||||
<div id="disqus_thread"></div>
|
||||
<script>
|
||||
var disqus_config = function() { this.page.identifier = "/docs/api/databags"; this.page.url = "https://www.getlektor.com/docs/api/databags/"; };
|
||||
(function() {
|
||||
var d = document, s = d.createElement('script');
|
||||
s.src = '//lektordocumentation.disqus.com/embed.js';
|
||||
s.setAttribute('data-timestamp', +new Date());
|
||||
(d.head || d.body).appendChild(s);
|
||||
})();
|
||||
</script>
|
||||
<noscript>
|
||||
Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript"
|
||||
rel="nofollow">comments powered by Disqus.</a>
|
||||
</noscript>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="bottomsummary">
|
||||
<div class="container">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<footer>
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-sm-4 icon-bar">
|
||||
<a href="https://github.com/lektor/lektor/" title="Lektor on GitHub"
|
||||
><i class="fa fa-github"></i></a>
|
||||
<a href="https://github.com/lektor/lektor/issues/" title="Report Issues for Lektor"
|
||||
><i class="fa fa-bug"></i></a>
|
||||
<a href="https://twitter.com/getlektor" title="Find Lektor on Twitter"
|
||||
><i class="fa fa-twitter"></i></a>
|
||||
<a href="https://gitter.im/lektor/lektor" title="Chat on Gitter"
|
||||
><i class="fa fa-comment"></i></a>
|
||||
<a href="https://github.com/lektor/lektor-website/tree/master/content/docs/api/databags/contents.lr" title="View source for this page"><i class="fa fa-code"></i></a>
|
||||
</div>
|
||||
<div class="col-sm-8">
|
||||
<a href="../../../license/">License & Copyright</a> •
|
||||
<a href="../../../contact/">Contact</a> •
|
||||
Made with <i class="fa fa-fw fa-heart" title="Heart"><span hidden>Heart</span></i> in Carinthia
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
|
||||
<script type=text/javascript src="../../../static/app.js?h=bb1b933a" charset="utf-8"></script>
|
||||
<script>
|
||||
((window.gitter = {}).chat = {}).options = {
|
||||
room: 'lektor/lektor',
|
||||
activationElement: null
|
||||
};
|
||||
document.write('<button class="js-gitter-toggle-chat-button">Toggle Chat</button>');
|
||||
var dnt = navigator.doNotTrack || window.doNotTrack || navigator.msDoNotTrack;
|
||||
if (dnt != "1" && dnt != "yes") {
|
||||
window.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments)};ga.l=+new Date;
|
||||
ga('create', 'UA-70822533-1', 'auto');
|
||||
ga('set', 'anonymizeIp', true);
|
||||
ga('send', 'pageview');
|
||||
} else {
|
||||
console.debug("Respecting Do-Not-Track, not running analytics.");
|
||||
}
|
||||
</script>
|
||||
<script async src='https://www.google-analytics.com/analytics.js'></script>
|
||||
<script async defer id="github-bjs" src="https://buttons.github.io/buttons.js"></script>
|
||||
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script>
|
||||
<script src="https://sidecar.gitter.im/dist/sidecar.v1.js" async defer></script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,262 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<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/pygments.css">
|
||||
<link rel="shortcut icon" href="../../../../static/favicon.png?h=fa09bedd">
|
||||
<title>lookup | Documentation | Lektor Static Content Management System</title>
|
||||
</head>
|
||||
<body class="default">
|
||||
<nav class="navbar navbar-inverse navbar-static-top">
|
||||
<div class="container">
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle collapsed"
|
||||
data-toggle="collapse" data-target="#navbar"
|
||||
aria-expanded="false" aria-controls="navbar">
|
||||
<span class="sr-only">Toggle navigation</span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<a class="navbar-brand" href="../../../../">Lektor</a>
|
||||
</div>
|
||||
<div id="navbar" class="collapse navbar-collapse">
|
||||
<ul class="nav navbar-nav">
|
||||
|
||||
<li><a href="../../../../downloads/">Download</a></li>
|
||||
|
||||
<li class="active"><a href="../../../">Documentation</a></li>
|
||||
|
||||
<li><a href="../../../../showcase/">Showcase</a></li>
|
||||
|
||||
<li><a href="../../../../plugins/">Plugins</a></li>
|
||||
|
||||
<li><a href="../../../../community/">Community</a></li>
|
||||
|
||||
<li><a href="../../../../blog/">Blog</a></li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<div class="body-wrapper">
|
||||
|
||||
<div class="container">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-3">
|
||||
<ul class="tree-nav nocontent">
|
||||
<li><a href="../../../">Welcome</a></li>
|
||||
|
||||
|
||||
<li><a href="../../../what/">What is Lektor</a>
|
||||
|
||||
|
||||
<li><a href="../../../installation/">Installation</a>
|
||||
|
||||
|
||||
<li><a href="../../../quickstart/">Quickstart</a>
|
||||
|
||||
|
||||
<li><a href="../../../project/">Project</a>
|
||||
|
||||
|
||||
<li><a href="../../../content/">Content</a>
|
||||
|
||||
|
||||
<li><a href="../../../templates/">Templates</a>
|
||||
|
||||
|
||||
<li><a href="../../../themes/">Themes</a>
|
||||
|
||||
|
||||
<li><a href="../../../guides/">Guides</a>
|
||||
|
||||
|
||||
<li><a href="../../../deployment/">Deployment</a>
|
||||
|
||||
|
||||
<li><a href="../../../plugins/">Plugins</a>
|
||||
|
||||
|
||||
<li><a href="../../../models/">Data Modelling</a>
|
||||
|
||||
|
||||
<li><a href="../../../cli/">Command Line</a>
|
||||
|
||||
|
||||
<li><a href="../../">API</a>
|
||||
|
||||
<ul>
|
||||
<li><a href="../../build/">Build System</a>
|
||||
|
||||
|
||||
<li><a href="../">Databags</a>
|
||||
|
||||
<ul>
|
||||
<li><a href="../get-bag/">get_bag()</a>
|
||||
|
||||
|
||||
<li class="active"><a href="./">lookup()</a>
|
||||
|
||||
<ul></ul>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<li><a href="../../db/">Database</a>
|
||||
|
||||
|
||||
<li><a href="../../environment/">Environment</a>
|
||||
|
||||
|
||||
<li><a href="../../plugins/">Plugins</a>
|
||||
|
||||
|
||||
<li><a href="../../project/">Project</a>
|
||||
|
||||
|
||||
<li><a href="../../publisher/">Publisher</a>
|
||||
|
||||
|
||||
<li><a href="../../templates/">Template API</a>
|
||||
|
||||
|
||||
<li><a href="../../utils/">Utilities</a>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<li><a href="../../../search/">Search</a>
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<div class="visible-md-block visible-lg-block">
|
||||
<h4>This Page</h4>
|
||||
<ul class="toc">
|
||||
|
||||
<li><a href="#example">Example</a></li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-sm-9 doc-styling">
|
||||
|
||||
|
||||
<h1><i class="glyphicon glyphicon-cog"></i> <code class="obj">lookup</code> <span class="sig">(<code>key</code>)</span></h1>
|
||||
|
||||
|
||||
|
||||
<ul class=page-meta>
|
||||
|
||||
<li>Method of <a href="../">Databags</a></li>
|
||||
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
<p>This is the most common way to look up values from databags from regular
|
||||
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>
|
||||
<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">'i18n.</span><span class="si">%s</span><span class="s1">.</span><span class="si">%s</span><span class="s1">'</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>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="comment-box">
|
||||
<h2>Comments</h2>
|
||||
|
||||
<div id="disqus_thread"></div>
|
||||
<script>
|
||||
var disqus_config = function() { this.page.identifier = "/docs/api/databags/lookup"; this.page.url = "https://www.getlektor.com/docs/api/databags/lookup/"; };
|
||||
(function() {
|
||||
var d = document, s = d.createElement('script');
|
||||
s.src = '//lektordocumentation.disqus.com/embed.js';
|
||||
s.setAttribute('data-timestamp', +new Date());
|
||||
(d.head || d.body).appendChild(s);
|
||||
})();
|
||||
</script>
|
||||
<noscript>
|
||||
Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript"
|
||||
rel="nofollow">comments powered by Disqus.</a>
|
||||
</noscript>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="bottomsummary">
|
||||
<div class="container">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<footer>
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-sm-4 icon-bar">
|
||||
<a href="https://github.com/lektor/lektor/" title="Lektor on GitHub"
|
||||
><i class="fa fa-github"></i></a>
|
||||
<a href="https://github.com/lektor/lektor/issues/" title="Report Issues for Lektor"
|
||||
><i class="fa fa-bug"></i></a>
|
||||
<a href="https://twitter.com/getlektor" title="Find Lektor on Twitter"
|
||||
><i class="fa fa-twitter"></i></a>
|
||||
<a href="https://gitter.im/lektor/lektor" title="Chat on Gitter"
|
||||
><i class="fa fa-comment"></i></a>
|
||||
<a href="https://github.com/lektor/lektor-website/tree/master/content/docs/api/databags/lookup/contents.lr" title="View source for this page"><i class="fa fa-code"></i></a>
|
||||
</div>
|
||||
<div class="col-sm-8">
|
||||
<a href="../../../../license/">License & Copyright</a> •
|
||||
<a href="../../../../contact/">Contact</a> •
|
||||
Made with <i class="fa fa-fw fa-heart" title="Heart"><span hidden>Heart</span></i> in Carinthia
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
|
||||
<script type=text/javascript src="../../../../static/app.js?h=bb1b933a" charset="utf-8"></script>
|
||||
<script>
|
||||
((window.gitter = {}).chat = {}).options = {
|
||||
room: 'lektor/lektor',
|
||||
activationElement: null
|
||||
};
|
||||
document.write('<button class="js-gitter-toggle-chat-button">Toggle Chat</button>');
|
||||
var dnt = navigator.doNotTrack || window.doNotTrack || navigator.msDoNotTrack;
|
||||
if (dnt != "1" && dnt != "yes") {
|
||||
window.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments)};ga.l=+new Date;
|
||||
ga('create', 'UA-70822533-1', 'auto');
|
||||
ga('set', 'anonymizeIp', true);
|
||||
ga('send', 'pageview');
|
||||
} else {
|
||||
console.debug("Respecting Do-Not-Track, not running analytics.");
|
||||
}
|
||||
</script>
|
||||
<script async src='https://www.google-analytics.com/analytics.js'></script>
|
||||
<script async defer id="github-bjs" src="https://buttons.github.io/buttons.js"></script>
|
||||
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script>
|
||||
<script src="https://sidecar.gitter.im/dist/sidecar.v1.js" async defer></script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,338 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<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/pygments.css">
|
||||
<link rel="shortcut icon" href="../../../../../static/favicon.png?h=fa09bedd">
|
||||
<title>and | Documentation | Lektor Static Content Management System</title>
|
||||
</head>
|
||||
<body class="default">
|
||||
<nav class="navbar navbar-inverse navbar-static-top">
|
||||
<div class="container">
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle collapsed"
|
||||
data-toggle="collapse" data-target="#navbar"
|
||||
aria-expanded="false" aria-controls="navbar">
|
||||
<span class="sr-only">Toggle navigation</span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<a class="navbar-brand" href="../../../../../">Lektor</a>
|
||||
</div>
|
||||
<div id="navbar" class="collapse navbar-collapse">
|
||||
<ul class="nav navbar-nav">
|
||||
|
||||
<li><a href="../../../../../downloads/">Download</a></li>
|
||||
|
||||
<li class="active"><a href="../../../../">Documentation</a></li>
|
||||
|
||||
<li><a href="../../../../../showcase/">Showcase</a></li>
|
||||
|
||||
<li><a href="../../../../../plugins/">Plugins</a></li>
|
||||
|
||||
<li><a href="../../../../../community/">Community</a></li>
|
||||
|
||||
<li><a href="../../../../../blog/">Blog</a></li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<div class="body-wrapper">
|
||||
|
||||
<div class="container">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-3">
|
||||
<ul class="tree-nav nocontent">
|
||||
<li><a href="../../../../">Welcome</a></li>
|
||||
|
||||
|
||||
<li><a href="../../../../what/">What is Lektor</a>
|
||||
|
||||
|
||||
<li><a href="../../../../installation/">Installation</a>
|
||||
|
||||
|
||||
<li><a href="../../../../quickstart/">Quickstart</a>
|
||||
|
||||
|
||||
<li><a href="../../../../project/">Project</a>
|
||||
|
||||
|
||||
<li><a href="../../../../content/">Content</a>
|
||||
|
||||
|
||||
<li><a href="../../../../templates/">Templates</a>
|
||||
|
||||
|
||||
<li><a href="../../../../themes/">Themes</a>
|
||||
|
||||
|
||||
<li><a href="../../../../guides/">Guides</a>
|
||||
|
||||
|
||||
<li><a href="../../../../deployment/">Deployment</a>
|
||||
|
||||
|
||||
<li><a href="../../../../plugins/">Plugins</a>
|
||||
|
||||
|
||||
<li><a href="../../../../models/">Data Modelling</a>
|
||||
|
||||
|
||||
<li><a href="../../../../cli/">Command Line</a>
|
||||
|
||||
|
||||
<li><a href="../../../">API</a>
|
||||
|
||||
<ul>
|
||||
<li><a href="../../../build/">Build System</a>
|
||||
|
||||
|
||||
<li><a href="../../../databags/">Databags</a>
|
||||
|
||||
|
||||
<li><a href="../../">Database</a>
|
||||
|
||||
<ul>
|
||||
<li><a href="../../types/">Builtin Field Types</a>
|
||||
|
||||
|
||||
<li><a href="../">Expression</a>
|
||||
|
||||
<ul>
|
||||
<li><a href="../ne/">!=</a>
|
||||
|
||||
|
||||
<li><a href="../lt/"><</a>
|
||||
|
||||
|
||||
<li><a href="../le/"><=</a>
|
||||
|
||||
|
||||
<li><a href="../eq/">==</a>
|
||||
|
||||
|
||||
<li><a href="../gt/">></a>
|
||||
|
||||
|
||||
<li><a href="../ge/">>=</a>
|
||||
|
||||
|
||||
<li class="active"><a href="./">and()</a>
|
||||
|
||||
<ul></ul>
|
||||
|
||||
|
||||
<li><a href="../contains/">contains()</a>
|
||||
|
||||
|
||||
<li><a href="../endswith/">endswith()</a>
|
||||
|
||||
|
||||
<li><a href="../endswith-cs/">endswith_cs()</a>
|
||||
|
||||
|
||||
<li><a href="../or/">or()</a>
|
||||
|
||||
|
||||
<li><a href="../startswith/">startswith()</a>
|
||||
|
||||
|
||||
<li><a href="../startswith-cs/">startswith_cs()</a>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<li><a href="../../f/">F</a>
|
||||
|
||||
|
||||
<li><a href="../../get-alts/">get_alts()</a>
|
||||
|
||||
|
||||
<li><a href="../../pad/">Pad</a>
|
||||
|
||||
|
||||
<li><a href="../../query/">Query</a>
|
||||
|
||||
|
||||
<li><a href="../../record/">Record</a>
|
||||
|
||||
|
||||
<li><a href="../../obj/">SourceObject</a>
|
||||
|
||||
|
||||
<li><a href="../../system-fields/">System Fields</a>
|
||||
|
||||
|
||||
<li><a href="../../type/">Type</a>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<li><a href="../../../environment/">Environment</a>
|
||||
|
||||
|
||||
<li><a href="../../../plugins/">Plugins</a>
|
||||
|
||||
|
||||
<li><a href="../../../project/">Project</a>
|
||||
|
||||
|
||||
<li><a href="../../../publisher/">Publisher</a>
|
||||
|
||||
|
||||
<li><a href="../../../templates/">Template API</a>
|
||||
|
||||
|
||||
<li><a href="../../../utils/">Utilities</a>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<li><a href="../../../../search/">Search</a>
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<div class="visible-md-block visible-lg-block">
|
||||
<h4>This Page</h4>
|
||||
<ul class="toc">
|
||||
|
||||
<li><a href="#template-example">Template Example</a></li>
|
||||
|
||||
<li><a href="#python-example">Python Example</a></li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-sm-9 doc-styling">
|
||||
|
||||
|
||||
<h1><i class="glyphicon glyphicon-cog"></i> <code class="obj">and</code> <span class="sig">(<code>other</code>)</span></h1>
|
||||
|
||||
|
||||
|
||||
<ul class=page-meta>
|
||||
|
||||
<li>Method of <a href="../">Expression</a></li>
|
||||
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
<p>This evaluates to true if both the expression on the left as well as the
|
||||
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>&</code> operator.</p>
|
||||
<h2 id="template-example">Template Example</h2><div class="hll"><pre><span></span><span class="p"><</span><span class="nt">h3</span><span class="p">></span>3 Star or Higher<span class="p"></</span><span class="nt">h3</span><span class="p">></span>
|
||||
<span class="p"><</span><span class="nt">ul</span><span class="p">></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">'hotel'</span><span class="o">)</span><span class="nv">.and</span><span class="o">(</span><span class="nv">F.stars</span> <span class="o">>=</span> <span class="m">3</span><span class="o">))</span> <span class="cp">%}</span>
|
||||
<span class="p"><</span><span class="nt">li</span><span class="p">></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"></</span><span class="nt">li</span><span class="p">></span>
|
||||
<span class="cp">{%</span> <span class="k">endfor</span> <span class="cp">%}</span>
|
||||
<span class="p"></</span><span class="nt">ul</span><span class="p">></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>
|
||||
<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">'hotel'</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">stars</span> <span class="o">>=</span> <span class="mi">3</span><span class="p">))</span>
|
||||
</pre></div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="comment-box">
|
||||
<h2>Comments</h2>
|
||||
|
||||
<div id="disqus_thread"></div>
|
||||
<script>
|
||||
var disqus_config = function() { this.page.identifier = "/docs/api/db/expression/and"; this.page.url = "https://www.getlektor.com/docs/api/db/expression/and/"; };
|
||||
(function() {
|
||||
var d = document, s = d.createElement('script');
|
||||
s.src = '//lektordocumentation.disqus.com/embed.js';
|
||||
s.setAttribute('data-timestamp', +new Date());
|
||||
(d.head || d.body).appendChild(s);
|
||||
})();
|
||||
</script>
|
||||
<noscript>
|
||||
Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript"
|
||||
rel="nofollow">comments powered by Disqus.</a>
|
||||
</noscript>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="bottomsummary">
|
||||
<div class="container">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<footer>
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-sm-4 icon-bar">
|
||||
<a href="https://github.com/lektor/lektor/" title="Lektor on GitHub"
|
||||
><i class="fa fa-github"></i></a>
|
||||
<a href="https://github.com/lektor/lektor/issues/" title="Report Issues for Lektor"
|
||||
><i class="fa fa-bug"></i></a>
|
||||
<a href="https://twitter.com/getlektor" title="Find Lektor on Twitter"
|
||||
><i class="fa fa-twitter"></i></a>
|
||||
<a href="https://gitter.im/lektor/lektor" title="Chat on Gitter"
|
||||
><i class="fa fa-comment"></i></a>
|
||||
<a href="https://github.com/lektor/lektor-website/tree/master/content/docs/api/db/expression/and/contents.lr" title="View source for this page"><i class="fa fa-code"></i></a>
|
||||
</div>
|
||||
<div class="col-sm-8">
|
||||
<a href="../../../../../license/">License & Copyright</a> •
|
||||
<a href="../../../../../contact/">Contact</a> •
|
||||
Made with <i class="fa fa-fw fa-heart" title="Heart"><span hidden>Heart</span></i> in Carinthia
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
|
||||
<script type=text/javascript src="../../../../../static/app.js?h=bb1b933a" charset="utf-8"></script>
|
||||
<script>
|
||||
((window.gitter = {}).chat = {}).options = {
|
||||
room: 'lektor/lektor',
|
||||
activationElement: null
|
||||
};
|
||||
document.write('<button class="js-gitter-toggle-chat-button">Toggle Chat</button>');
|
||||
var dnt = navigator.doNotTrack || window.doNotTrack || navigator.msDoNotTrack;
|
||||
if (dnt != "1" && dnt != "yes") {
|
||||
window.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments)};ga.l=+new Date;
|
||||
ga('create', 'UA-70822533-1', 'auto');
|
||||
ga('set', 'anonymizeIp', true);
|
||||
ga('send', 'pageview');
|
||||
} else {
|
||||
console.debug("Respecting Do-Not-Track, not running analytics.");
|
||||
}
|
||||
</script>
|
||||
<script async src='https://www.google-analytics.com/analytics.js'></script>
|
||||
<script async defer id="github-bjs" src="https://buttons.github.io/buttons.js"></script>
|
||||
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script>
|
||||
<script src="https://sidecar.gitter.im/dist/sidecar.v1.js" async defer></script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,330 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<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/pygments.css">
|
||||
<link rel="shortcut icon" href="../../../../../static/favicon.png?h=fa09bedd">
|
||||
<title>contains | Documentation | Lektor Static Content Management System</title>
|
||||
</head>
|
||||
<body class="default">
|
||||
<nav class="navbar navbar-inverse navbar-static-top">
|
||||
<div class="container">
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle collapsed"
|
||||
data-toggle="collapse" data-target="#navbar"
|
||||
aria-expanded="false" aria-controls="navbar">
|
||||
<span class="sr-only">Toggle navigation</span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<a class="navbar-brand" href="../../../../../">Lektor</a>
|
||||
</div>
|
||||
<div id="navbar" class="collapse navbar-collapse">
|
||||
<ul class="nav navbar-nav">
|
||||
|
||||
<li><a href="../../../../../downloads/">Download</a></li>
|
||||
|
||||
<li class="active"><a href="../../../../">Documentation</a></li>
|
||||
|
||||
<li><a href="../../../../../showcase/">Showcase</a></li>
|
||||
|
||||
<li><a href="../../../../../plugins/">Plugins</a></li>
|
||||
|
||||
<li><a href="../../../../../community/">Community</a></li>
|
||||
|
||||
<li><a href="../../../../../blog/">Blog</a></li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<div class="body-wrapper">
|
||||
|
||||
<div class="container">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-3">
|
||||
<ul class="tree-nav nocontent">
|
||||
<li><a href="../../../../">Welcome</a></li>
|
||||
|
||||
|
||||
<li><a href="../../../../what/">What is Lektor</a>
|
||||
|
||||
|
||||
<li><a href="../../../../installation/">Installation</a>
|
||||
|
||||
|
||||
<li><a href="../../../../quickstart/">Quickstart</a>
|
||||
|
||||
|
||||
<li><a href="../../../../project/">Project</a>
|
||||
|
||||
|
||||
<li><a href="../../../../content/">Content</a>
|
||||
|
||||
|
||||
<li><a href="../../../../templates/">Templates</a>
|
||||
|
||||
|
||||
<li><a href="../../../../themes/">Themes</a>
|
||||
|
||||
|
||||
<li><a href="../../../../guides/">Guides</a>
|
||||
|
||||
|
||||
<li><a href="../../../../deployment/">Deployment</a>
|
||||
|
||||
|
||||
<li><a href="../../../../plugins/">Plugins</a>
|
||||
|
||||
|
||||
<li><a href="../../../../models/">Data Modelling</a>
|
||||
|
||||
|
||||
<li><a href="../../../../cli/">Command Line</a>
|
||||
|
||||
|
||||
<li><a href="../../../">API</a>
|
||||
|
||||
<ul>
|
||||
<li><a href="../../../build/">Build System</a>
|
||||
|
||||
|
||||
<li><a href="../../../databags/">Databags</a>
|
||||
|
||||
|
||||
<li><a href="../../">Database</a>
|
||||
|
||||
<ul>
|
||||
<li><a href="../../types/">Builtin Field Types</a>
|
||||
|
||||
|
||||
<li><a href="../">Expression</a>
|
||||
|
||||
<ul>
|
||||
<li><a href="../ne/">!=</a>
|
||||
|
||||
|
||||
<li><a href="../lt/"><</a>
|
||||
|
||||
|
||||
<li><a href="../le/"><=</a>
|
||||
|
||||
|
||||
<li><a href="../eq/">==</a>
|
||||
|
||||
|
||||
<li><a href="../gt/">></a>
|
||||
|
||||
|
||||
<li><a href="../ge/">>=</a>
|
||||
|
||||
|
||||
<li><a href="../and/">and()</a>
|
||||
|
||||
|
||||
<li class="active"><a href="./">contains()</a>
|
||||
|
||||
<ul></ul>
|
||||
|
||||
|
||||
<li><a href="../endswith/">endswith()</a>
|
||||
|
||||
|
||||
<li><a href="../endswith-cs/">endswith_cs()</a>
|
||||
|
||||
|
||||
<li><a href="../or/">or()</a>
|
||||
|
||||
|
||||
<li><a href="../startswith/">startswith()</a>
|
||||
|
||||
|
||||
<li><a href="../startswith-cs/">startswith_cs()</a>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<li><a href="../../f/">F</a>
|
||||
|
||||
|
||||
<li><a href="../../get-alts/">get_alts()</a>
|
||||
|
||||
|
||||
<li><a href="../../pad/">Pad</a>
|
||||
|
||||
|
||||
<li><a href="../../query/">Query</a>
|
||||
|
||||
|
||||
<li><a href="../../record/">Record</a>
|
||||
|
||||
|
||||
<li><a href="../../obj/">SourceObject</a>
|
||||
|
||||
|
||||
<li><a href="../../system-fields/">System Fields</a>
|
||||
|
||||
|
||||
<li><a href="../../type/">Type</a>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<li><a href="../../../environment/">Environment</a>
|
||||
|
||||
|
||||
<li><a href="../../../plugins/">Plugins</a>
|
||||
|
||||
|
||||
<li><a href="../../../project/">Project</a>
|
||||
|
||||
|
||||
<li><a href="../../../publisher/">Publisher</a>
|
||||
|
||||
|
||||
<li><a href="../../../templates/">Template API</a>
|
||||
|
||||
|
||||
<li><a href="../../../utils/">Utilities</a>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<li><a href="../../../../search/">Search</a>
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<div class="visible-md-block visible-lg-block">
|
||||
<h4>This Page</h4>
|
||||
<ul class="toc">
|
||||
|
||||
<li><a href="#template-example">Template Example</a></li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-sm-9 doc-styling">
|
||||
|
||||
|
||||
<h1><i class="glyphicon glyphicon-cog"></i> <code class="obj">contains</code> <span class="sig">(<code>item</code>)</span></h1>
|
||||
|
||||
|
||||
|
||||
<ul class=page-meta>
|
||||
|
||||
<li>Method of <a href="../">Expression</a></li>
|
||||
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
<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"><</span><span class="nt">h3</span><span class="p">></span>Projects Tagged 'amazing'<span class="p"></</span><span class="nt">h3</span><span class="p">></span>
|
||||
<span class="p"><</span><span class="nt">ul</span><span class="p">></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">'amazing'</span><span class="o">))</span> <span class="cp">%}</span>
|
||||
<span class="p"><</span><span class="nt">li</span><span class="p">></span><span class="cp">{{</span> <span class="nv">item.name</span> <span class="cp">}}</span><span class="p"></</span><span class="nt">li</span><span class="p">></span>
|
||||
<span class="cp">{%</span> <span class="k">endfor</span> <span class="cp">%}</span>
|
||||
<span class="p"></</span><span class="nt">ul</span><span class="p">></span>
|
||||
</pre></div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="comment-box">
|
||||
<h2>Comments</h2>
|
||||
|
||||
<div id="disqus_thread"></div>
|
||||
<script>
|
||||
var disqus_config = function() { this.page.identifier = "/docs/api/db/expression/contains"; this.page.url = "https://www.getlektor.com/docs/api/db/expression/contains/"; };
|
||||
(function() {
|
||||
var d = document, s = d.createElement('script');
|
||||
s.src = '//lektordocumentation.disqus.com/embed.js';
|
||||
s.setAttribute('data-timestamp', +new Date());
|
||||
(d.head || d.body).appendChild(s);
|
||||
})();
|
||||
</script>
|
||||
<noscript>
|
||||
Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript"
|
||||
rel="nofollow">comments powered by Disqus.</a>
|
||||
</noscript>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="bottomsummary">
|
||||
<div class="container">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<footer>
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-sm-4 icon-bar">
|
||||
<a href="https://github.com/lektor/lektor/" title="Lektor on GitHub"
|
||||
><i class="fa fa-github"></i></a>
|
||||
<a href="https://github.com/lektor/lektor/issues/" title="Report Issues for Lektor"
|
||||
><i class="fa fa-bug"></i></a>
|
||||
<a href="https://twitter.com/getlektor" title="Find Lektor on Twitter"
|
||||
><i class="fa fa-twitter"></i></a>
|
||||
<a href="https://gitter.im/lektor/lektor" title="Chat on Gitter"
|
||||
><i class="fa fa-comment"></i></a>
|
||||
<a href="https://github.com/lektor/lektor-website/tree/master/content/docs/api/db/expression/contains/contents.lr" title="View source for this page"><i class="fa fa-code"></i></a>
|
||||
</div>
|
||||
<div class="col-sm-8">
|
||||
<a href="../../../../../license/">License & Copyright</a> •
|
||||
<a href="../../../../../contact/">Contact</a> •
|
||||
Made with <i class="fa fa-fw fa-heart" title="Heart"><span hidden>Heart</span></i> in Carinthia
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
|
||||
<script type=text/javascript src="../../../../../static/app.js?h=bb1b933a" charset="utf-8"></script>
|
||||
<script>
|
||||
((window.gitter = {}).chat = {}).options = {
|
||||
room: 'lektor/lektor',
|
||||
activationElement: null
|
||||
};
|
||||
document.write('<button class="js-gitter-toggle-chat-button">Toggle Chat</button>');
|
||||
var dnt = navigator.doNotTrack || window.doNotTrack || navigator.msDoNotTrack;
|
||||
if (dnt != "1" && dnt != "yes") {
|
||||
window.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments)};ga.l=+new Date;
|
||||
ga('create', 'UA-70822533-1', 'auto');
|
||||
ga('set', 'anonymizeIp', true);
|
||||
ga('send', 'pageview');
|
||||
} else {
|
||||
console.debug("Respecting Do-Not-Track, not running analytics.");
|
||||
}
|
||||
</script>
|
||||
<script async src='https://www.google-analytics.com/analytics.js'></script>
|
||||
<script async defer id="github-bjs" src="https://buttons.github.io/buttons.js"></script>
|
||||
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script>
|
||||
<script src="https://sidecar.gitter.im/dist/sidecar.v1.js" async defer></script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,330 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<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/pygments.css">
|
||||
<link rel="shortcut icon" href="../../../../../static/favicon.png?h=fa09bedd">
|
||||
<title>endswith_cs | Documentation | Lektor Static Content Management System</title>
|
||||
</head>
|
||||
<body class="default">
|
||||
<nav class="navbar navbar-inverse navbar-static-top">
|
||||
<div class="container">
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle collapsed"
|
||||
data-toggle="collapse" data-target="#navbar"
|
||||
aria-expanded="false" aria-controls="navbar">
|
||||
<span class="sr-only">Toggle navigation</span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<a class="navbar-brand" href="../../../../../">Lektor</a>
|
||||
</div>
|
||||
<div id="navbar" class="collapse navbar-collapse">
|
||||
<ul class="nav navbar-nav">
|
||||
|
||||
<li><a href="../../../../../downloads/">Download</a></li>
|
||||
|
||||
<li class="active"><a href="../../../../">Documentation</a></li>
|
||||
|
||||
<li><a href="../../../../../showcase/">Showcase</a></li>
|
||||
|
||||
<li><a href="../../../../../plugins/">Plugins</a></li>
|
||||
|
||||
<li><a href="../../../../../community/">Community</a></li>
|
||||
|
||||
<li><a href="../../../../../blog/">Blog</a></li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<div class="body-wrapper">
|
||||
|
||||
<div class="container">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-3">
|
||||
<ul class="tree-nav nocontent">
|
||||
<li><a href="../../../../">Welcome</a></li>
|
||||
|
||||
|
||||
<li><a href="../../../../what/">What is Lektor</a>
|
||||
|
||||
|
||||
<li><a href="../../../../installation/">Installation</a>
|
||||
|
||||
|
||||
<li><a href="../../../../quickstart/">Quickstart</a>
|
||||
|
||||
|
||||
<li><a href="../../../../project/">Project</a>
|
||||
|
||||
|
||||
<li><a href="../../../../content/">Content</a>
|
||||
|
||||
|
||||
<li><a href="../../../../templates/">Templates</a>
|
||||
|
||||
|
||||
<li><a href="../../../../themes/">Themes</a>
|
||||
|
||||
|
||||
<li><a href="../../../../guides/">Guides</a>
|
||||
|
||||
|
||||
<li><a href="../../../../deployment/">Deployment</a>
|
||||
|
||||
|
||||
<li><a href="../../../../plugins/">Plugins</a>
|
||||
|
||||
|
||||
<li><a href="../../../../models/">Data Modelling</a>
|
||||
|
||||
|
||||
<li><a href="../../../../cli/">Command Line</a>
|
||||
|
||||
|
||||
<li><a href="../../../">API</a>
|
||||
|
||||
<ul>
|
||||
<li><a href="../../../build/">Build System</a>
|
||||
|
||||
|
||||
<li><a href="../../../databags/">Databags</a>
|
||||
|
||||
|
||||
<li><a href="../../">Database</a>
|
||||
|
||||
<ul>
|
||||
<li><a href="../../types/">Builtin Field Types</a>
|
||||
|
||||
|
||||
<li><a href="../">Expression</a>
|
||||
|
||||
<ul>
|
||||
<li><a href="../ne/">!=</a>
|
||||
|
||||
|
||||
<li><a href="../lt/"><</a>
|
||||
|
||||
|
||||
<li><a href="../le/"><=</a>
|
||||
|
||||
|
||||
<li><a href="../eq/">==</a>
|
||||
|
||||
|
||||
<li><a href="../gt/">></a>
|
||||
|
||||
|
||||
<li><a href="../ge/">>=</a>
|
||||
|
||||
|
||||
<li><a href="../and/">and()</a>
|
||||
|
||||
|
||||
<li><a href="../contains/">contains()</a>
|
||||
|
||||
|
||||
<li><a href="../endswith/">endswith()</a>
|
||||
|
||||
|
||||
<li class="active"><a href="./">endswith_cs()</a>
|
||||
|
||||
<ul></ul>
|
||||
|
||||
|
||||
<li><a href="../or/">or()</a>
|
||||
|
||||
|
||||
<li><a href="../startswith/">startswith()</a>
|
||||
|
||||
|
||||
<li><a href="../startswith-cs/">startswith_cs()</a>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<li><a href="../../f/">F</a>
|
||||
|
||||
|
||||
<li><a href="../../get-alts/">get_alts()</a>
|
||||
|
||||
|
||||
<li><a href="../../pad/">Pad</a>
|
||||
|
||||
|
||||
<li><a href="../../query/">Query</a>
|
||||
|
||||
|
||||
<li><a href="../../record/">Record</a>
|
||||
|
||||
|
||||
<li><a href="../../obj/">SourceObject</a>
|
||||
|
||||
|
||||
<li><a href="../../system-fields/">System Fields</a>
|
||||
|
||||
|
||||
<li><a href="../../type/">Type</a>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<li><a href="../../../environment/">Environment</a>
|
||||
|
||||
|
||||
<li><a href="../../../plugins/">Plugins</a>
|
||||
|
||||
|
||||
<li><a href="../../../project/">Project</a>
|
||||
|
||||
|
||||
<li><a href="../../../publisher/">Publisher</a>
|
||||
|
||||
|
||||
<li><a href="../../../templates/">Template API</a>
|
||||
|
||||
|
||||
<li><a href="../../../utils/">Utilities</a>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<li><a href="../../../../search/">Search</a>
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<div class="visible-md-block visible-lg-block">
|
||||
<h4>This Page</h4>
|
||||
<ul class="toc">
|
||||
|
||||
<li><a href="#example">Example</a></li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-sm-9 doc-styling">
|
||||
|
||||
|
||||
<h1><i class="glyphicon glyphicon-cog"></i> <code class="obj">endswith_cs</code> <span class="sig">(<code>other</code>)</span></h1>
|
||||
|
||||
|
||||
|
||||
<ul class=page-meta>
|
||||
|
||||
<li>Method of <a href="../">Expression</a></li>
|
||||
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
<p>This evaluates to true if the <a href="../../types/string/" class="ref">string</a>
|
||||
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"><</span><span class="nt">ul</span><span class="p">></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">'House'</span><span class="o">))</span> <span class="cp">%}</span>
|
||||
<span class="p"><</span><span class="nt">li</span><span class="p">></span><span class="cp">{{</span> <span class="nv">item.name</span> <span class="cp">}}</span><span class="p"></</span><span class="nt">li</span><span class="p">></span>
|
||||
<span class="cp">{%</span> <span class="k">endfor</span> <span class="cp">%}</span>
|
||||
<span class="p"></</span><span class="nt">ul</span><span class="p">></span>
|
||||
</pre></div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="comment-box">
|
||||
<h2>Comments</h2>
|
||||
|
||||
<div id="disqus_thread"></div>
|
||||
<script>
|
||||
var disqus_config = function() { this.page.identifier = "/docs/api/db/expression/endswith-cs"; this.page.url = "https://www.getlektor.com/docs/api/db/expression/endswith-cs/"; };
|
||||
(function() {
|
||||
var d = document, s = d.createElement('script');
|
||||
s.src = '//lektordocumentation.disqus.com/embed.js';
|
||||
s.setAttribute('data-timestamp', +new Date());
|
||||
(d.head || d.body).appendChild(s);
|
||||
})();
|
||||
</script>
|
||||
<noscript>
|
||||
Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript"
|
||||
rel="nofollow">comments powered by Disqus.</a>
|
||||
</noscript>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="bottomsummary">
|
||||
<div class="container">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<footer>
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-sm-4 icon-bar">
|
||||
<a href="https://github.com/lektor/lektor/" title="Lektor on GitHub"
|
||||
><i class="fa fa-github"></i></a>
|
||||
<a href="https://github.com/lektor/lektor/issues/" title="Report Issues for Lektor"
|
||||
><i class="fa fa-bug"></i></a>
|
||||
<a href="https://twitter.com/getlektor" title="Find Lektor on Twitter"
|
||||
><i class="fa fa-twitter"></i></a>
|
||||
<a href="https://gitter.im/lektor/lektor" title="Chat on Gitter"
|
||||
><i class="fa fa-comment"></i></a>
|
||||
<a href="https://github.com/lektor/lektor-website/tree/master/content/docs/api/db/expression/endswith-cs/contents.lr" title="View source for this page"><i class="fa fa-code"></i></a>
|
||||
</div>
|
||||
<div class="col-sm-8">
|
||||
<a href="../../../../../license/">License & Copyright</a> •
|
||||
<a href="../../../../../contact/">Contact</a> •
|
||||
Made with <i class="fa fa-fw fa-heart" title="Heart"><span hidden>Heart</span></i> in Carinthia
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
|
||||
<script type=text/javascript src="../../../../../static/app.js?h=bb1b933a" charset="utf-8"></script>
|
||||
<script>
|
||||
((window.gitter = {}).chat = {}).options = {
|
||||
room: 'lektor/lektor',
|
||||
activationElement: null
|
||||
};
|
||||
document.write('<button class="js-gitter-toggle-chat-button">Toggle Chat</button>');
|
||||
var dnt = navigator.doNotTrack || window.doNotTrack || navigator.msDoNotTrack;
|
||||
if (dnt != "1" && dnt != "yes") {
|
||||
window.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments)};ga.l=+new Date;
|
||||
ga('create', 'UA-70822533-1', 'auto');
|
||||
ga('set', 'anonymizeIp', true);
|
||||
ga('send', 'pageview');
|
||||
} else {
|
||||
console.debug("Respecting Do-Not-Track, not running analytics.");
|
||||
}
|
||||
</script>
|
||||
<script async src='https://www.google-analytics.com/analytics.js'></script>
|
||||
<script async defer id="github-bjs" src="https://buttons.github.io/buttons.js"></script>
|
||||
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script>
|
||||
<script src="https://sidecar.gitter.im/dist/sidecar.v1.js" async defer></script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,330 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<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/pygments.css">
|
||||
<link rel="shortcut icon" href="../../../../../static/favicon.png?h=fa09bedd">
|
||||
<title>endswith | Documentation | Lektor Static Content Management System</title>
|
||||
</head>
|
||||
<body class="default">
|
||||
<nav class="navbar navbar-inverse navbar-static-top">
|
||||
<div class="container">
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle collapsed"
|
||||
data-toggle="collapse" data-target="#navbar"
|
||||
aria-expanded="false" aria-controls="navbar">
|
||||
<span class="sr-only">Toggle navigation</span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<a class="navbar-brand" href="../../../../../">Lektor</a>
|
||||
</div>
|
||||
<div id="navbar" class="collapse navbar-collapse">
|
||||
<ul class="nav navbar-nav">
|
||||
|
||||
<li><a href="../../../../../downloads/">Download</a></li>
|
||||
|
||||
<li class="active"><a href="../../../../">Documentation</a></li>
|
||||
|
||||
<li><a href="../../../../../showcase/">Showcase</a></li>
|
||||
|
||||
<li><a href="../../../../../plugins/">Plugins</a></li>
|
||||
|
||||
<li><a href="../../../../../community/">Community</a></li>
|
||||
|
||||
<li><a href="../../../../../blog/">Blog</a></li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<div class="body-wrapper">
|
||||
|
||||
<div class="container">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-3">
|
||||
<ul class="tree-nav nocontent">
|
||||
<li><a href="../../../../">Welcome</a></li>
|
||||
|
||||
|
||||
<li><a href="../../../../what/">What is Lektor</a>
|
||||
|
||||
|
||||
<li><a href="../../../../installation/">Installation</a>
|
||||
|
||||
|
||||
<li><a href="../../../../quickstart/">Quickstart</a>
|
||||
|
||||
|
||||
<li><a href="../../../../project/">Project</a>
|
||||
|
||||
|
||||
<li><a href="../../../../content/">Content</a>
|
||||
|
||||
|
||||
<li><a href="../../../../templates/">Templates</a>
|
||||
|
||||
|
||||
<li><a href="../../../../themes/">Themes</a>
|
||||
|
||||
|
||||
<li><a href="../../../../guides/">Guides</a>
|
||||
|
||||
|
||||
<li><a href="../../../../deployment/">Deployment</a>
|
||||
|
||||
|
||||
<li><a href="../../../../plugins/">Plugins</a>
|
||||
|
||||
|
||||
<li><a href="../../../../models/">Data Modelling</a>
|
||||
|
||||
|
||||
<li><a href="../../../../cli/">Command Line</a>
|
||||
|
||||
|
||||
<li><a href="../../../">API</a>
|
||||
|
||||
<ul>
|
||||
<li><a href="../../../build/">Build System</a>
|
||||
|
||||
|
||||
<li><a href="../../../databags/">Databags</a>
|
||||
|
||||
|
||||
<li><a href="../../">Database</a>
|
||||
|
||||
<ul>
|
||||
<li><a href="../../types/">Builtin Field Types</a>
|
||||
|
||||
|
||||
<li><a href="../">Expression</a>
|
||||
|
||||
<ul>
|
||||
<li><a href="../ne/">!=</a>
|
||||
|
||||
|
||||
<li><a href="../lt/"><</a>
|
||||
|
||||
|
||||
<li><a href="../le/"><=</a>
|
||||
|
||||
|
||||
<li><a href="../eq/">==</a>
|
||||
|
||||
|
||||
<li><a href="../gt/">></a>
|
||||
|
||||
|
||||
<li><a href="../ge/">>=</a>
|
||||
|
||||
|
||||
<li><a href="../and/">and()</a>
|
||||
|
||||
|
||||
<li><a href="../contains/">contains()</a>
|
||||
|
||||
|
||||
<li class="active"><a href="./">endswith()</a>
|
||||
|
||||
<ul></ul>
|
||||
|
||||
|
||||
<li><a href="../endswith-cs/">endswith_cs()</a>
|
||||
|
||||
|
||||
<li><a href="../or/">or()</a>
|
||||
|
||||
|
||||
<li><a href="../startswith/">startswith()</a>
|
||||
|
||||
|
||||
<li><a href="../startswith-cs/">startswith_cs()</a>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<li><a href="../../f/">F</a>
|
||||
|
||||
|
||||
<li><a href="../../get-alts/">get_alts()</a>
|
||||
|
||||
|
||||
<li><a href="../../pad/">Pad</a>
|
||||
|
||||
|
||||
<li><a href="../../query/">Query</a>
|
||||
|
||||
|
||||
<li><a href="../../record/">Record</a>
|
||||
|
||||
|
||||
<li><a href="../../obj/">SourceObject</a>
|
||||
|
||||
|
||||
<li><a href="../../system-fields/">System Fields</a>
|
||||
|
||||
|
||||
<li><a href="../../type/">Type</a>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<li><a href="../../../environment/">Environment</a>
|
||||
|
||||
|
||||
<li><a href="../../../plugins/">Plugins</a>
|
||||
|
||||
|
||||
<li><a href="../../../project/">Project</a>
|
||||
|
||||
|
||||
<li><a href="../../../publisher/">Publisher</a>
|
||||
|
||||
|
||||
<li><a href="../../../templates/">Template API</a>
|
||||
|
||||
|
||||
<li><a href="../../../utils/">Utilities</a>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<li><a href="../../../../search/">Search</a>
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<div class="visible-md-block visible-lg-block">
|
||||
<h4>This Page</h4>
|
||||
<ul class="toc">
|
||||
|
||||
<li><a href="#example">Example</a></li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-sm-9 doc-styling">
|
||||
|
||||
|
||||
<h1><i class="glyphicon glyphicon-cog"></i> <code class="obj">endswith</code> <span class="sig">(<code>other</code>)</span></h1>
|
||||
|
||||
|
||||
|
||||
<ul class=page-meta>
|
||||
|
||||
<li>Method of <a href="../">Expression</a></li>
|
||||
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
<p>This evaluates to true if the <a href="../../types/string/" class="ref">string</a>
|
||||
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"><</span><span class="nt">ul</span><span class="p">></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">'house'</span><span class="o">))</span> <span class="cp">%}</span>
|
||||
<span class="p"><</span><span class="nt">li</span><span class="p">></span><span class="cp">{{</span> <span class="nv">item.name</span> <span class="cp">}}</span><span class="p"></</span><span class="nt">li</span><span class="p">></span>
|
||||
<span class="cp">{%</span> <span class="k">endfor</span> <span class="cp">%}</span>
|
||||
<span class="p"></</span><span class="nt">ul</span><span class="p">></span>
|
||||
</pre></div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="comment-box">
|
||||
<h2>Comments</h2>
|
||||
|
||||
<div id="disqus_thread"></div>
|
||||
<script>
|
||||
var disqus_config = function() { this.page.identifier = "/docs/api/db/expression/endswith"; this.page.url = "https://www.getlektor.com/docs/api/db/expression/endswith/"; };
|
||||
(function() {
|
||||
var d = document, s = d.createElement('script');
|
||||
s.src = '//lektordocumentation.disqus.com/embed.js';
|
||||
s.setAttribute('data-timestamp', +new Date());
|
||||
(d.head || d.body).appendChild(s);
|
||||
})();
|
||||
</script>
|
||||
<noscript>
|
||||
Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript"
|
||||
rel="nofollow">comments powered by Disqus.</a>
|
||||
</noscript>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="bottomsummary">
|
||||
<div class="container">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<footer>
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-sm-4 icon-bar">
|
||||
<a href="https://github.com/lektor/lektor/" title="Lektor on GitHub"
|
||||
><i class="fa fa-github"></i></a>
|
||||
<a href="https://github.com/lektor/lektor/issues/" title="Report Issues for Lektor"
|
||||
><i class="fa fa-bug"></i></a>
|
||||
<a href="https://twitter.com/getlektor" title="Find Lektor on Twitter"
|
||||
><i class="fa fa-twitter"></i></a>
|
||||
<a href="https://gitter.im/lektor/lektor" title="Chat on Gitter"
|
||||
><i class="fa fa-comment"></i></a>
|
||||
<a href="https://github.com/lektor/lektor-website/tree/master/content/docs/api/db/expression/endswith/contents.lr" title="View source for this page"><i class="fa fa-code"></i></a>
|
||||
</div>
|
||||
<div class="col-sm-8">
|
||||
<a href="../../../../../license/">License & Copyright</a> •
|
||||
<a href="../../../../../contact/">Contact</a> •
|
||||
Made with <i class="fa fa-fw fa-heart" title="Heart"><span hidden>Heart</span></i> in Carinthia
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
|
||||
<script type=text/javascript src="../../../../../static/app.js?h=bb1b933a" charset="utf-8"></script>
|
||||
<script>
|
||||
((window.gitter = {}).chat = {}).options = {
|
||||
room: 'lektor/lektor',
|
||||
activationElement: null
|
||||
};
|
||||
document.write('<button class="js-gitter-toggle-chat-button">Toggle Chat</button>');
|
||||
var dnt = navigator.doNotTrack || window.doNotTrack || navigator.msDoNotTrack;
|
||||
if (dnt != "1" && dnt != "yes") {
|
||||
window.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments)};ga.l=+new Date;
|
||||
ga('create', 'UA-70822533-1', 'auto');
|
||||
ga('set', 'anonymizeIp', true);
|
||||
ga('send', 'pageview');
|
||||
} else {
|
||||
console.debug("Respecting Do-Not-Track, not running analytics.");
|
||||
}
|
||||
</script>
|
||||
<script async src='https://www.google-analytics.com/analytics.js'></script>
|
||||
<script async defer id="github-bjs" src="https://buttons.github.io/buttons.js"></script>
|
||||
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script>
|
||||
<script src="https://sidecar.gitter.im/dist/sidecar.v1.js" async defer></script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,329 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<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/pygments.css">
|
||||
<link rel="shortcut icon" href="../../../../../static/favicon.png?h=fa09bedd">
|
||||
<title>== | Documentation | Lektor Static Content Management System</title>
|
||||
</head>
|
||||
<body class="default">
|
||||
<nav class="navbar navbar-inverse navbar-static-top">
|
||||
<div class="container">
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle collapsed"
|
||||
data-toggle="collapse" data-target="#navbar"
|
||||
aria-expanded="false" aria-controls="navbar">
|
||||
<span class="sr-only">Toggle navigation</span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<a class="navbar-brand" href="../../../../../">Lektor</a>
|
||||
</div>
|
||||
<div id="navbar" class="collapse navbar-collapse">
|
||||
<ul class="nav navbar-nav">
|
||||
|
||||
<li><a href="../../../../../downloads/">Download</a></li>
|
||||
|
||||
<li class="active"><a href="../../../../">Documentation</a></li>
|
||||
|
||||
<li><a href="../../../../../showcase/">Showcase</a></li>
|
||||
|
||||
<li><a href="../../../../../plugins/">Plugins</a></li>
|
||||
|
||||
<li><a href="../../../../../community/">Community</a></li>
|
||||
|
||||
<li><a href="../../../../../blog/">Blog</a></li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<div class="body-wrapper">
|
||||
|
||||
<div class="container">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-3">
|
||||
<ul class="tree-nav nocontent">
|
||||
<li><a href="../../../../">Welcome</a></li>
|
||||
|
||||
|
||||
<li><a href="../../../../what/">What is Lektor</a>
|
||||
|
||||
|
||||
<li><a href="../../../../installation/">Installation</a>
|
||||
|
||||
|
||||
<li><a href="../../../../quickstart/">Quickstart</a>
|
||||
|
||||
|
||||
<li><a href="../../../../project/">Project</a>
|
||||
|
||||
|
||||
<li><a href="../../../../content/">Content</a>
|
||||
|
||||
|
||||
<li><a href="../../../../templates/">Templates</a>
|
||||
|
||||
|
||||
<li><a href="../../../../themes/">Themes</a>
|
||||
|
||||
|
||||
<li><a href="../../../../guides/">Guides</a>
|
||||
|
||||
|
||||
<li><a href="../../../../deployment/">Deployment</a>
|
||||
|
||||
|
||||
<li><a href="../../../../plugins/">Plugins</a>
|
||||
|
||||
|
||||
<li><a href="../../../../models/">Data Modelling</a>
|
||||
|
||||
|
||||
<li><a href="../../../../cli/">Command Line</a>
|
||||
|
||||
|
||||
<li><a href="../../../">API</a>
|
||||
|
||||
<ul>
|
||||
<li><a href="../../../build/">Build System</a>
|
||||
|
||||
|
||||
<li><a href="../../../databags/">Databags</a>
|
||||
|
||||
|
||||
<li><a href="../../">Database</a>
|
||||
|
||||
<ul>
|
||||
<li><a href="../../types/">Builtin Field Types</a>
|
||||
|
||||
|
||||
<li><a href="../">Expression</a>
|
||||
|
||||
<ul>
|
||||
<li><a href="../ne/">!=</a>
|
||||
|
||||
|
||||
<li><a href="../lt/"><</a>
|
||||
|
||||
|
||||
<li><a href="../le/"><=</a>
|
||||
|
||||
|
||||
<li class="active"><a href="./">==</a>
|
||||
|
||||
<ul></ul>
|
||||
|
||||
|
||||
<li><a href="../gt/">></a>
|
||||
|
||||
|
||||
<li><a href="../ge/">>=</a>
|
||||
|
||||
|
||||
<li><a href="../and/">and()</a>
|
||||
|
||||
|
||||
<li><a href="../contains/">contains()</a>
|
||||
|
||||
|
||||
<li><a href="../endswith/">endswith()</a>
|
||||
|
||||
|
||||
<li><a href="../endswith-cs/">endswith_cs()</a>
|
||||
|
||||
|
||||
<li><a href="../or/">or()</a>
|
||||
|
||||
|
||||
<li><a href="../startswith/">startswith()</a>
|
||||
|
||||
|
||||
<li><a href="../startswith-cs/">startswith_cs()</a>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<li><a href="../../f/">F</a>
|
||||
|
||||
|
||||
<li><a href="../../get-alts/">get_alts()</a>
|
||||
|
||||
|
||||
<li><a href="../../pad/">Pad</a>
|
||||
|
||||
|
||||
<li><a href="../../query/">Query</a>
|
||||
|
||||
|
||||
<li><a href="../../record/">Record</a>
|
||||
|
||||
|
||||
<li><a href="../../obj/">SourceObject</a>
|
||||
|
||||
|
||||
<li><a href="../../system-fields/">System Fields</a>
|
||||
|
||||
|
||||
<li><a href="../../type/">Type</a>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<li><a href="../../../environment/">Environment</a>
|
||||
|
||||
|
||||
<li><a href="../../../plugins/">Plugins</a>
|
||||
|
||||
|
||||
<li><a href="../../../project/">Project</a>
|
||||
|
||||
|
||||
<li><a href="../../../publisher/">Publisher</a>
|
||||
|
||||
|
||||
<li><a href="../../../templates/">Template API</a>
|
||||
|
||||
|
||||
<li><a href="../../../utils/">Utilities</a>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<li><a href="../../../../search/">Search</a>
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<div class="visible-md-block visible-lg-block">
|
||||
<h4>This Page</h4>
|
||||
<ul class="toc">
|
||||
|
||||
<li><a href="#example">Example</a></li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-sm-9 doc-styling">
|
||||
|
||||
|
||||
<h1><i class="glyphicon glyphicon-flash"></i> <code class="obj">==</code></h1>
|
||||
|
||||
|
||||
|
||||
<ul class=page-meta>
|
||||
|
||||
<li>Operator of <a href="../">Expression</a></li>
|
||||
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
<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"><</span><span class="nt">h2</span><span class="p">></span>Our Houses<span class="p"></</span><span class="nt">h2</span><span class="p">></span>
|
||||
<span class="p"><</span><span class="nt">ul</span><span class="p">></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">'house'</span><span class="o">)</span> <span class="cp">%}</span>
|
||||
<span class="p"><</span><span class="nt">li</span><span class="p">></span><span class="cp">{{</span> <span class="nv">project.name</span> <span class="cp">}}</span><span class="p"></</span><span class="nt">li</span><span class="p">></span>
|
||||
<span class="cp">{%</span> <span class="k">endfor</span> <span class="cp">%}</span>
|
||||
<span class="p"></</span><span class="nt">ul</span><span class="p">></span>
|
||||
</pre></div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="comment-box">
|
||||
<h2>Comments</h2>
|
||||
|
||||
<div id="disqus_thread"></div>
|
||||
<script>
|
||||
var disqus_config = function() { this.page.identifier = "/docs/api/db/expression/eq"; this.page.url = "https://www.getlektor.com/docs/api/db/expression/eq/"; };
|
||||
(function() {
|
||||
var d = document, s = d.createElement('script');
|
||||
s.src = '//lektordocumentation.disqus.com/embed.js';
|
||||
s.setAttribute('data-timestamp', +new Date());
|
||||
(d.head || d.body).appendChild(s);
|
||||
})();
|
||||
</script>
|
||||
<noscript>
|
||||
Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript"
|
||||
rel="nofollow">comments powered by Disqus.</a>
|
||||
</noscript>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="bottomsummary">
|
||||
<div class="container">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<footer>
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-sm-4 icon-bar">
|
||||
<a href="https://github.com/lektor/lektor/" title="Lektor on GitHub"
|
||||
><i class="fa fa-github"></i></a>
|
||||
<a href="https://github.com/lektor/lektor/issues/" title="Report Issues for Lektor"
|
||||
><i class="fa fa-bug"></i></a>
|
||||
<a href="https://twitter.com/getlektor" title="Find Lektor on Twitter"
|
||||
><i class="fa fa-twitter"></i></a>
|
||||
<a href="https://gitter.im/lektor/lektor" title="Chat on Gitter"
|
||||
><i class="fa fa-comment"></i></a>
|
||||
<a href="https://github.com/lektor/lektor-website/tree/master/content/docs/api/db/expression/eq/contents.lr" title="View source for this page"><i class="fa fa-code"></i></a>
|
||||
</div>
|
||||
<div class="col-sm-8">
|
||||
<a href="../../../../../license/">License & Copyright</a> •
|
||||
<a href="../../../../../contact/">Contact</a> •
|
||||
Made with <i class="fa fa-fw fa-heart" title="Heart"><span hidden>Heart</span></i> in Carinthia
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
|
||||
<script type=text/javascript src="../../../../../static/app.js?h=bb1b933a" charset="utf-8"></script>
|
||||
<script>
|
||||
((window.gitter = {}).chat = {}).options = {
|
||||
room: 'lektor/lektor',
|
||||
activationElement: null
|
||||
};
|
||||
document.write('<button class="js-gitter-toggle-chat-button">Toggle Chat</button>');
|
||||
var dnt = navigator.doNotTrack || window.doNotTrack || navigator.msDoNotTrack;
|
||||
if (dnt != "1" && dnt != "yes") {
|
||||
window.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments)};ga.l=+new Date;
|
||||
ga('create', 'UA-70822533-1', 'auto');
|
||||
ga('set', 'anonymizeIp', true);
|
||||
ga('send', 'pageview');
|
||||
} else {
|
||||
console.debug("Respecting Do-Not-Track, not running analytics.");
|
||||
}
|
||||
</script>
|
||||
<script async src='https://www.google-analytics.com/analytics.js'></script>
|
||||
<script async defer id="github-bjs" src="https://buttons.github.io/buttons.js"></script>
|
||||
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script>
|
||||
<script src="https://sidecar.gitter.im/dist/sidecar.v1.js" async defer></script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,329 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<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/pygments.css">
|
||||
<link rel="shortcut icon" href="../../../../../static/favicon.png?h=fa09bedd">
|
||||
<title>>= | Documentation | Lektor Static Content Management System</title>
|
||||
</head>
|
||||
<body class="default">
|
||||
<nav class="navbar navbar-inverse navbar-static-top">
|
||||
<div class="container">
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle collapsed"
|
||||
data-toggle="collapse" data-target="#navbar"
|
||||
aria-expanded="false" aria-controls="navbar">
|
||||
<span class="sr-only">Toggle navigation</span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<a class="navbar-brand" href="../../../../../">Lektor</a>
|
||||
</div>
|
||||
<div id="navbar" class="collapse navbar-collapse">
|
||||
<ul class="nav navbar-nav">
|
||||
|
||||
<li><a href="../../../../../downloads/">Download</a></li>
|
||||
|
||||
<li class="active"><a href="../../../../">Documentation</a></li>
|
||||
|
||||
<li><a href="../../../../../showcase/">Showcase</a></li>
|
||||
|
||||
<li><a href="../../../../../plugins/">Plugins</a></li>
|
||||
|
||||
<li><a href="../../../../../community/">Community</a></li>
|
||||
|
||||
<li><a href="../../../../../blog/">Blog</a></li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<div class="body-wrapper">
|
||||
|
||||
<div class="container">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-3">
|
||||
<ul class="tree-nav nocontent">
|
||||
<li><a href="../../../../">Welcome</a></li>
|
||||
|
||||
|
||||
<li><a href="../../../../what/">What is Lektor</a>
|
||||
|
||||
|
||||
<li><a href="../../../../installation/">Installation</a>
|
||||
|
||||
|
||||
<li><a href="../../../../quickstart/">Quickstart</a>
|
||||
|
||||
|
||||
<li><a href="../../../../project/">Project</a>
|
||||
|
||||
|
||||
<li><a href="../../../../content/">Content</a>
|
||||
|
||||
|
||||
<li><a href="../../../../templates/">Templates</a>
|
||||
|
||||
|
||||
<li><a href="../../../../themes/">Themes</a>
|
||||
|
||||
|
||||
<li><a href="../../../../guides/">Guides</a>
|
||||
|
||||
|
||||
<li><a href="../../../../deployment/">Deployment</a>
|
||||
|
||||
|
||||
<li><a href="../../../../plugins/">Plugins</a>
|
||||
|
||||
|
||||
<li><a href="../../../../models/">Data Modelling</a>
|
||||
|
||||
|
||||
<li><a href="../../../../cli/">Command Line</a>
|
||||
|
||||
|
||||
<li><a href="../../../">API</a>
|
||||
|
||||
<ul>
|
||||
<li><a href="../../../build/">Build System</a>
|
||||
|
||||
|
||||
<li><a href="../../../databags/">Databags</a>
|
||||
|
||||
|
||||
<li><a href="../../">Database</a>
|
||||
|
||||
<ul>
|
||||
<li><a href="../../types/">Builtin Field Types</a>
|
||||
|
||||
|
||||
<li><a href="../">Expression</a>
|
||||
|
||||
<ul>
|
||||
<li><a href="../ne/">!=</a>
|
||||
|
||||
|
||||
<li><a href="../lt/"><</a>
|
||||
|
||||
|
||||
<li><a href="../le/"><=</a>
|
||||
|
||||
|
||||
<li><a href="../eq/">==</a>
|
||||
|
||||
|
||||
<li><a href="../gt/">></a>
|
||||
|
||||
|
||||
<li class="active"><a href="./">>=</a>
|
||||
|
||||
<ul></ul>
|
||||
|
||||
|
||||
<li><a href="../and/">and()</a>
|
||||
|
||||
|
||||
<li><a href="../contains/">contains()</a>
|
||||
|
||||
|
||||
<li><a href="../endswith/">endswith()</a>
|
||||
|
||||
|
||||
<li><a href="../endswith-cs/">endswith_cs()</a>
|
||||
|
||||
|
||||
<li><a href="../or/">or()</a>
|
||||
|
||||
|
||||
<li><a href="../startswith/">startswith()</a>
|
||||
|
||||
|
||||
<li><a href="../startswith-cs/">startswith_cs()</a>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<li><a href="../../f/">F</a>
|
||||
|
||||
|
||||
<li><a href="../../get-alts/">get_alts()</a>
|
||||
|
||||
|
||||
<li><a href="../../pad/">Pad</a>
|
||||
|
||||
|
||||
<li><a href="../../query/">Query</a>
|
||||
|
||||
|
||||
<li><a href="../../record/">Record</a>
|
||||
|
||||
|
||||
<li><a href="../../obj/">SourceObject</a>
|
||||
|
||||
|
||||
<li><a href="../../system-fields/">System Fields</a>
|
||||
|
||||
|
||||
<li><a href="../../type/">Type</a>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<li><a href="../../../environment/">Environment</a>
|
||||
|
||||
|
||||
<li><a href="../../../plugins/">Plugins</a>
|
||||
|
||||
|
||||
<li><a href="../../../project/">Project</a>
|
||||
|
||||
|
||||
<li><a href="../../../publisher/">Publisher</a>
|
||||
|
||||
|
||||
<li><a href="../../../templates/">Template API</a>
|
||||
|
||||
|
||||
<li><a href="../../../utils/">Utilities</a>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<li><a href="../../../../search/">Search</a>
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<div class="visible-md-block visible-lg-block">
|
||||
<h4>This Page</h4>
|
||||
<ul class="toc">
|
||||
|
||||
<li><a href="#template-example">Template Example</a></li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-sm-9 doc-styling">
|
||||
|
||||
|
||||
<h1><i class="glyphicon glyphicon-flash"></i> <code class="obj">>=</code></h1>
|
||||
|
||||
|
||||
|
||||
<ul class=page-meta>
|
||||
|
||||
<li>Operator of <a href="../">Expression</a></li>
|
||||
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
<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"><</span><span class="nt">h3</span><span class="p">></span>3 or more Stars<span class="p"></</span><span class="nt">h3</span><span class="p">></span>
|
||||
<span class="p"><</span><span class="nt">ul</span><span class="p">></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">>=</span> <span class="m">3</span><span class="o">)</span> <span class="cp">%}</span>
|
||||
<span class="p"><</span><span class="nt">li</span><span class="p">></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"></</span><span class="nt">li</span><span class="p">></span>
|
||||
<span class="cp">{%</span> <span class="k">endfor</span> <span class="cp">%}</span>
|
||||
<span class="p"></</span><span class="nt">ul</span><span class="p">></span>
|
||||
</pre></div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="comment-box">
|
||||
<h2>Comments</h2>
|
||||
|
||||
<div id="disqus_thread"></div>
|
||||
<script>
|
||||
var disqus_config = function() { this.page.identifier = "/docs/api/db/expression/ge"; this.page.url = "https://www.getlektor.com/docs/api/db/expression/ge/"; };
|
||||
(function() {
|
||||
var d = document, s = d.createElement('script');
|
||||
s.src = '//lektordocumentation.disqus.com/embed.js';
|
||||
s.setAttribute('data-timestamp', +new Date());
|
||||
(d.head || d.body).appendChild(s);
|
||||
})();
|
||||
</script>
|
||||
<noscript>
|
||||
Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript"
|
||||
rel="nofollow">comments powered by Disqus.</a>
|
||||
</noscript>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="bottomsummary">
|
||||
<div class="container">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<footer>
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-sm-4 icon-bar">
|
||||
<a href="https://github.com/lektor/lektor/" title="Lektor on GitHub"
|
||||
><i class="fa fa-github"></i></a>
|
||||
<a href="https://github.com/lektor/lektor/issues/" title="Report Issues for Lektor"
|
||||
><i class="fa fa-bug"></i></a>
|
||||
<a href="https://twitter.com/getlektor" title="Find Lektor on Twitter"
|
||||
><i class="fa fa-twitter"></i></a>
|
||||
<a href="https://gitter.im/lektor/lektor" title="Chat on Gitter"
|
||||
><i class="fa fa-comment"></i></a>
|
||||
<a href="https://github.com/lektor/lektor-website/tree/master/content/docs/api/db/expression/ge/contents.lr" title="View source for this page"><i class="fa fa-code"></i></a>
|
||||
</div>
|
||||
<div class="col-sm-8">
|
||||
<a href="../../../../../license/">License & Copyright</a> •
|
||||
<a href="../../../../../contact/">Contact</a> •
|
||||
Made with <i class="fa fa-fw fa-heart" title="Heart"><span hidden>Heart</span></i> in Carinthia
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
|
||||
<script type=text/javascript src="../../../../../static/app.js?h=bb1b933a" charset="utf-8"></script>
|
||||
<script>
|
||||
((window.gitter = {}).chat = {}).options = {
|
||||
room: 'lektor/lektor',
|
||||
activationElement: null
|
||||
};
|
||||
document.write('<button class="js-gitter-toggle-chat-button">Toggle Chat</button>');
|
||||
var dnt = navigator.doNotTrack || window.doNotTrack || navigator.msDoNotTrack;
|
||||
if (dnt != "1" && dnt != "yes") {
|
||||
window.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments)};ga.l=+new Date;
|
||||
ga('create', 'UA-70822533-1', 'auto');
|
||||
ga('set', 'anonymizeIp', true);
|
||||
ga('send', 'pageview');
|
||||
} else {
|
||||
console.debug("Respecting Do-Not-Track, not running analytics.");
|
||||
}
|
||||
</script>
|
||||
<script async src='https://www.google-analytics.com/analytics.js'></script>
|
||||
<script async defer id="github-bjs" src="https://buttons.github.io/buttons.js"></script>
|
||||
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script>
|
||||
<script src="https://sidecar.gitter.im/dist/sidecar.v1.js" async defer></script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,330 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<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/pygments.css">
|
||||
<link rel="shortcut icon" href="../../../../../static/favicon.png?h=fa09bedd">
|
||||
<title>> | Documentation | Lektor Static Content Management System</title>
|
||||
</head>
|
||||
<body class="default">
|
||||
<nav class="navbar navbar-inverse navbar-static-top">
|
||||
<div class="container">
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle collapsed"
|
||||
data-toggle="collapse" data-target="#navbar"
|
||||
aria-expanded="false" aria-controls="navbar">
|
||||
<span class="sr-only">Toggle navigation</span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<a class="navbar-brand" href="../../../../../">Lektor</a>
|
||||
</div>
|
||||
<div id="navbar" class="collapse navbar-collapse">
|
||||
<ul class="nav navbar-nav">
|
||||
|
||||
<li><a href="../../../../../downloads/">Download</a></li>
|
||||
|
||||
<li class="active"><a href="../../../../">Documentation</a></li>
|
||||
|
||||
<li><a href="../../../../../showcase/">Showcase</a></li>
|
||||
|
||||
<li><a href="../../../../../plugins/">Plugins</a></li>
|
||||
|
||||
<li><a href="../../../../../community/">Community</a></li>
|
||||
|
||||
<li><a href="../../../../../blog/">Blog</a></li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<div class="body-wrapper">
|
||||
|
||||
<div class="container">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-3">
|
||||
<ul class="tree-nav nocontent">
|
||||
<li><a href="../../../../">Welcome</a></li>
|
||||
|
||||
|
||||
<li><a href="../../../../what/">What is Lektor</a>
|
||||
|
||||
|
||||
<li><a href="../../../../installation/">Installation</a>
|
||||
|
||||
|
||||
<li><a href="../../../../quickstart/">Quickstart</a>
|
||||
|
||||
|
||||
<li><a href="../../../../project/">Project</a>
|
||||
|
||||
|
||||
<li><a href="../../../../content/">Content</a>
|
||||
|
||||
|
||||
<li><a href="../../../../templates/">Templates</a>
|
||||
|
||||
|
||||
<li><a href="../../../../themes/">Themes</a>
|
||||
|
||||
|
||||
<li><a href="../../../../guides/">Guides</a>
|
||||
|
||||
|
||||
<li><a href="../../../../deployment/">Deployment</a>
|
||||
|
||||
|
||||
<li><a href="../../../../plugins/">Plugins</a>
|
||||
|
||||
|
||||
<li><a href="../../../../models/">Data Modelling</a>
|
||||
|
||||
|
||||
<li><a href="../../../../cli/">Command Line</a>
|
||||
|
||||
|
||||
<li><a href="../../../">API</a>
|
||||
|
||||
<ul>
|
||||
<li><a href="../../../build/">Build System</a>
|
||||
|
||||
|
||||
<li><a href="../../../databags/">Databags</a>
|
||||
|
||||
|
||||
<li><a href="../../">Database</a>
|
||||
|
||||
<ul>
|
||||
<li><a href="../../types/">Builtin Field Types</a>
|
||||
|
||||
|
||||
<li><a href="../">Expression</a>
|
||||
|
||||
<ul>
|
||||
<li><a href="../ne/">!=</a>
|
||||
|
||||
|
||||
<li><a href="../lt/"><</a>
|
||||
|
||||
|
||||
<li><a href="../le/"><=</a>
|
||||
|
||||
|
||||
<li><a href="../eq/">==</a>
|
||||
|
||||
|
||||
<li class="active"><a href="./">></a>
|
||||
|
||||
<ul></ul>
|
||||
|
||||
|
||||
<li><a href="../ge/">>=</a>
|
||||
|
||||
|
||||
<li><a href="../and/">and()</a>
|
||||
|
||||
|
||||
<li><a href="../contains/">contains()</a>
|
||||
|
||||
|
||||
<li><a href="../endswith/">endswith()</a>
|
||||
|
||||
|
||||
<li><a href="../endswith-cs/">endswith_cs()</a>
|
||||
|
||||
|
||||
<li><a href="../or/">or()</a>
|
||||
|
||||
|
||||
<li><a href="../startswith/">startswith()</a>
|
||||
|
||||
|
||||
<li><a href="../startswith-cs/">startswith_cs()</a>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<li><a href="../../f/">F</a>
|
||||
|
||||
|
||||
<li><a href="../../get-alts/">get_alts()</a>
|
||||
|
||||
|
||||
<li><a href="../../pad/">Pad</a>
|
||||
|
||||
|
||||
<li><a href="../../query/">Query</a>
|
||||
|
||||
|
||||
<li><a href="../../record/">Record</a>
|
||||
|
||||
|
||||
<li><a href="../../obj/">SourceObject</a>
|
||||
|
||||
|
||||
<li><a href="../../system-fields/">System Fields</a>
|
||||
|
||||
|
||||
<li><a href="../../type/">Type</a>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<li><a href="../../../environment/">Environment</a>
|
||||
|
||||
|
||||
<li><a href="../../../plugins/">Plugins</a>
|
||||
|
||||
|
||||
<li><a href="../../../project/">Project</a>
|
||||
|
||||
|
||||
<li><a href="../../../publisher/">Publisher</a>
|
||||
|
||||
|
||||
<li><a href="../../../templates/">Template API</a>
|
||||
|
||||
|
||||
<li><a href="../../../utils/">Utilities</a>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<li><a href="../../../../search/">Search</a>
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<div class="visible-md-block visible-lg-block">
|
||||
<h4>This Page</h4>
|
||||
<ul class="toc">
|
||||
|
||||
<li><a href="#template-example">Template Example</a></li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-sm-9 doc-styling">
|
||||
|
||||
|
||||
<h1><i class="glyphicon glyphicon-flash"></i> <code class="obj">></code></h1>
|
||||
|
||||
|
||||
|
||||
<ul class=page-meta>
|
||||
|
||||
<li>Operator of <a href="../">Expression</a></li>
|
||||
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
<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"><</span><span class="nt">h3</span><span class="p">></span>Well Rated Items<span class="p"></</span><span class="nt">h3</span><span class="p">></span>
|
||||
<span class="p"><</span><span class="nt">ul</span><span class="p">></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">></span> <span class="m">3</span><span class="o">)</span> <span class="cp">%}</span>
|
||||
<span class="p"><</span><span class="nt">li</span><span class="p">></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"></</span><span class="nt">li</span><span class="p">></span>
|
||||
<span class="cp">{%</span> <span class="k">endfor</span> <span class="cp">%}</span>
|
||||
<span class="p"></</span><span class="nt">ul</span><span class="p">></span>
|
||||
</pre></div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="comment-box">
|
||||
<h2>Comments</h2>
|
||||
|
||||
<div id="disqus_thread"></div>
|
||||
<script>
|
||||
var disqus_config = function() { this.page.identifier = "/docs/api/db/expression/gt"; this.page.url = "https://www.getlektor.com/docs/api/db/expression/gt/"; };
|
||||
(function() {
|
||||
var d = document, s = d.createElement('script');
|
||||
s.src = '//lektordocumentation.disqus.com/embed.js';
|
||||
s.setAttribute('data-timestamp', +new Date());
|
||||
(d.head || d.body).appendChild(s);
|
||||
})();
|
||||
</script>
|
||||
<noscript>
|
||||
Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript"
|
||||
rel="nofollow">comments powered by Disqus.</a>
|
||||
</noscript>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="bottomsummary">
|
||||
<div class="container">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<footer>
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-sm-4 icon-bar">
|
||||
<a href="https://github.com/lektor/lektor/" title="Lektor on GitHub"
|
||||
><i class="fa fa-github"></i></a>
|
||||
<a href="https://github.com/lektor/lektor/issues/" title="Report Issues for Lektor"
|
||||
><i class="fa fa-bug"></i></a>
|
||||
<a href="https://twitter.com/getlektor" title="Find Lektor on Twitter"
|
||||
><i class="fa fa-twitter"></i></a>
|
||||
<a href="https://gitter.im/lektor/lektor" title="Chat on Gitter"
|
||||
><i class="fa fa-comment"></i></a>
|
||||
<a href="https://github.com/lektor/lektor-website/tree/master/content/docs/api/db/expression/gt/contents.lr" title="View source for this page"><i class="fa fa-code"></i></a>
|
||||
</div>
|
||||
<div class="col-sm-8">
|
||||
<a href="../../../../../license/">License & Copyright</a> •
|
||||
<a href="../../../../../contact/">Contact</a> •
|
||||
Made with <i class="fa fa-fw fa-heart" title="Heart"><span hidden>Heart</span></i> in Carinthia
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
|
||||
<script type=text/javascript src="../../../../../static/app.js?h=bb1b933a" charset="utf-8"></script>
|
||||
<script>
|
||||
((window.gitter = {}).chat = {}).options = {
|
||||
room: 'lektor/lektor',
|
||||
activationElement: null
|
||||
};
|
||||
document.write('<button class="js-gitter-toggle-chat-button">Toggle Chat</button>');
|
||||
var dnt = navigator.doNotTrack || window.doNotTrack || navigator.msDoNotTrack;
|
||||
if (dnt != "1" && dnt != "yes") {
|
||||
window.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments)};ga.l=+new Date;
|
||||
ga('create', 'UA-70822533-1', 'auto');
|
||||
ga('set', 'anonymizeIp', true);
|
||||
ga('send', 'pageview');
|
||||
} else {
|
||||
console.debug("Respecting Do-Not-Track, not running analytics.");
|
||||
}
|
||||
</script>
|
||||
<script async src='https://www.google-analytics.com/analytics.js'></script>
|
||||
<script async defer id="github-bjs" src="https://buttons.github.io/buttons.js"></script>
|
||||
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script>
|
||||
<script src="https://sidecar.gitter.im/dist/sidecar.v1.js" async defer></script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,489 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<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/pygments.css">
|
||||
<link rel="shortcut icon" href="../../../../static/favicon.png?h=fa09bedd">
|
||||
<title>Expression | Documentation | Lektor Static Content Management System</title>
|
||||
</head>
|
||||
<body class="default">
|
||||
<nav class="navbar navbar-inverse navbar-static-top">
|
||||
<div class="container">
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle collapsed"
|
||||
data-toggle="collapse" data-target="#navbar"
|
||||
aria-expanded="false" aria-controls="navbar">
|
||||
<span class="sr-only">Toggle navigation</span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<a class="navbar-brand" href="../../../../">Lektor</a>
|
||||
</div>
|
||||
<div id="navbar" class="collapse navbar-collapse">
|
||||
<ul class="nav navbar-nav">
|
||||
|
||||
<li><a href="../../../../downloads/">Download</a></li>
|
||||
|
||||
<li class="active"><a href="../../../">Documentation</a></li>
|
||||
|
||||
<li><a href="../../../../showcase/">Showcase</a></li>
|
||||
|
||||
<li><a href="../../../../plugins/">Plugins</a></li>
|
||||
|
||||
<li><a href="../../../../community/">Community</a></li>
|
||||
|
||||
<li><a href="../../../../blog/">Blog</a></li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<div class="body-wrapper">
|
||||
|
||||
<div class="container">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-3">
|
||||
<ul class="tree-nav nocontent">
|
||||
<li><a href="../../../">Welcome</a></li>
|
||||
|
||||
|
||||
<li><a href="../../../what/">What is Lektor</a>
|
||||
|
||||
|
||||
<li><a href="../../../installation/">Installation</a>
|
||||
|
||||
|
||||
<li><a href="../../../quickstart/">Quickstart</a>
|
||||
|
||||
|
||||
<li><a href="../../../project/">Project</a>
|
||||
|
||||
|
||||
<li><a href="../../../content/">Content</a>
|
||||
|
||||
|
||||
<li><a href="../../../templates/">Templates</a>
|
||||
|
||||
|
||||
<li><a href="../../../themes/">Themes</a>
|
||||
|
||||
|
||||
<li><a href="../../../guides/">Guides</a>
|
||||
|
||||
|
||||
<li><a href="../../../deployment/">Deployment</a>
|
||||
|
||||
|
||||
<li><a href="../../../plugins/">Plugins</a>
|
||||
|
||||
|
||||
<li><a href="../../../models/">Data Modelling</a>
|
||||
|
||||
|
||||
<li><a href="../../../cli/">Command Line</a>
|
||||
|
||||
|
||||
<li><a href="../../">API</a>
|
||||
|
||||
<ul>
|
||||
<li><a href="../../build/">Build System</a>
|
||||
|
||||
|
||||
<li><a href="../../databags/">Databags</a>
|
||||
|
||||
|
||||
<li><a href="../">Database</a>
|
||||
|
||||
<ul>
|
||||
<li><a href="../types/">Builtin Field Types</a>
|
||||
|
||||
|
||||
<li class="active"><a href="./">Expression</a>
|
||||
|
||||
<ul>
|
||||
<li><a href="ne/">!=</a>
|
||||
|
||||
|
||||
<li><a href="lt/"><</a>
|
||||
|
||||
|
||||
<li><a href="le/"><=</a>
|
||||
|
||||
|
||||
<li><a href="eq/">==</a>
|
||||
|
||||
|
||||
<li><a href="gt/">></a>
|
||||
|
||||
|
||||
<li><a href="ge/">>=</a>
|
||||
|
||||
|
||||
<li><a href="and/">and()</a>
|
||||
|
||||
|
||||
<li><a href="contains/">contains()</a>
|
||||
|
||||
|
||||
<li><a href="endswith/">endswith()</a>
|
||||
|
||||
|
||||
<li><a href="endswith-cs/">endswith_cs()</a>
|
||||
|
||||
|
||||
<li><a href="or/">or()</a>
|
||||
|
||||
|
||||
<li><a href="startswith/">startswith()</a>
|
||||
|
||||
|
||||
<li><a href="startswith-cs/">startswith_cs()</a>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<li><a href="../f/">F</a>
|
||||
|
||||
|
||||
<li><a href="../get-alts/">get_alts()</a>
|
||||
|
||||
|
||||
<li><a href="../pad/">Pad</a>
|
||||
|
||||
|
||||
<li><a href="../query/">Query</a>
|
||||
|
||||
|
||||
<li><a href="../record/">Record</a>
|
||||
|
||||
|
||||
<li><a href="../obj/">SourceObject</a>
|
||||
|
||||
|
||||
<li><a href="../system-fields/">System Fields</a>
|
||||
|
||||
|
||||
<li><a href="../type/">Type</a>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<li><a href="../../environment/">Environment</a>
|
||||
|
||||
|
||||
<li><a href="../../plugins/">Plugins</a>
|
||||
|
||||
|
||||
<li><a href="../../project/">Project</a>
|
||||
|
||||
|
||||
<li><a href="../../publisher/">Publisher</a>
|
||||
|
||||
|
||||
<li><a href="../../templates/">Template API</a>
|
||||
|
||||
|
||||
<li><a href="../../utils/">Utilities</a>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<li><a href="../../../search/">Search</a>
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<div class="visible-md-block visible-lg-block">
|
||||
<h4>This Page</h4>
|
||||
<ul class="toc">
|
||||
|
||||
<li><a href="#example">Example</a></li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-sm-9 doc-styling">
|
||||
|
||||
|
||||
<h1><i class="glyphicon glyphicon-leaf"></i> <code class="mod">lektor.db.</code><code class="obj">Expression</code></h1>
|
||||
|
||||
|
||||
|
||||
<ul class=page-meta>
|
||||
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
<p>Expressions are used to filter down <a href="../query/" class="ref">Query</a> objects. They
|
||||
can be passed to the <a href="../query/filter/" class="ref">filter</a> function in particular.</p>
|
||||
<p>The most basic expression is created by accessing the <a href="../f/" class="ref">F</a> object
|
||||
which will return an expression that points to a field. Further manipulation
|
||||
of it can create more expressive expressions. <code>F.name</code> literally just means
|
||||
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">>>> </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">'foo'</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">'bar'</span><span class="p">))</span><span class="o">.</span><span class="n">all</span><span class="p">()</span>
|
||||
<span class="go">[<Page model=u'page' id=u'bar'>, <Page model=u'page' id=u'foo'>]</span>
|
||||
</pre></div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="child-pages nocontent">
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-6 child">
|
||||
<h4>
|
||||
<i class="glyphicon glyphicon-flash"></i>
|
||||
<a href="ne/">!=</a>
|
||||
</h4>
|
||||
|
||||
<p class="summary">Compares an expression to another by ensuring inequality.</p>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-md-6 child">
|
||||
<h4>
|
||||
<i class="glyphicon glyphicon-flash"></i>
|
||||
<a href="lt/"><</a>
|
||||
</h4>
|
||||
|
||||
<p class="summary">True if the left side is smaller than the right side.</p>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-6 child">
|
||||
<h4>
|
||||
<i class="glyphicon glyphicon-flash"></i>
|
||||
<a href="le/"><=</a>
|
||||
</h4>
|
||||
|
||||
<p class="summary">True if the left side is smaller or equal to the right side.</p>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-md-6 child">
|
||||
<h4>
|
||||
<i class="glyphicon glyphicon-flash"></i>
|
||||
<a href="eq/">==</a>
|
||||
</h4>
|
||||
|
||||
<p class="summary">Compares an expression to another.</p>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-6 child">
|
||||
<h4>
|
||||
<i class="glyphicon glyphicon-flash"></i>
|
||||
<a href="gt/">></a>
|
||||
</h4>
|
||||
|
||||
<p class="summary">True if the left side is larger than the right side.</p>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-md-6 child">
|
||||
<h4>
|
||||
<i class="glyphicon glyphicon-flash"></i>
|
||||
<a href="ge/">>=</a>
|
||||
</h4>
|
||||
|
||||
<p class="summary">True if the left side is larger or equal to the right side.</p>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-6 child">
|
||||
<h4>
|
||||
<i class="glyphicon glyphicon-cog"></i>
|
||||
<a href="and/">and()</a>
|
||||
</h4>
|
||||
|
||||
<p class="summary">True if both left and right side are true.</p>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-md-6 child">
|
||||
<h4>
|
||||
<i class="glyphicon glyphicon-cog"></i>
|
||||
<a href="contains/">contains()</a>
|
||||
</h4>
|
||||
|
||||
<p class="summary">Checks if an item contains another one.</p>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-6 child">
|
||||
<h4>
|
||||
<i class="glyphicon glyphicon-cog"></i>
|
||||
<a href="endswith/">endswith()</a>
|
||||
</h4>
|
||||
|
||||
<p class="summary">True if a string ends with another string (case insensitive).</p>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-md-6 child">
|
||||
<h4>
|
||||
<i class="glyphicon glyphicon-cog"></i>
|
||||
<a href="endswith-cs/">endswith_cs()</a>
|
||||
</h4>
|
||||
|
||||
<p class="summary">True if a string ends with another string (case sensitive).</p>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-6 child">
|
||||
<h4>
|
||||
<i class="glyphicon glyphicon-cog"></i>
|
||||
<a href="or/">or()</a>
|
||||
</h4>
|
||||
|
||||
<p class="summary">True if either left and right side are true.</p>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-md-6 child">
|
||||
<h4>
|
||||
<i class="glyphicon glyphicon-cog"></i>
|
||||
<a href="startswith/">startswith()</a>
|
||||
</h4>
|
||||
|
||||
<p class="summary">True if a string starts with another string (case insensitive).</p>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-6 child">
|
||||
<h4>
|
||||
<i class="glyphicon glyphicon-cog"></i>
|
||||
<a href="startswith-cs/">startswith_cs()</a>
|
||||
</h4>
|
||||
|
||||
<p class="summary">True if a string starts with another string (case sensitive).</p>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="comment-box">
|
||||
<h2>Comments</h2>
|
||||
|
||||
<div id="disqus_thread"></div>
|
||||
<script>
|
||||
var disqus_config = function() { this.page.identifier = "/docs/api/db/expression"; this.page.url = "https://www.getlektor.com/docs/api/db/expression/"; };
|
||||
(function() {
|
||||
var d = document, s = d.createElement('script');
|
||||
s.src = '//lektordocumentation.disqus.com/embed.js';
|
||||
s.setAttribute('data-timestamp', +new Date());
|
||||
(d.head || d.body).appendChild(s);
|
||||
})();
|
||||
</script>
|
||||
<noscript>
|
||||
Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript"
|
||||
rel="nofollow">comments powered by Disqus.</a>
|
||||
</noscript>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="bottomsummary">
|
||||
<div class="container">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<footer>
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-sm-4 icon-bar">
|
||||
<a href="https://github.com/lektor/lektor/" title="Lektor on GitHub"
|
||||
><i class="fa fa-github"></i></a>
|
||||
<a href="https://github.com/lektor/lektor/issues/" title="Report Issues for Lektor"
|
||||
><i class="fa fa-bug"></i></a>
|
||||
<a href="https://twitter.com/getlektor" title="Find Lektor on Twitter"
|
||||
><i class="fa fa-twitter"></i></a>
|
||||
<a href="https://gitter.im/lektor/lektor" title="Chat on Gitter"
|
||||
><i class="fa fa-comment"></i></a>
|
||||
<a href="https://github.com/lektor/lektor-website/tree/master/content/docs/api/db/expression/contents.lr" title="View source for this page"><i class="fa fa-code"></i></a>
|
||||
</div>
|
||||
<div class="col-sm-8">
|
||||
<a href="../../../../license/">License & Copyright</a> •
|
||||
<a href="../../../../contact/">Contact</a> •
|
||||
Made with <i class="fa fa-fw fa-heart" title="Heart"><span hidden>Heart</span></i> in Carinthia
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
|
||||
<script type=text/javascript src="../../../../static/app.js?h=bb1b933a" charset="utf-8"></script>
|
||||
<script>
|
||||
((window.gitter = {}).chat = {}).options = {
|
||||
room: 'lektor/lektor',
|
||||
activationElement: null
|
||||
};
|
||||
document.write('<button class="js-gitter-toggle-chat-button">Toggle Chat</button>');
|
||||
var dnt = navigator.doNotTrack || window.doNotTrack || navigator.msDoNotTrack;
|
||||
if (dnt != "1" && dnt != "yes") {
|
||||
window.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments)};ga.l=+new Date;
|
||||
ga('create', 'UA-70822533-1', 'auto');
|
||||
ga('set', 'anonymizeIp', true);
|
||||
ga('send', 'pageview');
|
||||
} else {
|
||||
console.debug("Respecting Do-Not-Track, not running analytics.");
|
||||
}
|
||||
</script>
|
||||
<script async src='https://www.google-analytics.com/analytics.js'></script>
|
||||
<script async defer id="github-bjs" src="https://buttons.github.io/buttons.js"></script>
|
||||
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script>
|
||||
<script src="https://sidecar.gitter.im/dist/sidecar.v1.js" async defer></script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,329 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<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/pygments.css">
|
||||
<link rel="shortcut icon" href="../../../../../static/favicon.png?h=fa09bedd">
|
||||
<title><= | Documentation | Lektor Static Content Management System</title>
|
||||
</head>
|
||||
<body class="default">
|
||||
<nav class="navbar navbar-inverse navbar-static-top">
|
||||
<div class="container">
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle collapsed"
|
||||
data-toggle="collapse" data-target="#navbar"
|
||||
aria-expanded="false" aria-controls="navbar">
|
||||
<span class="sr-only">Toggle navigation</span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<a class="navbar-brand" href="../../../../../">Lektor</a>
|
||||
</div>
|
||||
<div id="navbar" class="collapse navbar-collapse">
|
||||
<ul class="nav navbar-nav">
|
||||
|
||||
<li><a href="../../../../../downloads/">Download</a></li>
|
||||
|
||||
<li class="active"><a href="../../../../">Documentation</a></li>
|
||||
|
||||
<li><a href="../../../../../showcase/">Showcase</a></li>
|
||||
|
||||
<li><a href="../../../../../plugins/">Plugins</a></li>
|
||||
|
||||
<li><a href="../../../../../community/">Community</a></li>
|
||||
|
||||
<li><a href="../../../../../blog/">Blog</a></li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<div class="body-wrapper">
|
||||
|
||||
<div class="container">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-3">
|
||||
<ul class="tree-nav nocontent">
|
||||
<li><a href="../../../../">Welcome</a></li>
|
||||
|
||||
|
||||
<li><a href="../../../../what/">What is Lektor</a>
|
||||
|
||||
|
||||
<li><a href="../../../../installation/">Installation</a>
|
||||
|
||||
|
||||
<li><a href="../../../../quickstart/">Quickstart</a>
|
||||
|
||||
|
||||
<li><a href="../../../../project/">Project</a>
|
||||
|
||||
|
||||
<li><a href="../../../../content/">Content</a>
|
||||
|
||||
|
||||
<li><a href="../../../../templates/">Templates</a>
|
||||
|
||||
|
||||
<li><a href="../../../../themes/">Themes</a>
|
||||
|
||||
|
||||
<li><a href="../../../../guides/">Guides</a>
|
||||
|
||||
|
||||
<li><a href="../../../../deployment/">Deployment</a>
|
||||
|
||||
|
||||
<li><a href="../../../../plugins/">Plugins</a>
|
||||
|
||||
|
||||
<li><a href="../../../../models/">Data Modelling</a>
|
||||
|
||||
|
||||
<li><a href="../../../../cli/">Command Line</a>
|
||||
|
||||
|
||||
<li><a href="../../../">API</a>
|
||||
|
||||
<ul>
|
||||
<li><a href="../../../build/">Build System</a>
|
||||
|
||||
|
||||
<li><a href="../../../databags/">Databags</a>
|
||||
|
||||
|
||||
<li><a href="../../">Database</a>
|
||||
|
||||
<ul>
|
||||
<li><a href="../../types/">Builtin Field Types</a>
|
||||
|
||||
|
||||
<li><a href="../">Expression</a>
|
||||
|
||||
<ul>
|
||||
<li><a href="../ne/">!=</a>
|
||||
|
||||
|
||||
<li><a href="../lt/"><</a>
|
||||
|
||||
|
||||
<li class="active"><a href="./"><=</a>
|
||||
|
||||
<ul></ul>
|
||||
|
||||
|
||||
<li><a href="../eq/">==</a>
|
||||
|
||||
|
||||
<li><a href="../gt/">></a>
|
||||
|
||||
|
||||
<li><a href="../ge/">>=</a>
|
||||
|
||||
|
||||
<li><a href="../and/">and()</a>
|
||||
|
||||
|
||||
<li><a href="../contains/">contains()</a>
|
||||
|
||||
|
||||
<li><a href="../endswith/">endswith()</a>
|
||||
|
||||
|
||||
<li><a href="../endswith-cs/">endswith_cs()</a>
|
||||
|
||||
|
||||
<li><a href="../or/">or()</a>
|
||||
|
||||
|
||||
<li><a href="../startswith/">startswith()</a>
|
||||
|
||||
|
||||
<li><a href="../startswith-cs/">startswith_cs()</a>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<li><a href="../../f/">F</a>
|
||||
|
||||
|
||||
<li><a href="../../get-alts/">get_alts()</a>
|
||||
|
||||
|
||||
<li><a href="../../pad/">Pad</a>
|
||||
|
||||
|
||||
<li><a href="../../query/">Query</a>
|
||||
|
||||
|
||||
<li><a href="../../record/">Record</a>
|
||||
|
||||
|
||||
<li><a href="../../obj/">SourceObject</a>
|
||||
|
||||
|
||||
<li><a href="../../system-fields/">System Fields</a>
|
||||
|
||||
|
||||
<li><a href="../../type/">Type</a>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<li><a href="../../../environment/">Environment</a>
|
||||
|
||||
|
||||
<li><a href="../../../plugins/">Plugins</a>
|
||||
|
||||
|
||||
<li><a href="../../../project/">Project</a>
|
||||
|
||||
|
||||
<li><a href="../../../publisher/">Publisher</a>
|
||||
|
||||
|
||||
<li><a href="../../../templates/">Template API</a>
|
||||
|
||||
|
||||
<li><a href="../../../utils/">Utilities</a>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<li><a href="../../../../search/">Search</a>
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<div class="visible-md-block visible-lg-block">
|
||||
<h4>This Page</h4>
|
||||
<ul class="toc">
|
||||
|
||||
<li><a href="#template-example">Template Example</a></li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-sm-9 doc-styling">
|
||||
|
||||
|
||||
<h1><i class="glyphicon glyphicon-flash"></i> <code class="obj"><=</code></h1>
|
||||
|
||||
|
||||
|
||||
<ul class=page-meta>
|
||||
|
||||
<li>Operator of <a href="../">Expression</a></li>
|
||||
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
<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"><</span><span class="nt">h3</span><span class="p">></span>Projects From Before Including 2000<span class="p"></</span><span class="nt">h3</span><span class="p">></span>
|
||||
<span class="p"><</span><span class="nt">ul</span><span class="p">></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"><=</span> <span class="m">2000</span><span class="o">)</span> <span class="cp">%}</span>
|
||||
<span class="p"><</span><span class="nt">li</span><span class="p">></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"></</span><span class="nt">li</span><span class="p">></span>
|
||||
<span class="cp">{%</span> <span class="k">endfor</span> <span class="cp">%}</span>
|
||||
<span class="p"></</span><span class="nt">ul</span><span class="p">></span>
|
||||
</pre></div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="comment-box">
|
||||
<h2>Comments</h2>
|
||||
|
||||
<div id="disqus_thread"></div>
|
||||
<script>
|
||||
var disqus_config = function() { this.page.identifier = "/docs/api/db/expression/le"; this.page.url = "https://www.getlektor.com/docs/api/db/expression/le/"; };
|
||||
(function() {
|
||||
var d = document, s = d.createElement('script');
|
||||
s.src = '//lektordocumentation.disqus.com/embed.js';
|
||||
s.setAttribute('data-timestamp', +new Date());
|
||||
(d.head || d.body).appendChild(s);
|
||||
})();
|
||||
</script>
|
||||
<noscript>
|
||||
Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript"
|
||||
rel="nofollow">comments powered by Disqus.</a>
|
||||
</noscript>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="bottomsummary">
|
||||
<div class="container">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<footer>
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-sm-4 icon-bar">
|
||||
<a href="https://github.com/lektor/lektor/" title="Lektor on GitHub"
|
||||
><i class="fa fa-github"></i></a>
|
||||
<a href="https://github.com/lektor/lektor/issues/" title="Report Issues for Lektor"
|
||||
><i class="fa fa-bug"></i></a>
|
||||
<a href="https://twitter.com/getlektor" title="Find Lektor on Twitter"
|
||||
><i class="fa fa-twitter"></i></a>
|
||||
<a href="https://gitter.im/lektor/lektor" title="Chat on Gitter"
|
||||
><i class="fa fa-comment"></i></a>
|
||||
<a href="https://github.com/lektor/lektor-website/tree/master/content/docs/api/db/expression/le/contents.lr" title="View source for this page"><i class="fa fa-code"></i></a>
|
||||
</div>
|
||||
<div class="col-sm-8">
|
||||
<a href="../../../../../license/">License & Copyright</a> •
|
||||
<a href="../../../../../contact/">Contact</a> •
|
||||
Made with <i class="fa fa-fw fa-heart" title="Heart"><span hidden>Heart</span></i> in Carinthia
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
|
||||
<script type=text/javascript src="../../../../../static/app.js?h=bb1b933a" charset="utf-8"></script>
|
||||
<script>
|
||||
((window.gitter = {}).chat = {}).options = {
|
||||
room: 'lektor/lektor',
|
||||
activationElement: null
|
||||
};
|
||||
document.write('<button class="js-gitter-toggle-chat-button">Toggle Chat</button>');
|
||||
var dnt = navigator.doNotTrack || window.doNotTrack || navigator.msDoNotTrack;
|
||||
if (dnt != "1" && dnt != "yes") {
|
||||
window.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments)};ga.l=+new Date;
|
||||
ga('create', 'UA-70822533-1', 'auto');
|
||||
ga('set', 'anonymizeIp', true);
|
||||
ga('send', 'pageview');
|
||||
} else {
|
||||
console.debug("Respecting Do-Not-Track, not running analytics.");
|
||||
}
|
||||
</script>
|
||||
<script async src='https://www.google-analytics.com/analytics.js'></script>
|
||||
<script async defer id="github-bjs" src="https://buttons.github.io/buttons.js"></script>
|
||||
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script>
|
||||
<script src="https://sidecar.gitter.im/dist/sidecar.v1.js" async defer></script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,329 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<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/pygments.css">
|
||||
<link rel="shortcut icon" href="../../../../../static/favicon.png?h=fa09bedd">
|
||||
<title>< | Documentation | Lektor Static Content Management System</title>
|
||||
</head>
|
||||
<body class="default">
|
||||
<nav class="navbar navbar-inverse navbar-static-top">
|
||||
<div class="container">
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle collapsed"
|
||||
data-toggle="collapse" data-target="#navbar"
|
||||
aria-expanded="false" aria-controls="navbar">
|
||||
<span class="sr-only">Toggle navigation</span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<a class="navbar-brand" href="../../../../../">Lektor</a>
|
||||
</div>
|
||||
<div id="navbar" class="collapse navbar-collapse">
|
||||
<ul class="nav navbar-nav">
|
||||
|
||||
<li><a href="../../../../../downloads/">Download</a></li>
|
||||
|
||||
<li class="active"><a href="../../../../">Documentation</a></li>
|
||||
|
||||
<li><a href="../../../../../showcase/">Showcase</a></li>
|
||||
|
||||
<li><a href="../../../../../plugins/">Plugins</a></li>
|
||||
|
||||
<li><a href="../../../../../community/">Community</a></li>
|
||||
|
||||
<li><a href="../../../../../blog/">Blog</a></li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<div class="body-wrapper">
|
||||
|
||||
<div class="container">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-3">
|
||||
<ul class="tree-nav nocontent">
|
||||
<li><a href="../../../../">Welcome</a></li>
|
||||
|
||||
|
||||
<li><a href="../../../../what/">What is Lektor</a>
|
||||
|
||||
|
||||
<li><a href="../../../../installation/">Installation</a>
|
||||
|
||||
|
||||
<li><a href="../../../../quickstart/">Quickstart</a>
|
||||
|
||||
|
||||
<li><a href="../../../../project/">Project</a>
|
||||
|
||||
|
||||
<li><a href="../../../../content/">Content</a>
|
||||
|
||||
|
||||
<li><a href="../../../../templates/">Templates</a>
|
||||
|
||||
|
||||
<li><a href="../../../../themes/">Themes</a>
|
||||
|
||||
|
||||
<li><a href="../../../../guides/">Guides</a>
|
||||
|
||||
|
||||
<li><a href="../../../../deployment/">Deployment</a>
|
||||
|
||||
|
||||
<li><a href="../../../../plugins/">Plugins</a>
|
||||
|
||||
|
||||
<li><a href="../../../../models/">Data Modelling</a>
|
||||
|
||||
|
||||
<li><a href="../../../../cli/">Command Line</a>
|
||||
|
||||
|
||||
<li><a href="../../../">API</a>
|
||||
|
||||
<ul>
|
||||
<li><a href="../../../build/">Build System</a>
|
||||
|
||||
|
||||
<li><a href="../../../databags/">Databags</a>
|
||||
|
||||
|
||||
<li><a href="../../">Database</a>
|
||||
|
||||
<ul>
|
||||
<li><a href="../../types/">Builtin Field Types</a>
|
||||
|
||||
|
||||
<li><a href="../">Expression</a>
|
||||
|
||||
<ul>
|
||||
<li><a href="../ne/">!=</a>
|
||||
|
||||
|
||||
<li class="active"><a href="./"><</a>
|
||||
|
||||
<ul></ul>
|
||||
|
||||
|
||||
<li><a href="../le/"><=</a>
|
||||
|
||||
|
||||
<li><a href="../eq/">==</a>
|
||||
|
||||
|
||||
<li><a href="../gt/">></a>
|
||||
|
||||
|
||||
<li><a href="../ge/">>=</a>
|
||||
|
||||
|
||||
<li><a href="../and/">and()</a>
|
||||
|
||||
|
||||
<li><a href="../contains/">contains()</a>
|
||||
|
||||
|
||||
<li><a href="../endswith/">endswith()</a>
|
||||
|
||||
|
||||
<li><a href="../endswith-cs/">endswith_cs()</a>
|
||||
|
||||
|
||||
<li><a href="../or/">or()</a>
|
||||
|
||||
|
||||
<li><a href="../startswith/">startswith()</a>
|
||||
|
||||
|
||||
<li><a href="../startswith-cs/">startswith_cs()</a>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<li><a href="../../f/">F</a>
|
||||
|
||||
|
||||
<li><a href="../../get-alts/">get_alts()</a>
|
||||
|
||||
|
||||
<li><a href="../../pad/">Pad</a>
|
||||
|
||||
|
||||
<li><a href="../../query/">Query</a>
|
||||
|
||||
|
||||
<li><a href="../../record/">Record</a>
|
||||
|
||||
|
||||
<li><a href="../../obj/">SourceObject</a>
|
||||
|
||||
|
||||
<li><a href="../../system-fields/">System Fields</a>
|
||||
|
||||
|
||||
<li><a href="../../type/">Type</a>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<li><a href="../../../environment/">Environment</a>
|
||||
|
||||
|
||||
<li><a href="../../../plugins/">Plugins</a>
|
||||
|
||||
|
||||
<li><a href="../../../project/">Project</a>
|
||||
|
||||
|
||||
<li><a href="../../../publisher/">Publisher</a>
|
||||
|
||||
|
||||
<li><a href="../../../templates/">Template API</a>
|
||||
|
||||
|
||||
<li><a href="../../../utils/">Utilities</a>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<li><a href="../../../../search/">Search</a>
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<div class="visible-md-block visible-lg-block">
|
||||
<h4>This Page</h4>
|
||||
<ul class="toc">
|
||||
|
||||
<li><a href="#template-example">Template Example</a></li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-sm-9 doc-styling">
|
||||
|
||||
|
||||
<h1><i class="glyphicon glyphicon-flash"></i> <code class="obj"><</code></h1>
|
||||
|
||||
|
||||
|
||||
<ul class=page-meta>
|
||||
|
||||
<li>Operator of <a href="../">Expression</a></li>
|
||||
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
<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"><</span><span class="nt">h3</span><span class="p">></span>Projects From Before 2000<span class="p"></</span><span class="nt">h3</span><span class="p">></span>
|
||||
<span class="p"><</span><span class="nt">ul</span><span class="p">></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"><</span> <span class="m">2000</span><span class="o">)</span> <span class="cp">%}</span>
|
||||
<span class="p"><</span><span class="nt">li</span><span class="p">></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"></</span><span class="nt">li</span><span class="p">></span>
|
||||
<span class="cp">{%</span> <span class="k">endfor</span> <span class="cp">%}</span>
|
||||
<span class="p"></</span><span class="nt">ul</span><span class="p">></span>
|
||||
</pre></div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="comment-box">
|
||||
<h2>Comments</h2>
|
||||
|
||||
<div id="disqus_thread"></div>
|
||||
<script>
|
||||
var disqus_config = function() { this.page.identifier = "/docs/api/db/expression/lt"; this.page.url = "https://www.getlektor.com/docs/api/db/expression/lt/"; };
|
||||
(function() {
|
||||
var d = document, s = d.createElement('script');
|
||||
s.src = '//lektordocumentation.disqus.com/embed.js';
|
||||
s.setAttribute('data-timestamp', +new Date());
|
||||
(d.head || d.body).appendChild(s);
|
||||
})();
|
||||
</script>
|
||||
<noscript>
|
||||
Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript"
|
||||
rel="nofollow">comments powered by Disqus.</a>
|
||||
</noscript>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="bottomsummary">
|
||||
<div class="container">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<footer>
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-sm-4 icon-bar">
|
||||
<a href="https://github.com/lektor/lektor/" title="Lektor on GitHub"
|
||||
><i class="fa fa-github"></i></a>
|
||||
<a href="https://github.com/lektor/lektor/issues/" title="Report Issues for Lektor"
|
||||
><i class="fa fa-bug"></i></a>
|
||||
<a href="https://twitter.com/getlektor" title="Find Lektor on Twitter"
|
||||
><i class="fa fa-twitter"></i></a>
|
||||
<a href="https://gitter.im/lektor/lektor" title="Chat on Gitter"
|
||||
><i class="fa fa-comment"></i></a>
|
||||
<a href="https://github.com/lektor/lektor-website/tree/master/content/docs/api/db/expression/lt/contents.lr" title="View source for this page"><i class="fa fa-code"></i></a>
|
||||
</div>
|
||||
<div class="col-sm-8">
|
||||
<a href="../../../../../license/">License & Copyright</a> •
|
||||
<a href="../../../../../contact/">Contact</a> •
|
||||
Made with <i class="fa fa-fw fa-heart" title="Heart"><span hidden>Heart</span></i> in Carinthia
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
|
||||
<script type=text/javascript src="../../../../../static/app.js?h=bb1b933a" charset="utf-8"></script>
|
||||
<script>
|
||||
((window.gitter = {}).chat = {}).options = {
|
||||
room: 'lektor/lektor',
|
||||
activationElement: null
|
||||
};
|
||||
document.write('<button class="js-gitter-toggle-chat-button">Toggle Chat</button>');
|
||||
var dnt = navigator.doNotTrack || window.doNotTrack || navigator.msDoNotTrack;
|
||||
if (dnt != "1" && dnt != "yes") {
|
||||
window.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments)};ga.l=+new Date;
|
||||
ga('create', 'UA-70822533-1', 'auto');
|
||||
ga('set', 'anonymizeIp', true);
|
||||
ga('send', 'pageview');
|
||||
} else {
|
||||
console.debug("Respecting Do-Not-Track, not running analytics.");
|
||||
}
|
||||
</script>
|
||||
<script async src='https://www.google-analytics.com/analytics.js'></script>
|
||||
<script async defer id="github-bjs" src="https://buttons.github.io/buttons.js"></script>
|
||||
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script>
|
||||
<script src="https://sidecar.gitter.im/dist/sidecar.v1.js" async defer></script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,329 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<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/pygments.css">
|
||||
<link rel="shortcut icon" href="../../../../../static/favicon.png?h=fa09bedd">
|
||||
<title>!= | Documentation | Lektor Static Content Management System</title>
|
||||
</head>
|
||||
<body class="default">
|
||||
<nav class="navbar navbar-inverse navbar-static-top">
|
||||
<div class="container">
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle collapsed"
|
||||
data-toggle="collapse" data-target="#navbar"
|
||||
aria-expanded="false" aria-controls="navbar">
|
||||
<span class="sr-only">Toggle navigation</span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<a class="navbar-brand" href="../../../../../">Lektor</a>
|
||||
</div>
|
||||
<div id="navbar" class="collapse navbar-collapse">
|
||||
<ul class="nav navbar-nav">
|
||||
|
||||
<li><a href="../../../../../downloads/">Download</a></li>
|
||||
|
||||
<li class="active"><a href="../../../../">Documentation</a></li>
|
||||
|
||||
<li><a href="../../../../../showcase/">Showcase</a></li>
|
||||
|
||||
<li><a href="../../../../../plugins/">Plugins</a></li>
|
||||
|
||||
<li><a href="../../../../../community/">Community</a></li>
|
||||
|
||||
<li><a href="../../../../../blog/">Blog</a></li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<div class="body-wrapper">
|
||||
|
||||
<div class="container">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-3">
|
||||
<ul class="tree-nav nocontent">
|
||||
<li><a href="../../../../">Welcome</a></li>
|
||||
|
||||
|
||||
<li><a href="../../../../what/">What is Lektor</a>
|
||||
|
||||
|
||||
<li><a href="../../../../installation/">Installation</a>
|
||||
|
||||
|
||||
<li><a href="../../../../quickstart/">Quickstart</a>
|
||||
|
||||
|
||||
<li><a href="../../../../project/">Project</a>
|
||||
|
||||
|
||||
<li><a href="../../../../content/">Content</a>
|
||||
|
||||
|
||||
<li><a href="../../../../templates/">Templates</a>
|
||||
|
||||
|
||||
<li><a href="../../../../themes/">Themes</a>
|
||||
|
||||
|
||||
<li><a href="../../../../guides/">Guides</a>
|
||||
|
||||
|
||||
<li><a href="../../../../deployment/">Deployment</a>
|
||||
|
||||
|
||||
<li><a href="../../../../plugins/">Plugins</a>
|
||||
|
||||
|
||||
<li><a href="../../../../models/">Data Modelling</a>
|
||||
|
||||
|
||||
<li><a href="../../../../cli/">Command Line</a>
|
||||
|
||||
|
||||
<li><a href="../../../">API</a>
|
||||
|
||||
<ul>
|
||||
<li><a href="../../../build/">Build System</a>
|
||||
|
||||
|
||||
<li><a href="../../../databags/">Databags</a>
|
||||
|
||||
|
||||
<li><a href="../../">Database</a>
|
||||
|
||||
<ul>
|
||||
<li><a href="../../types/">Builtin Field Types</a>
|
||||
|
||||
|
||||
<li><a href="../">Expression</a>
|
||||
|
||||
<ul>
|
||||
<li class="active"><a href="./">!=</a>
|
||||
|
||||
<ul></ul>
|
||||
|
||||
|
||||
<li><a href="../lt/"><</a>
|
||||
|
||||
|
||||
<li><a href="../le/"><=</a>
|
||||
|
||||
|
||||
<li><a href="../eq/">==</a>
|
||||
|
||||
|
||||
<li><a href="../gt/">></a>
|
||||
|
||||
|
||||
<li><a href="../ge/">>=</a>
|
||||
|
||||
|
||||
<li><a href="../and/">and()</a>
|
||||
|
||||
|
||||
<li><a href="../contains/">contains()</a>
|
||||
|
||||
|
||||
<li><a href="../endswith/">endswith()</a>
|
||||
|
||||
|
||||
<li><a href="../endswith-cs/">endswith_cs()</a>
|
||||
|
||||
|
||||
<li><a href="../or/">or()</a>
|
||||
|
||||
|
||||
<li><a href="../startswith/">startswith()</a>
|
||||
|
||||
|
||||
<li><a href="../startswith-cs/">startswith_cs()</a>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<li><a href="../../f/">F</a>
|
||||
|
||||
|
||||
<li><a href="../../get-alts/">get_alts()</a>
|
||||
|
||||
|
||||
<li><a href="../../pad/">Pad</a>
|
||||
|
||||
|
||||
<li><a href="../../query/">Query</a>
|
||||
|
||||
|
||||
<li><a href="../../record/">Record</a>
|
||||
|
||||
|
||||
<li><a href="../../obj/">SourceObject</a>
|
||||
|
||||
|
||||
<li><a href="../../system-fields/">System Fields</a>
|
||||
|
||||
|
||||
<li><a href="../../type/">Type</a>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<li><a href="../../../environment/">Environment</a>
|
||||
|
||||
|
||||
<li><a href="../../../plugins/">Plugins</a>
|
||||
|
||||
|
||||
<li><a href="../../../project/">Project</a>
|
||||
|
||||
|
||||
<li><a href="../../../publisher/">Publisher</a>
|
||||
|
||||
|
||||
<li><a href="../../../templates/">Template API</a>
|
||||
|
||||
|
||||
<li><a href="../../../utils/">Utilities</a>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<li><a href="../../../../search/">Search</a>
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<div class="visible-md-block visible-lg-block">
|
||||
<h4>This Page</h4>
|
||||
<ul class="toc">
|
||||
|
||||
<li><a href="#example">Example</a></li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-sm-9 doc-styling">
|
||||
|
||||
|
||||
<h1><i class="glyphicon glyphicon-flash"></i> <code class="obj">!=</code></h1>
|
||||
|
||||
|
||||
|
||||
<ul class=page-meta>
|
||||
|
||||
<li>Operator of <a href="../">Expression</a></li>
|
||||
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
<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"><</span><span class="nt">h2</span><span class="p">></span>Everything Other Than Houses<span class="p"></</span><span class="nt">h2</span><span class="p">></span>
|
||||
<span class="p"><</span><span class="nt">ul</span><span class="p">></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">'house'</span><span class="o">)</span> <span class="cp">%}</span>
|
||||
<span class="p"><</span><span class="nt">li</span><span class="p">></span><span class="cp">{{</span> <span class="nv">project.name</span> <span class="cp">}}</span><span class="p"></</span><span class="nt">li</span><span class="p">></span>
|
||||
<span class="cp">{%</span> <span class="k">endfor</span> <span class="cp">%}</span>
|
||||
<span class="p"></</span><span class="nt">ul</span><span class="p">></span>
|
||||
</pre></div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="comment-box">
|
||||
<h2>Comments</h2>
|
||||
|
||||
<div id="disqus_thread"></div>
|
||||
<script>
|
||||
var disqus_config = function() { this.page.identifier = "/docs/api/db/expression/ne"; this.page.url = "https://www.getlektor.com/docs/api/db/expression/ne/"; };
|
||||
(function() {
|
||||
var d = document, s = d.createElement('script');
|
||||
s.src = '//lektordocumentation.disqus.com/embed.js';
|
||||
s.setAttribute('data-timestamp', +new Date());
|
||||
(d.head || d.body).appendChild(s);
|
||||
})();
|
||||
</script>
|
||||
<noscript>
|
||||
Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript"
|
||||
rel="nofollow">comments powered by Disqus.</a>
|
||||
</noscript>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="bottomsummary">
|
||||
<div class="container">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<footer>
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-sm-4 icon-bar">
|
||||
<a href="https://github.com/lektor/lektor/" title="Lektor on GitHub"
|
||||
><i class="fa fa-github"></i></a>
|
||||
<a href="https://github.com/lektor/lektor/issues/" title="Report Issues for Lektor"
|
||||
><i class="fa fa-bug"></i></a>
|
||||
<a href="https://twitter.com/getlektor" title="Find Lektor on Twitter"
|
||||
><i class="fa fa-twitter"></i></a>
|
||||
<a href="https://gitter.im/lektor/lektor" title="Chat on Gitter"
|
||||
><i class="fa fa-comment"></i></a>
|
||||
<a href="https://github.com/lektor/lektor-website/tree/master/content/docs/api/db/expression/ne/contents.lr" title="View source for this page"><i class="fa fa-code"></i></a>
|
||||
</div>
|
||||
<div class="col-sm-8">
|
||||
<a href="../../../../../license/">License & Copyright</a> •
|
||||
<a href="../../../../../contact/">Contact</a> •
|
||||
Made with <i class="fa fa-fw fa-heart" title="Heart"><span hidden>Heart</span></i> in Carinthia
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
|
||||
<script type=text/javascript src="../../../../../static/app.js?h=bb1b933a" charset="utf-8"></script>
|
||||
<script>
|
||||
((window.gitter = {}).chat = {}).options = {
|
||||
room: 'lektor/lektor',
|
||||
activationElement: null
|
||||
};
|
||||
document.write('<button class="js-gitter-toggle-chat-button">Toggle Chat</button>');
|
||||
var dnt = navigator.doNotTrack || window.doNotTrack || navigator.msDoNotTrack;
|
||||
if (dnt != "1" && dnt != "yes") {
|
||||
window.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments)};ga.l=+new Date;
|
||||
ga('create', 'UA-70822533-1', 'auto');
|
||||
ga('set', 'anonymizeIp', true);
|
||||
ga('send', 'pageview');
|
||||
} else {
|
||||
console.debug("Respecting Do-Not-Track, not running analytics.");
|
||||
}
|
||||
</script>
|
||||
<script async src='https://www.google-analytics.com/analytics.js'></script>
|
||||
<script async defer id="github-bjs" src="https://buttons.github.io/buttons.js"></script>
|
||||
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script>
|
||||
<script src="https://sidecar.gitter.im/dist/sidecar.v1.js" async defer></script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,338 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<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/pygments.css">
|
||||
<link rel="shortcut icon" href="../../../../../static/favicon.png?h=fa09bedd">
|
||||
<title>or | Documentation | Lektor Static Content Management System</title>
|
||||
</head>
|
||||
<body class="default">
|
||||
<nav class="navbar navbar-inverse navbar-static-top">
|
||||
<div class="container">
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle collapsed"
|
||||
data-toggle="collapse" data-target="#navbar"
|
||||
aria-expanded="false" aria-controls="navbar">
|
||||
<span class="sr-only">Toggle navigation</span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<a class="navbar-brand" href="../../../../../">Lektor</a>
|
||||
</div>
|
||||
<div id="navbar" class="collapse navbar-collapse">
|
||||
<ul class="nav navbar-nav">
|
||||
|
||||
<li><a href="../../../../../downloads/">Download</a></li>
|
||||
|
||||
<li class="active"><a href="../../../../">Documentation</a></li>
|
||||
|
||||
<li><a href="../../../../../showcase/">Showcase</a></li>
|
||||
|
||||
<li><a href="../../../../../plugins/">Plugins</a></li>
|
||||
|
||||
<li><a href="../../../../../community/">Community</a></li>
|
||||
|
||||
<li><a href="../../../../../blog/">Blog</a></li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<div class="body-wrapper">
|
||||
|
||||
<div class="container">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-3">
|
||||
<ul class="tree-nav nocontent">
|
||||
<li><a href="../../../../">Welcome</a></li>
|
||||
|
||||
|
||||
<li><a href="../../../../what/">What is Lektor</a>
|
||||
|
||||
|
||||
<li><a href="../../../../installation/">Installation</a>
|
||||
|
||||
|
||||
<li><a href="../../../../quickstart/">Quickstart</a>
|
||||
|
||||
|
||||
<li><a href="../../../../project/">Project</a>
|
||||
|
||||
|
||||
<li><a href="../../../../content/">Content</a>
|
||||
|
||||
|
||||
<li><a href="../../../../templates/">Templates</a>
|
||||
|
||||
|
||||
<li><a href="../../../../themes/">Themes</a>
|
||||
|
||||
|
||||
<li><a href="../../../../guides/">Guides</a>
|
||||
|
||||
|
||||
<li><a href="../../../../deployment/">Deployment</a>
|
||||
|
||||
|
||||
<li><a href="../../../../plugins/">Plugins</a>
|
||||
|
||||
|
||||
<li><a href="../../../../models/">Data Modelling</a>
|
||||
|
||||
|
||||
<li><a href="../../../../cli/">Command Line</a>
|
||||
|
||||
|
||||
<li><a href="../../../">API</a>
|
||||
|
||||
<ul>
|
||||
<li><a href="../../../build/">Build System</a>
|
||||
|
||||
|
||||
<li><a href="../../../databags/">Databags</a>
|
||||
|
||||
|
||||
<li><a href="../../">Database</a>
|
||||
|
||||
<ul>
|
||||
<li><a href="../../types/">Builtin Field Types</a>
|
||||
|
||||
|
||||
<li><a href="../">Expression</a>
|
||||
|
||||
<ul>
|
||||
<li><a href="../ne/">!=</a>
|
||||
|
||||
|
||||
<li><a href="../lt/"><</a>
|
||||
|
||||
|
||||
<li><a href="../le/"><=</a>
|
||||
|
||||
|
||||
<li><a href="../eq/">==</a>
|
||||
|
||||
|
||||
<li><a href="../gt/">></a>
|
||||
|
||||
|
||||
<li><a href="../ge/">>=</a>
|
||||
|
||||
|
||||
<li><a href="../and/">and()</a>
|
||||
|
||||
|
||||
<li><a href="../contains/">contains()</a>
|
||||
|
||||
|
||||
<li><a href="../endswith/">endswith()</a>
|
||||
|
||||
|
||||
<li><a href="../endswith-cs/">endswith_cs()</a>
|
||||
|
||||
|
||||
<li class="active"><a href="./">or()</a>
|
||||
|
||||
<ul></ul>
|
||||
|
||||
|
||||
<li><a href="../startswith/">startswith()</a>
|
||||
|
||||
|
||||
<li><a href="../startswith-cs/">startswith_cs()</a>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<li><a href="../../f/">F</a>
|
||||
|
||||
|
||||
<li><a href="../../get-alts/">get_alts()</a>
|
||||
|
||||
|
||||
<li><a href="../../pad/">Pad</a>
|
||||
|
||||
|
||||
<li><a href="../../query/">Query</a>
|
||||
|
||||
|
||||
<li><a href="../../record/">Record</a>
|
||||
|
||||
|
||||
<li><a href="../../obj/">SourceObject</a>
|
||||
|
||||
|
||||
<li><a href="../../system-fields/">System Fields</a>
|
||||
|
||||
|
||||
<li><a href="../../type/">Type</a>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<li><a href="../../../environment/">Environment</a>
|
||||
|
||||
|
||||
<li><a href="../../../plugins/">Plugins</a>
|
||||
|
||||
|
||||
<li><a href="../../../project/">Project</a>
|
||||
|
||||
|
||||
<li><a href="../../../publisher/">Publisher</a>
|
||||
|
||||
|
||||
<li><a href="../../../templates/">Template API</a>
|
||||
|
||||
|
||||
<li><a href="../../../utils/">Utilities</a>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<li><a href="../../../../search/">Search</a>
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<div class="visible-md-block visible-lg-block">
|
||||
<h4>This Page</h4>
|
||||
<ul class="toc">
|
||||
|
||||
<li><a href="#template-example">Template Example</a></li>
|
||||
|
||||
<li><a href="#python-example">Python Example</a></li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-sm-9 doc-styling">
|
||||
|
||||
|
||||
<h1><i class="glyphicon glyphicon-cog"></i> <code class="obj">or</code> <span class="sig">(<code>other</code>)</span></h1>
|
||||
|
||||
|
||||
|
||||
<ul class=page-meta>
|
||||
|
||||
<li>Method of <a href="../">Expression</a></li>
|
||||
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
<p>This evaluates to true if either the expression on the left or the
|
||||
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"><</span><span class="nt">h3</span><span class="p">></span>Hotels or Apartments<span class="p"></</span><span class="nt">h3</span><span class="p">></span>
|
||||
<span class="p"><</span><span class="nt">ul</span><span class="p">></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">'hotel'</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">'apartment'</span><span class="o">))</span> <span class="cp">%}</span>
|
||||
<span class="p"><</span><span class="nt">li</span><span class="p">></span><span class="cp">{{</span> <span class="nv">item.name</span> <span class="cp">}}</span> (<span class="cp">{{</span> <span class="nv">item.type</span><span class="cp">}}</span>)<span class="p"></</span><span class="nt">li</span><span class="p">></span>
|
||||
<span class="cp">{%</span> <span class="k">endfor</span> <span class="cp">%}</span>
|
||||
<span class="p"></</span><span class="nt">ul</span><span class="p">></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>
|
||||
<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">'hotel'</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">'apartment'</span><span class="p">))</span>
|
||||
</pre></div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="comment-box">
|
||||
<h2>Comments</h2>
|
||||
|
||||
<div id="disqus_thread"></div>
|
||||
<script>
|
||||
var disqus_config = function() { this.page.identifier = "/docs/api/db/expression/or"; this.page.url = "https://www.getlektor.com/docs/api/db/expression/or/"; };
|
||||
(function() {
|
||||
var d = document, s = d.createElement('script');
|
||||
s.src = '//lektordocumentation.disqus.com/embed.js';
|
||||
s.setAttribute('data-timestamp', +new Date());
|
||||
(d.head || d.body).appendChild(s);
|
||||
})();
|
||||
</script>
|
||||
<noscript>
|
||||
Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript"
|
||||
rel="nofollow">comments powered by Disqus.</a>
|
||||
</noscript>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="bottomsummary">
|
||||
<div class="container">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<footer>
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-sm-4 icon-bar">
|
||||
<a href="https://github.com/lektor/lektor/" title="Lektor on GitHub"
|
||||
><i class="fa fa-github"></i></a>
|
||||
<a href="https://github.com/lektor/lektor/issues/" title="Report Issues for Lektor"
|
||||
><i class="fa fa-bug"></i></a>
|
||||
<a href="https://twitter.com/getlektor" title="Find Lektor on Twitter"
|
||||
><i class="fa fa-twitter"></i></a>
|
||||
<a href="https://gitter.im/lektor/lektor" title="Chat on Gitter"
|
||||
><i class="fa fa-comment"></i></a>
|
||||
<a href="https://github.com/lektor/lektor-website/tree/master/content/docs/api/db/expression/or/contents.lr" title="View source for this page"><i class="fa fa-code"></i></a>
|
||||
</div>
|
||||
<div class="col-sm-8">
|
||||
<a href="../../../../../license/">License & Copyright</a> •
|
||||
<a href="../../../../../contact/">Contact</a> •
|
||||
Made with <i class="fa fa-fw fa-heart" title="Heart"><span hidden>Heart</span></i> in Carinthia
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
|
||||
<script type=text/javascript src="../../../../../static/app.js?h=bb1b933a" charset="utf-8"></script>
|
||||
<script>
|
||||
((window.gitter = {}).chat = {}).options = {
|
||||
room: 'lektor/lektor',
|
||||
activationElement: null
|
||||
};
|
||||
document.write('<button class="js-gitter-toggle-chat-button">Toggle Chat</button>');
|
||||
var dnt = navigator.doNotTrack || window.doNotTrack || navigator.msDoNotTrack;
|
||||
if (dnt != "1" && dnt != "yes") {
|
||||
window.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments)};ga.l=+new Date;
|
||||
ga('create', 'UA-70822533-1', 'auto');
|
||||
ga('set', 'anonymizeIp', true);
|
||||
ga('send', 'pageview');
|
||||
} else {
|
||||
console.debug("Respecting Do-Not-Track, not running analytics.");
|
||||
}
|
||||
</script>
|
||||
<script async src='https://www.google-analytics.com/analytics.js'></script>
|
||||
<script async defer id="github-bjs" src="https://buttons.github.io/buttons.js"></script>
|
||||
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script>
|
||||
<script src="https://sidecar.gitter.im/dist/sidecar.v1.js" async defer></script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,331 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<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/pygments.css">
|
||||
<link rel="shortcut icon" href="../../../../../static/favicon.png?h=fa09bedd">
|
||||
<title>startswith_cs | Documentation | Lektor Static Content Management System</title>
|
||||
</head>
|
||||
<body class="default">
|
||||
<nav class="navbar navbar-inverse navbar-static-top">
|
||||
<div class="container">
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle collapsed"
|
||||
data-toggle="collapse" data-target="#navbar"
|
||||
aria-expanded="false" aria-controls="navbar">
|
||||
<span class="sr-only">Toggle navigation</span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<a class="navbar-brand" href="../../../../../">Lektor</a>
|
||||
</div>
|
||||
<div id="navbar" class="collapse navbar-collapse">
|
||||
<ul class="nav navbar-nav">
|
||||
|
||||
<li><a href="../../../../../downloads/">Download</a></li>
|
||||
|
||||
<li class="active"><a href="../../../../">Documentation</a></li>
|
||||
|
||||
<li><a href="../../../../../showcase/">Showcase</a></li>
|
||||
|
||||
<li><a href="../../../../../plugins/">Plugins</a></li>
|
||||
|
||||
<li><a href="../../../../../community/">Community</a></li>
|
||||
|
||||
<li><a href="../../../../../blog/">Blog</a></li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<div class="body-wrapper">
|
||||
|
||||
<div class="container">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-3">
|
||||
<ul class="tree-nav nocontent">
|
||||
<li><a href="../../../../">Welcome</a></li>
|
||||
|
||||
|
||||
<li><a href="../../../../what/">What is Lektor</a>
|
||||
|
||||
|
||||
<li><a href="../../../../installation/">Installation</a>
|
||||
|
||||
|
||||
<li><a href="../../../../quickstart/">Quickstart</a>
|
||||
|
||||
|
||||
<li><a href="../../../../project/">Project</a>
|
||||
|
||||
|
||||
<li><a href="../../../../content/">Content</a>
|
||||
|
||||
|
||||
<li><a href="../../../../templates/">Templates</a>
|
||||
|
||||
|
||||
<li><a href="../../../../themes/">Themes</a>
|
||||
|
||||
|
||||
<li><a href="../../../../guides/">Guides</a>
|
||||
|
||||
|
||||
<li><a href="../../../../deployment/">Deployment</a>
|
||||
|
||||
|
||||
<li><a href="../../../../plugins/">Plugins</a>
|
||||
|
||||
|
||||
<li><a href="../../../../models/">Data Modelling</a>
|
||||
|
||||
|
||||
<li><a href="../../../../cli/">Command Line</a>
|
||||
|
||||
|
||||
<li><a href="../../../">API</a>
|
||||
|
||||
<ul>
|
||||
<li><a href="../../../build/">Build System</a>
|
||||
|
||||
|
||||
<li><a href="../../../databags/">Databags</a>
|
||||
|
||||
|
||||
<li><a href="../../">Database</a>
|
||||
|
||||
<ul>
|
||||
<li><a href="../../types/">Builtin Field Types</a>
|
||||
|
||||
|
||||
<li><a href="../">Expression</a>
|
||||
|
||||
<ul>
|
||||
<li><a href="../ne/">!=</a>
|
||||
|
||||
|
||||
<li><a href="../lt/"><</a>
|
||||
|
||||
|
||||
<li><a href="../le/"><=</a>
|
||||
|
||||
|
||||
<li><a href="../eq/">==</a>
|
||||
|
||||
|
||||
<li><a href="../gt/">></a>
|
||||
|
||||
|
||||
<li><a href="../ge/">>=</a>
|
||||
|
||||
|
||||
<li><a href="../and/">and()</a>
|
||||
|
||||
|
||||
<li><a href="../contains/">contains()</a>
|
||||
|
||||
|
||||
<li><a href="../endswith/">endswith()</a>
|
||||
|
||||
|
||||
<li><a href="../endswith-cs/">endswith_cs()</a>
|
||||
|
||||
|
||||
<li><a href="../or/">or()</a>
|
||||
|
||||
|
||||
<li><a href="../startswith/">startswith()</a>
|
||||
|
||||
|
||||
<li class="active"><a href="./">startswith_cs()</a>
|
||||
|
||||
<ul></ul>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<li><a href="../../f/">F</a>
|
||||
|
||||
|
||||
<li><a href="../../get-alts/">get_alts()</a>
|
||||
|
||||
|
||||
<li><a href="../../pad/">Pad</a>
|
||||
|
||||
|
||||
<li><a href="../../query/">Query</a>
|
||||
|
||||
|
||||
<li><a href="../../record/">Record</a>
|
||||
|
||||
|
||||
<li><a href="../../obj/">SourceObject</a>
|
||||
|
||||
|
||||
<li><a href="../../system-fields/">System Fields</a>
|
||||
|
||||
|
||||
<li><a href="../../type/">Type</a>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<li><a href="../../../environment/">Environment</a>
|
||||
|
||||
|
||||
<li><a href="../../../plugins/">Plugins</a>
|
||||
|
||||
|
||||
<li><a href="../../../project/">Project</a>
|
||||
|
||||
|
||||
<li><a href="../../../publisher/">Publisher</a>
|
||||
|
||||
|
||||
<li><a href="../../../templates/">Template API</a>
|
||||
|
||||
|
||||
<li><a href="../../../utils/">Utilities</a>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<li><a href="../../../../search/">Search</a>
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<div class="visible-md-block visible-lg-block">
|
||||
<h4>This Page</h4>
|
||||
<ul class="toc">
|
||||
|
||||
<li><a href="#example">Example</a></li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-sm-9 doc-styling">
|
||||
|
||||
|
||||
<h1><i class="glyphicon glyphicon-cog"></i> <code class="obj">startswith_cs</code> <span class="sig">(<code>other</code>)</span></h1>
|
||||
|
||||
|
||||
|
||||
<ul class=page-meta>
|
||||
|
||||
<li>Method of <a href="../">Expression</a></li>
|
||||
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
<p>This evaluates to true if the <a href="../../types/string/" class="ref">string</a>
|
||||
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"><</span><span class="nt">h1</span><span class="p">></span>A<span class="p"></</span><span class="nt">h1</span><span class="p">></span>
|
||||
<span class="p"><</span><span class="nt">ul</span><span class="p">></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">'A'</span><span class="o">))</span> <span class="cp">%}</span>
|
||||
<span class="p"><</span><span class="nt">li</span><span class="p">></span><span class="cp">{{</span> <span class="nv">item.name</span> <span class="cp">}}</span><span class="p"></</span><span class="nt">li</span><span class="p">></span>
|
||||
<span class="cp">{%</span> <span class="k">endfor</span> <span class="cp">%}</span>
|
||||
<span class="p"></</span><span class="nt">ul</span><span class="p">></span>
|
||||
</pre></div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="comment-box">
|
||||
<h2>Comments</h2>
|
||||
|
||||
<div id="disqus_thread"></div>
|
||||
<script>
|
||||
var disqus_config = function() { this.page.identifier = "/docs/api/db/expression/startswith-cs"; this.page.url = "https://www.getlektor.com/docs/api/db/expression/startswith-cs/"; };
|
||||
(function() {
|
||||
var d = document, s = d.createElement('script');
|
||||
s.src = '//lektordocumentation.disqus.com/embed.js';
|
||||
s.setAttribute('data-timestamp', +new Date());
|
||||
(d.head || d.body).appendChild(s);
|
||||
})();
|
||||
</script>
|
||||
<noscript>
|
||||
Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript"
|
||||
rel="nofollow">comments powered by Disqus.</a>
|
||||
</noscript>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="bottomsummary">
|
||||
<div class="container">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<footer>
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-sm-4 icon-bar">
|
||||
<a href="https://github.com/lektor/lektor/" title="Lektor on GitHub"
|
||||
><i class="fa fa-github"></i></a>
|
||||
<a href="https://github.com/lektor/lektor/issues/" title="Report Issues for Lektor"
|
||||
><i class="fa fa-bug"></i></a>
|
||||
<a href="https://twitter.com/getlektor" title="Find Lektor on Twitter"
|
||||
><i class="fa fa-twitter"></i></a>
|
||||
<a href="https://gitter.im/lektor/lektor" title="Chat on Gitter"
|
||||
><i class="fa fa-comment"></i></a>
|
||||
<a href="https://github.com/lektor/lektor-website/tree/master/content/docs/api/db/expression/startswith-cs/contents.lr" title="View source for this page"><i class="fa fa-code"></i></a>
|
||||
</div>
|
||||
<div class="col-sm-8">
|
||||
<a href="../../../../../license/">License & Copyright</a> •
|
||||
<a href="../../../../../contact/">Contact</a> •
|
||||
Made with <i class="fa fa-fw fa-heart" title="Heart"><span hidden>Heart</span></i> in Carinthia
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
|
||||
<script type=text/javascript src="../../../../../static/app.js?h=bb1b933a" charset="utf-8"></script>
|
||||
<script>
|
||||
((window.gitter = {}).chat = {}).options = {
|
||||
room: 'lektor/lektor',
|
||||
activationElement: null
|
||||
};
|
||||
document.write('<button class="js-gitter-toggle-chat-button">Toggle Chat</button>');
|
||||
var dnt = navigator.doNotTrack || window.doNotTrack || navigator.msDoNotTrack;
|
||||
if (dnt != "1" && dnt != "yes") {
|
||||
window.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments)};ga.l=+new Date;
|
||||
ga('create', 'UA-70822533-1', 'auto');
|
||||
ga('set', 'anonymizeIp', true);
|
||||
ga('send', 'pageview');
|
||||
} else {
|
||||
console.debug("Respecting Do-Not-Track, not running analytics.");
|
||||
}
|
||||
</script>
|
||||
<script async src='https://www.google-analytics.com/analytics.js'></script>
|
||||
<script async defer id="github-bjs" src="https://buttons.github.io/buttons.js"></script>
|
||||
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script>
|
||||
<script src="https://sidecar.gitter.im/dist/sidecar.v1.js" async defer></script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,331 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<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/pygments.css">
|
||||
<link rel="shortcut icon" href="../../../../../static/favicon.png?h=fa09bedd">
|
||||
<title>startswith | Documentation | Lektor Static Content Management System</title>
|
||||
</head>
|
||||
<body class="default">
|
||||
<nav class="navbar navbar-inverse navbar-static-top">
|
||||
<div class="container">
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle collapsed"
|
||||
data-toggle="collapse" data-target="#navbar"
|
||||
aria-expanded="false" aria-controls="navbar">
|
||||
<span class="sr-only">Toggle navigation</span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<a class="navbar-brand" href="../../../../../">Lektor</a>
|
||||
</div>
|
||||
<div id="navbar" class="collapse navbar-collapse">
|
||||
<ul class="nav navbar-nav">
|
||||
|
||||
<li><a href="../../../../../downloads/">Download</a></li>
|
||||
|
||||
<li class="active"><a href="../../../../">Documentation</a></li>
|
||||
|
||||
<li><a href="../../../../../showcase/">Showcase</a></li>
|
||||
|
||||
<li><a href="../../../../../plugins/">Plugins</a></li>
|
||||
|
||||
<li><a href="../../../../../community/">Community</a></li>
|
||||
|
||||
<li><a href="../../../../../blog/">Blog</a></li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<div class="body-wrapper">
|
||||
|
||||
<div class="container">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-3">
|
||||
<ul class="tree-nav nocontent">
|
||||
<li><a href="../../../../">Welcome</a></li>
|
||||
|
||||
|
||||
<li><a href="../../../../what/">What is Lektor</a>
|
||||
|
||||
|
||||
<li><a href="../../../../installation/">Installation</a>
|
||||
|
||||
|
||||
<li><a href="../../../../quickstart/">Quickstart</a>
|
||||
|
||||
|
||||
<li><a href="../../../../project/">Project</a>
|
||||
|
||||
|
||||
<li><a href="../../../../content/">Content</a>
|
||||
|
||||
|
||||
<li><a href="../../../../templates/">Templates</a>
|
||||
|
||||
|
||||
<li><a href="../../../../themes/">Themes</a>
|
||||
|
||||
|
||||
<li><a href="../../../../guides/">Guides</a>
|
||||
|
||||
|
||||
<li><a href="../../../../deployment/">Deployment</a>
|
||||
|
||||
|
||||
<li><a href="../../../../plugins/">Plugins</a>
|
||||
|
||||
|
||||
<li><a href="../../../../models/">Data Modelling</a>
|
||||
|
||||
|
||||
<li><a href="../../../../cli/">Command Line</a>
|
||||
|
||||
|
||||
<li><a href="../../../">API</a>
|
||||
|
||||
<ul>
|
||||
<li><a href="../../../build/">Build System</a>
|
||||
|
||||
|
||||
<li><a href="../../../databags/">Databags</a>
|
||||
|
||||
|
||||
<li><a href="../../">Database</a>
|
||||
|
||||
<ul>
|
||||
<li><a href="../../types/">Builtin Field Types</a>
|
||||
|
||||
|
||||
<li><a href="../">Expression</a>
|
||||
|
||||
<ul>
|
||||
<li><a href="../ne/">!=</a>
|
||||
|
||||
|
||||
<li><a href="../lt/"><</a>
|
||||
|
||||
|
||||
<li><a href="../le/"><=</a>
|
||||
|
||||
|
||||
<li><a href="../eq/">==</a>
|
||||
|
||||
|
||||
<li><a href="../gt/">></a>
|
||||
|
||||
|
||||
<li><a href="../ge/">>=</a>
|
||||
|
||||
|
||||
<li><a href="../and/">and()</a>
|
||||
|
||||
|
||||
<li><a href="../contains/">contains()</a>
|
||||
|
||||
|
||||
<li><a href="../endswith/">endswith()</a>
|
||||
|
||||
|
||||
<li><a href="../endswith-cs/">endswith_cs()</a>
|
||||
|
||||
|
||||
<li><a href="../or/">or()</a>
|
||||
|
||||
|
||||
<li class="active"><a href="./">startswith()</a>
|
||||
|
||||
<ul></ul>
|
||||
|
||||
|
||||
<li><a href="../startswith-cs/">startswith_cs()</a>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<li><a href="../../f/">F</a>
|
||||
|
||||
|
||||
<li><a href="../../get-alts/">get_alts()</a>
|
||||
|
||||
|
||||
<li><a href="../../pad/">Pad</a>
|
||||
|
||||
|
||||
<li><a href="../../query/">Query</a>
|
||||
|
||||
|
||||
<li><a href="../../record/">Record</a>
|
||||
|
||||
|
||||
<li><a href="../../obj/">SourceObject</a>
|
||||
|
||||
|
||||
<li><a href="../../system-fields/">System Fields</a>
|
||||
|
||||
|
||||
<li><a href="../../type/">Type</a>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<li><a href="../../../environment/">Environment</a>
|
||||
|
||||
|
||||
<li><a href="../../../plugins/">Plugins</a>
|
||||
|
||||
|
||||
<li><a href="../../../project/">Project</a>
|
||||
|
||||
|
||||
<li><a href="../../../publisher/">Publisher</a>
|
||||
|
||||
|
||||
<li><a href="../../../templates/">Template API</a>
|
||||
|
||||
|
||||
<li><a href="../../../utils/">Utilities</a>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<li><a href="../../../../search/">Search</a>
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<div class="visible-md-block visible-lg-block">
|
||||
<h4>This Page</h4>
|
||||
<ul class="toc">
|
||||
|
||||
<li><a href="#example">Example</a></li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-sm-9 doc-styling">
|
||||
|
||||
|
||||
<h1><i class="glyphicon glyphicon-cog"></i> <code class="obj">startswith</code> <span class="sig">(<code>other</code>)</span></h1>
|
||||
|
||||
|
||||
|
||||
<ul class=page-meta>
|
||||
|
||||
<li>Method of <a href="../">Expression</a></li>
|
||||
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
<p>This evaluates to true if the <a href="../../types/string/" class="ref">string</a>
|
||||
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"><</span><span class="nt">h1</span><span class="p">></span>A<span class="p"></</span><span class="nt">h1</span><span class="p">></span>
|
||||
<span class="p"><</span><span class="nt">ul</span><span class="p">></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">'a'</span><span class="o">))</span> <span class="cp">%}</span>
|
||||
<span class="p"><</span><span class="nt">li</span><span class="p">></span><span class="cp">{{</span> <span class="nv">item.name</span> <span class="cp">}}</span><span class="p"></</span><span class="nt">li</span><span class="p">></span>
|
||||
<span class="cp">{%</span> <span class="k">endfor</span> <span class="cp">%}</span>
|
||||
<span class="p"></</span><span class="nt">ul</span><span class="p">></span>
|
||||
</pre></div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="comment-box">
|
||||
<h2>Comments</h2>
|
||||
|
||||
<div id="disqus_thread"></div>
|
||||
<script>
|
||||
var disqus_config = function() { this.page.identifier = "/docs/api/db/expression/startswith"; this.page.url = "https://www.getlektor.com/docs/api/db/expression/startswith/"; };
|
||||
(function() {
|
||||
var d = document, s = d.createElement('script');
|
||||
s.src = '//lektordocumentation.disqus.com/embed.js';
|
||||
s.setAttribute('data-timestamp', +new Date());
|
||||
(d.head || d.body).appendChild(s);
|
||||
})();
|
||||
</script>
|
||||
<noscript>
|
||||
Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript"
|
||||
rel="nofollow">comments powered by Disqus.</a>
|
||||
</noscript>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="bottomsummary">
|
||||
<div class="container">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<footer>
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-sm-4 icon-bar">
|
||||
<a href="https://github.com/lektor/lektor/" title="Lektor on GitHub"
|
||||
><i class="fa fa-github"></i></a>
|
||||
<a href="https://github.com/lektor/lektor/issues/" title="Report Issues for Lektor"
|
||||
><i class="fa fa-bug"></i></a>
|
||||
<a href="https://twitter.com/getlektor" title="Find Lektor on Twitter"
|
||||
><i class="fa fa-twitter"></i></a>
|
||||
<a href="https://gitter.im/lektor/lektor" title="Chat on Gitter"
|
||||
><i class="fa fa-comment"></i></a>
|
||||
<a href="https://github.com/lektor/lektor-website/tree/master/content/docs/api/db/expression/startswith/contents.lr" title="View source for this page"><i class="fa fa-code"></i></a>
|
||||
</div>
|
||||
<div class="col-sm-8">
|
||||
<a href="../../../../../license/">License & Copyright</a> •
|
||||
<a href="../../../../../contact/">Contact</a> •
|
||||
Made with <i class="fa fa-fw fa-heart" title="Heart"><span hidden>Heart</span></i> in Carinthia
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
|
||||
<script type=text/javascript src="../../../../../static/app.js?h=bb1b933a" charset="utf-8"></script>
|
||||
<script>
|
||||
((window.gitter = {}).chat = {}).options = {
|
||||
room: 'lektor/lektor',
|
||||
activationElement: null
|
||||
};
|
||||
document.write('<button class="js-gitter-toggle-chat-button">Toggle Chat</button>');
|
||||
var dnt = navigator.doNotTrack || window.doNotTrack || navigator.msDoNotTrack;
|
||||
if (dnt != "1" && dnt != "yes") {
|
||||
window.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments)};ga.l=+new Date;
|
||||
ga('create', 'UA-70822533-1', 'auto');
|
||||
ga('set', 'anonymizeIp', true);
|
||||
ga('send', 'pageview');
|
||||
} else {
|
||||
console.debug("Respecting Do-Not-Track, not running analytics.");
|
||||
}
|
||||
</script>
|
||||
<script async src='https://www.google-analytics.com/analytics.js'></script>
|
||||
<script async defer id="github-bjs" src="https://buttons.github.io/buttons.js"></script>
|
||||
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script>
|
||||
<script src="https://sidecar.gitter.im/dist/sidecar.v1.js" async defer></script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,290 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<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/pygments.css">
|
||||
<link rel="shortcut icon" href="../../../../static/favicon.png?h=fa09bedd">
|
||||
<title>F | Documentation | Lektor Static Content Management System</title>
|
||||
</head>
|
||||
<body class="default">
|
||||
<nav class="navbar navbar-inverse navbar-static-top">
|
||||
<div class="container">
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle collapsed"
|
||||
data-toggle="collapse" data-target="#navbar"
|
||||
aria-expanded="false" aria-controls="navbar">
|
||||
<span class="sr-only">Toggle navigation</span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<a class="navbar-brand" href="../../../../">Lektor</a>
|
||||
</div>
|
||||
<div id="navbar" class="collapse navbar-collapse">
|
||||
<ul class="nav navbar-nav">
|
||||
|
||||
<li><a href="../../../../downloads/">Download</a></li>
|
||||
|
||||
<li class="active"><a href="../../../">Documentation</a></li>
|
||||
|
||||
<li><a href="../../../../showcase/">Showcase</a></li>
|
||||
|
||||
<li><a href="../../../../plugins/">Plugins</a></li>
|
||||
|
||||
<li><a href="../../../../community/">Community</a></li>
|
||||
|
||||
<li><a href="../../../../blog/">Blog</a></li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<div class="body-wrapper">
|
||||
|
||||
<div class="container">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-3">
|
||||
<ul class="tree-nav nocontent">
|
||||
<li><a href="../../../">Welcome</a></li>
|
||||
|
||||
|
||||
<li><a href="../../../what/">What is Lektor</a>
|
||||
|
||||
|
||||
<li><a href="../../../installation/">Installation</a>
|
||||
|
||||
|
||||
<li><a href="../../../quickstart/">Quickstart</a>
|
||||
|
||||
|
||||
<li><a href="../../../project/">Project</a>
|
||||
|
||||
|
||||
<li><a href="../../../content/">Content</a>
|
||||
|
||||
|
||||
<li><a href="../../../templates/">Templates</a>
|
||||
|
||||
|
||||
<li><a href="../../../themes/">Themes</a>
|
||||
|
||||
|
||||
<li><a href="../../../guides/">Guides</a>
|
||||
|
||||
|
||||
<li><a href="../../../deployment/">Deployment</a>
|
||||
|
||||
|
||||
<li><a href="../../../plugins/">Plugins</a>
|
||||
|
||||
|
||||
<li><a href="../../../models/">Data Modelling</a>
|
||||
|
||||
|
||||
<li><a href="../../../cli/">Command Line</a>
|
||||
|
||||
|
||||
<li><a href="../../">API</a>
|
||||
|
||||
<ul>
|
||||
<li><a href="../../build/">Build System</a>
|
||||
|
||||
|
||||
<li><a href="../../databags/">Databags</a>
|
||||
|
||||
|
||||
<li><a href="../">Database</a>
|
||||
|
||||
<ul>
|
||||
<li><a href="../types/">Builtin Field Types</a>
|
||||
|
||||
|
||||
<li><a href="../expression/">Expression</a>
|
||||
|
||||
|
||||
<li class="active"><a href="./">F</a>
|
||||
|
||||
<ul></ul>
|
||||
|
||||
|
||||
<li><a href="../get-alts/">get_alts()</a>
|
||||
|
||||
|
||||
<li><a href="../pad/">Pad</a>
|
||||
|
||||
|
||||
<li><a href="../query/">Query</a>
|
||||
|
||||
|
||||
<li><a href="../record/">Record</a>
|
||||
|
||||
|
||||
<li><a href="../obj/">SourceObject</a>
|
||||
|
||||
|
||||
<li><a href="../system-fields/">System Fields</a>
|
||||
|
||||
|
||||
<li><a href="../type/">Type</a>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<li><a href="../../environment/">Environment</a>
|
||||
|
||||
|
||||
<li><a href="../../plugins/">Plugins</a>
|
||||
|
||||
|
||||
<li><a href="../../project/">Project</a>
|
||||
|
||||
|
||||
<li><a href="../../publisher/">Publisher</a>
|
||||
|
||||
|
||||
<li><a href="../../templates/">Template API</a>
|
||||
|
||||
|
||||
<li><a href="../../utils/">Utilities</a>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<li><a href="../../../search/">Search</a>
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<div class="visible-md-block visible-lg-block">
|
||||
<h4>This Page</h4>
|
||||
<ul class="toc">
|
||||
|
||||
<li><a href="#example">Example</a></li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-sm-9 doc-styling">
|
||||
|
||||
|
||||
<h1><i class="glyphicon glyphicon-leaf"></i> <code class="mod">lektor.db.</code><code class="obj">F</code></h1>
|
||||
|
||||
|
||||
|
||||
<ul class=page-meta>
|
||||
|
||||
|
||||
<li>Template variable: <a href="../../templates/globals/f/"><code>F</code></a></li>
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
<p>When filtering a <a href="../query/" class="ref">Query</a> it's often necessary to refer to a
|
||||
field of an arbitrary record. This can be achieved with the <code>F</code> object. Any
|
||||
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"><</span><span class="nt">ul</span><span class="p">></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">'published'</span><span class="o">)</span> <span class="cp">%}</span>
|
||||
<span class="p"><</span><span class="nt">li</span><span class="p">></span><span class="cp">{{</span> <span class="nv">item.title</span> <span class="cp">}}</span><span class="p"></</span><span class="nt">li</span><span class="p">></span>
|
||||
<span class="cp">{%</span> <span class="k">endfor</span> <span class="cp">%}</span>
|
||||
<span class="p"></</span><span class="nt">ul</span><span class="p">></span>
|
||||
</pre></div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="comment-box">
|
||||
<h2>Comments</h2>
|
||||
|
||||
<div id="disqus_thread"></div>
|
||||
<script>
|
||||
var disqus_config = function() { this.page.identifier = "/docs/api/db/f"; this.page.url = "https://www.getlektor.com/docs/api/db/f/"; };
|
||||
(function() {
|
||||
var d = document, s = d.createElement('script');
|
||||
s.src = '//lektordocumentation.disqus.com/embed.js';
|
||||
s.setAttribute('data-timestamp', +new Date());
|
||||
(d.head || d.body).appendChild(s);
|
||||
})();
|
||||
</script>
|
||||
<noscript>
|
||||
Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript"
|
||||
rel="nofollow">comments powered by Disqus.</a>
|
||||
</noscript>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="bottomsummary">
|
||||
<div class="container">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<footer>
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-sm-4 icon-bar">
|
||||
<a href="https://github.com/lektor/lektor/" title="Lektor on GitHub"
|
||||
><i class="fa fa-github"></i></a>
|
||||
<a href="https://github.com/lektor/lektor/issues/" title="Report Issues for Lektor"
|
||||
><i class="fa fa-bug"></i></a>
|
||||
<a href="https://twitter.com/getlektor" title="Find Lektor on Twitter"
|
||||
><i class="fa fa-twitter"></i></a>
|
||||
<a href="https://gitter.im/lektor/lektor" title="Chat on Gitter"
|
||||
><i class="fa fa-comment"></i></a>
|
||||
<a href="https://github.com/lektor/lektor-website/tree/master/content/docs/api/db/f/contents.lr" title="View source for this page"><i class="fa fa-code"></i></a>
|
||||
</div>
|
||||
<div class="col-sm-8">
|
||||
<a href="../../../../license/">License & Copyright</a> •
|
||||
<a href="../../../../contact/">Contact</a> •
|
||||
Made with <i class="fa fa-fw fa-heart" title="Heart"><span hidden>Heart</span></i> in Carinthia
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
|
||||
<script type=text/javascript src="../../../../static/app.js?h=bb1b933a" charset="utf-8"></script>
|
||||
<script>
|
||||
((window.gitter = {}).chat = {}).options = {
|
||||
room: 'lektor/lektor',
|
||||
activationElement: null
|
||||
};
|
||||
document.write('<button class="js-gitter-toggle-chat-button">Toggle Chat</button>');
|
||||
var dnt = navigator.doNotTrack || window.doNotTrack || navigator.msDoNotTrack;
|
||||
if (dnt != "1" && dnt != "yes") {
|
||||
window.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments)};ga.l=+new Date;
|
||||
ga('create', 'UA-70822533-1', 'auto');
|
||||
ga('set', 'anonymizeIp', true);
|
||||
ga('send', 'pageview');
|
||||
} else {
|
||||
console.debug("Respecting Do-Not-Track, not running analytics.");
|
||||
}
|
||||
</script>
|
||||
<script async src='https://www.google-analytics.com/analytics.js'></script>
|
||||
<script async defer id="github-bjs" src="https://buttons.github.io/buttons.js"></script>
|
||||
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script>
|
||||
<script src="https://sidecar.gitter.im/dist/sidecar.v1.js" async defer></script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,293 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<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/pygments.css">
|
||||
<link rel="shortcut icon" href="../../../../static/favicon.png?h=fa09bedd">
|
||||
<title>get_alts | Documentation | Lektor Static Content Management System</title>
|
||||
</head>
|
||||
<body class="default">
|
||||
<nav class="navbar navbar-inverse navbar-static-top">
|
||||
<div class="container">
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle collapsed"
|
||||
data-toggle="collapse" data-target="#navbar"
|
||||
aria-expanded="false" aria-controls="navbar">
|
||||
<span class="sr-only">Toggle navigation</span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<a class="navbar-brand" href="../../../../">Lektor</a>
|
||||
</div>
|
||||
<div id="navbar" class="collapse navbar-collapse">
|
||||
<ul class="nav navbar-nav">
|
||||
|
||||
<li><a href="../../../../downloads/">Download</a></li>
|
||||
|
||||
<li class="active"><a href="../../../">Documentation</a></li>
|
||||
|
||||
<li><a href="../../../../showcase/">Showcase</a></li>
|
||||
|
||||
<li><a href="../../../../plugins/">Plugins</a></li>
|
||||
|
||||
<li><a href="../../../../community/">Community</a></li>
|
||||
|
||||
<li><a href="../../../../blog/">Blog</a></li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<div class="body-wrapper">
|
||||
|
||||
<div class="container">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-3">
|
||||
<ul class="tree-nav nocontent">
|
||||
<li><a href="../../../">Welcome</a></li>
|
||||
|
||||
|
||||
<li><a href="../../../what/">What is Lektor</a>
|
||||
|
||||
|
||||
<li><a href="../../../installation/">Installation</a>
|
||||
|
||||
|
||||
<li><a href="../../../quickstart/">Quickstart</a>
|
||||
|
||||
|
||||
<li><a href="../../../project/">Project</a>
|
||||
|
||||
|
||||
<li><a href="../../../content/">Content</a>
|
||||
|
||||
|
||||
<li><a href="../../../templates/">Templates</a>
|
||||
|
||||
|
||||
<li><a href="../../../themes/">Themes</a>
|
||||
|
||||
|
||||
<li><a href="../../../guides/">Guides</a>
|
||||
|
||||
|
||||
<li><a href="../../../deployment/">Deployment</a>
|
||||
|
||||
|
||||
<li><a href="../../../plugins/">Plugins</a>
|
||||
|
||||
|
||||
<li><a href="../../../models/">Data Modelling</a>
|
||||
|
||||
|
||||
<li><a href="../../../cli/">Command Line</a>
|
||||
|
||||
|
||||
<li><a href="../../">API</a>
|
||||
|
||||
<ul>
|
||||
<li><a href="../../build/">Build System</a>
|
||||
|
||||
|
||||
<li><a href="../../databags/">Databags</a>
|
||||
|
||||
|
||||
<li><a href="../">Database</a>
|
||||
|
||||
<ul>
|
||||
<li><a href="../types/">Builtin Field Types</a>
|
||||
|
||||
|
||||
<li><a href="../expression/">Expression</a>
|
||||
|
||||
|
||||
<li><a href="../f/">F</a>
|
||||
|
||||
|
||||
<li class="active"><a href="./">get_alts()</a>
|
||||
|
||||
<ul></ul>
|
||||
|
||||
|
||||
<li><a href="../pad/">Pad</a>
|
||||
|
||||
|
||||
<li><a href="../query/">Query</a>
|
||||
|
||||
|
||||
<li><a href="../record/">Record</a>
|
||||
|
||||
|
||||
<li><a href="../obj/">SourceObject</a>
|
||||
|
||||
|
||||
<li><a href="../system-fields/">System Fields</a>
|
||||
|
||||
|
||||
<li><a href="../type/">Type</a>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<li><a href="../../environment/">Environment</a>
|
||||
|
||||
|
||||
<li><a href="../../plugins/">Plugins</a>
|
||||
|
||||
|
||||
<li><a href="../../project/">Project</a>
|
||||
|
||||
|
||||
<li><a href="../../publisher/">Publisher</a>
|
||||
|
||||
|
||||
<li><a href="../../templates/">Template API</a>
|
||||
|
||||
|
||||
<li><a href="../../utils/">Utilities</a>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<li><a href="../../../search/">Search</a>
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<div class="visible-md-block visible-lg-block">
|
||||
<h4>This Page</h4>
|
||||
<ul class="toc">
|
||||
|
||||
<li><a href="#example">Example</a></li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-sm-9 doc-styling">
|
||||
|
||||
|
||||
<h1><i class="glyphicon glyphicon-cog"></i> <code class="mod">lektor.db.</code><code class="obj">get_alts</code> <span class="sig">(<code>source=None, fallback=False</code>)</span></h1>
|
||||
|
||||
|
||||
|
||||
<ul class=page-meta>
|
||||
|
||||
|
||||
|
||||
<li>New in Lektor Version <em>2.0</em></li>
|
||||
|
||||
</ul>
|
||||
|
||||
<p>Given a source this function returns the list of all <a href="../../../content/alts/" class="ref">Alternatives</a> that the source exists as. It does not include
|
||||
fallbacks unless <code>fallback=True</code> is passed. If no source is provided all
|
||||
configured alts are returned. If alts are not configured at all, the return
|
||||
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"><</span><span class="nt">p</span><span class="p">></span>Other languages:
|
||||
<span class="p"><</span><span class="nt">ul</span><span class="p">></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"><</span><span class="nt">li</span><span class="p">><</span><span class="nt">a</span> <span class="na">href</span><span class="o">=</span><span class="s">"</span><span class="cp">{{</span> <span class="s1">'.'</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">"</span><span class="p">></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"></</span><span class="nt">a</span><span class="p">></</span><span class="nt">li</span><span class="p">></span>
|
||||
<span class="cp">{%</span> <span class="k">endfor</span> <span class="cp">%}</span>
|
||||
<span class="p"></</span><span class="nt">ul</span><span class="p">></span>
|
||||
</pre></div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="comment-box">
|
||||
<h2>Comments</h2>
|
||||
|
||||
<div id="disqus_thread"></div>
|
||||
<script>
|
||||
var disqus_config = function() { this.page.identifier = "/docs/api/db/get-alts"; this.page.url = "https://www.getlektor.com/docs/api/db/get-alts/"; };
|
||||
(function() {
|
||||
var d = document, s = d.createElement('script');
|
||||
s.src = '//lektordocumentation.disqus.com/embed.js';
|
||||
s.setAttribute('data-timestamp', +new Date());
|
||||
(d.head || d.body).appendChild(s);
|
||||
})();
|
||||
</script>
|
||||
<noscript>
|
||||
Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript"
|
||||
rel="nofollow">comments powered by Disqus.</a>
|
||||
</noscript>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="bottomsummary">
|
||||
<div class="container">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<footer>
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-sm-4 icon-bar">
|
||||
<a href="https://github.com/lektor/lektor/" title="Lektor on GitHub"
|
||||
><i class="fa fa-github"></i></a>
|
||||
<a href="https://github.com/lektor/lektor/issues/" title="Report Issues for Lektor"
|
||||
><i class="fa fa-bug"></i></a>
|
||||
<a href="https://twitter.com/getlektor" title="Find Lektor on Twitter"
|
||||
><i class="fa fa-twitter"></i></a>
|
||||
<a href="https://gitter.im/lektor/lektor" title="Chat on Gitter"
|
||||
><i class="fa fa-comment"></i></a>
|
||||
<a href="https://github.com/lektor/lektor-website/tree/master/content/docs/api/db/get-alts/contents.lr" title="View source for this page"><i class="fa fa-code"></i></a>
|
||||
</div>
|
||||
<div class="col-sm-8">
|
||||
<a href="../../../../license/">License & Copyright</a> •
|
||||
<a href="../../../../contact/">Contact</a> •
|
||||
Made with <i class="fa fa-fw fa-heart" title="Heart"><span hidden>Heart</span></i> in Carinthia
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
|
||||
<script type=text/javascript src="../../../../static/app.js?h=bb1b933a" charset="utf-8"></script>
|
||||
<script>
|
||||
((window.gitter = {}).chat = {}).options = {
|
||||
room: 'lektor/lektor',
|
||||
activationElement: null
|
||||
};
|
||||
document.write('<button class="js-gitter-toggle-chat-button">Toggle Chat</button>');
|
||||
var dnt = navigator.doNotTrack || window.doNotTrack || navigator.msDoNotTrack;
|
||||
if (dnt != "1" && dnt != "yes") {
|
||||
window.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments)};ga.l=+new Date;
|
||||
ga('create', 'UA-70822533-1', 'auto');
|
||||
ga('set', 'anonymizeIp', true);
|
||||
ga('send', 'pageview');
|
||||
} else {
|
||||
console.debug("Respecting Do-Not-Track, not running analytics.");
|
||||
}
|
||||
</script>
|
||||
<script async src='https://www.google-analytics.com/analytics.js'></script>
|
||||
<script async defer id="github-bjs" src="https://buttons.github.io/buttons.js"></script>
|
||||
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script>
|
||||
<script src="https://sidecar.gitter.im/dist/sidecar.v1.js" async defer></script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,394 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<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/pygments.css">
|
||||
<link rel="shortcut icon" href="../../../static/favicon.png?h=fa09bedd">
|
||||
<title>Database | Documentation | Lektor Static Content Management System</title>
|
||||
</head>
|
||||
<body class="default">
|
||||
<nav class="navbar navbar-inverse navbar-static-top">
|
||||
<div class="container">
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle collapsed"
|
||||
data-toggle="collapse" data-target="#navbar"
|
||||
aria-expanded="false" aria-controls="navbar">
|
||||
<span class="sr-only">Toggle navigation</span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<a class="navbar-brand" href="../../../">Lektor</a>
|
||||
</div>
|
||||
<div id="navbar" class="collapse navbar-collapse">
|
||||
<ul class="nav navbar-nav">
|
||||
|
||||
<li><a href="../../../downloads/">Download</a></li>
|
||||
|
||||
<li class="active"><a href="../../">Documentation</a></li>
|
||||
|
||||
<li><a href="../../../showcase/">Showcase</a></li>
|
||||
|
||||
<li><a href="../../../plugins/">Plugins</a></li>
|
||||
|
||||
<li><a href="../../../community/">Community</a></li>
|
||||
|
||||
<li><a href="../../../blog/">Blog</a></li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<div class="body-wrapper">
|
||||
|
||||
<div class="container">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-3">
|
||||
<ul class="tree-nav nocontent">
|
||||
<li><a href="../../">Welcome</a></li>
|
||||
|
||||
|
||||
<li><a href="../../what/">What is Lektor</a>
|
||||
|
||||
|
||||
<li><a href="../../installation/">Installation</a>
|
||||
|
||||
|
||||
<li><a href="../../quickstart/">Quickstart</a>
|
||||
|
||||
|
||||
<li><a href="../../project/">Project</a>
|
||||
|
||||
|
||||
<li><a href="../../content/">Content</a>
|
||||
|
||||
|
||||
<li><a href="../../templates/">Templates</a>
|
||||
|
||||
|
||||
<li><a href="../../themes/">Themes</a>
|
||||
|
||||
|
||||
<li><a href="../../guides/">Guides</a>
|
||||
|
||||
|
||||
<li><a href="../../deployment/">Deployment</a>
|
||||
|
||||
|
||||
<li><a href="../../plugins/">Plugins</a>
|
||||
|
||||
|
||||
<li><a href="../../models/">Data Modelling</a>
|
||||
|
||||
|
||||
<li><a href="../../cli/">Command Line</a>
|
||||
|
||||
|
||||
<li><a href="../">API</a>
|
||||
|
||||
<ul>
|
||||
<li><a href="../build/">Build System</a>
|
||||
|
||||
|
||||
<li><a href="../databags/">Databags</a>
|
||||
|
||||
|
||||
<li class="active"><a href="./">Database</a>
|
||||
|
||||
<ul>
|
||||
<li><a href="types/">Builtin Field Types</a>
|
||||
|
||||
|
||||
<li><a href="expression/">Expression</a>
|
||||
|
||||
|
||||
<li><a href="f/">F</a>
|
||||
|
||||
|
||||
<li><a href="get-alts/">get_alts()</a>
|
||||
|
||||
|
||||
<li><a href="pad/">Pad</a>
|
||||
|
||||
|
||||
<li><a href="query/">Query</a>
|
||||
|
||||
|
||||
<li><a href="record/">Record</a>
|
||||
|
||||
|
||||
<li><a href="obj/">SourceObject</a>
|
||||
|
||||
|
||||
<li><a href="system-fields/">System Fields</a>
|
||||
|
||||
|
||||
<li><a href="type/">Type</a>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<li><a href="../environment/">Environment</a>
|
||||
|
||||
|
||||
<li><a href="../plugins/">Plugins</a>
|
||||
|
||||
|
||||
<li><a href="../project/">Project</a>
|
||||
|
||||
|
||||
<li><a href="../publisher/">Publisher</a>
|
||||
|
||||
|
||||
<li><a href="../templates/">Template API</a>
|
||||
|
||||
|
||||
<li><a href="../utils/">Utilities</a>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<li><a href="../../search/">Search</a>
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-sm-9 doc-styling">
|
||||
|
||||
|
||||
<h1>Database</h1>
|
||||
|
||||
|
||||
|
||||
<ul class=page-meta>
|
||||
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
<p>While Lektor does not have a real traditional SQL database, it has a tree
|
||||
based data layer which is internally called the database. It's a very
|
||||
powerful tool for building websites and is accessible from plugin API,
|
||||
the <code>shell</code> command as well as from within the templates.</p>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="child-pages nocontent">
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-6 child">
|
||||
<h4>
|
||||
<i class="glyphicon glyphicon-list-alt"></i>
|
||||
<a href="types/">Builtin Field Types</a>
|
||||
</h4>
|
||||
|
||||
<p class="summary">An overview of all the field types supported in Lektor.</p>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-md-6 child">
|
||||
<h4>
|
||||
<i class="glyphicon glyphicon-leaf"></i>
|
||||
<a href="expression/">Expression</a>
|
||||
</h4>
|
||||
|
||||
<p class="summary">Represents filter expressions for the query system.</p>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-6 child">
|
||||
<h4>
|
||||
<i class="glyphicon glyphicon-leaf"></i>
|
||||
<a href="f/">F</a>
|
||||
</h4>
|
||||
|
||||
<p class="summary">Helper object to refer to fields in query filters.</p>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-md-6 child">
|
||||
<h4>
|
||||
<i class="glyphicon glyphicon-cog"></i>
|
||||
<a href="get-alts/">get_alts()</a>
|
||||
</h4>
|
||||
|
||||
<p class="summary">Helper function to return the list of alternatives for a source</p>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-6 child">
|
||||
<h4>
|
||||
<i class="glyphicon glyphicon-leaf"></i>
|
||||
<a href="pad/">Pad</a>
|
||||
</h4>
|
||||
|
||||
<p class="summary">The basic interface to querying the database.</p>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-md-6 child">
|
||||
<h4>
|
||||
<i class="glyphicon glyphicon-leaf"></i>
|
||||
<a href="query/">Query</a>
|
||||
</h4>
|
||||
|
||||
<p class="summary">Provides functionality to query the database.</p>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-6 child">
|
||||
<h4>
|
||||
<i class="glyphicon glyphicon-leaf"></i>
|
||||
<a href="record/">Record</a>
|
||||
</h4>
|
||||
|
||||
<p class="summary">Specific features of pages and attachments.</p>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-md-6 child">
|
||||
<h4>
|
||||
<i class="glyphicon glyphicon-leaf"></i>
|
||||
<a href="obj/">SourceObject</a>
|
||||
</h4>
|
||||
|
||||
<p class="summary">The basic interface of all source objects.</p>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-6 child">
|
||||
<h4>
|
||||
<i class="glyphicon glyphicon-list-alt"></i>
|
||||
<a href="system-fields/">System Fields</a>
|
||||
</h4>
|
||||
|
||||
<p class="summary">The complete list of system fields in Lektor</p>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-md-6 child">
|
||||
<h4>
|
||||
<i class="glyphicon glyphicon-leaf"></i>
|
||||
<a href="type/">Type</a>
|
||||
</h4>
|
||||
|
||||
<p class="summary">The base class for all field types.</p>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="comment-box">
|
||||
<h2>Comments</h2>
|
||||
|
||||
<div id="disqus_thread"></div>
|
||||
<script>
|
||||
var disqus_config = function() { this.page.identifier = "/docs/api/db"; this.page.url = "https://www.getlektor.com/docs/api/db/"; };
|
||||
(function() {
|
||||
var d = document, s = d.createElement('script');
|
||||
s.src = '//lektordocumentation.disqus.com/embed.js';
|
||||
s.setAttribute('data-timestamp', +new Date());
|
||||
(d.head || d.body).appendChild(s);
|
||||
})();
|
||||
</script>
|
||||
<noscript>
|
||||
Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript"
|
||||
rel="nofollow">comments powered by Disqus.</a>
|
||||
</noscript>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="bottomsummary">
|
||||
<div class="container">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<footer>
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-sm-4 icon-bar">
|
||||
<a href="https://github.com/lektor/lektor/" title="Lektor on GitHub"
|
||||
><i class="fa fa-github"></i></a>
|
||||
<a href="https://github.com/lektor/lektor/issues/" title="Report Issues for Lektor"
|
||||
><i class="fa fa-bug"></i></a>
|
||||
<a href="https://twitter.com/getlektor" title="Find Lektor on Twitter"
|
||||
><i class="fa fa-twitter"></i></a>
|
||||
<a href="https://gitter.im/lektor/lektor" title="Chat on Gitter"
|
||||
><i class="fa fa-comment"></i></a>
|
||||
<a href="https://github.com/lektor/lektor-website/tree/master/content/docs/api/db/contents.lr" title="View source for this page"><i class="fa fa-code"></i></a>
|
||||
</div>
|
||||
<div class="col-sm-8">
|
||||
<a href="../../../license/">License & Copyright</a> •
|
||||
<a href="../../../contact/">Contact</a> •
|
||||
Made with <i class="fa fa-fw fa-heart" title="Heart"><span hidden>Heart</span></i> in Carinthia
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
|
||||
<script type=text/javascript src="../../../static/app.js?h=bb1b933a" charset="utf-8"></script>
|
||||
<script>
|
||||
((window.gitter = {}).chat = {}).options = {
|
||||
room: 'lektor/lektor',
|
||||
activationElement: null
|
||||
};
|
||||
document.write('<button class="js-gitter-toggle-chat-button">Toggle Chat</button>');
|
||||
var dnt = navigator.doNotTrack || window.doNotTrack || navigator.msDoNotTrack;
|
||||
if (dnt != "1" && dnt != "yes") {
|
||||
window.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments)};ga.l=+new Date;
|
||||
ga('create', 'UA-70822533-1', 'auto');
|
||||
ga('set', 'anonymizeIp', true);
|
||||
ga('send', 'pageview');
|
||||
} else {
|
||||
console.debug("Respecting Do-Not-Track, not running analytics.");
|
||||
}
|
||||
</script>
|
||||
<script async src='https://www.google-analytics.com/analytics.js'></script>
|
||||
<script async defer id="github-bjs" src="https://buttons.github.io/buttons.js"></script>
|
||||
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script>
|
||||
<script src="https://sidecar.gitter.im/dist/sidecar.v1.js" async defer></script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,321 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<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/pygments.css">
|
||||
<link rel="shortcut icon" href="../../../../../static/favicon.png?h=fa09bedd">
|
||||
<title>alt | Documentation | Lektor Static Content Management System</title>
|
||||
</head>
|
||||
<body class="default">
|
||||
<nav class="navbar navbar-inverse navbar-static-top">
|
||||
<div class="container">
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle collapsed"
|
||||
data-toggle="collapse" data-target="#navbar"
|
||||
aria-expanded="false" aria-controls="navbar">
|
||||
<span class="sr-only">Toggle navigation</span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<a class="navbar-brand" href="../../../../../">Lektor</a>
|
||||
</div>
|
||||
<div id="navbar" class="collapse navbar-collapse">
|
||||
<ul class="nav navbar-nav">
|
||||
|
||||
<li><a href="../../../../../downloads/">Download</a></li>
|
||||
|
||||
<li class="active"><a href="../../../../">Documentation</a></li>
|
||||
|
||||
<li><a href="../../../../../showcase/">Showcase</a></li>
|
||||
|
||||
<li><a href="../../../../../plugins/">Plugins</a></li>
|
||||
|
||||
<li><a href="../../../../../community/">Community</a></li>
|
||||
|
||||
<li><a href="../../../../../blog/">Blog</a></li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<div class="body-wrapper">
|
||||
|
||||
<div class="container">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-3">
|
||||
<ul class="tree-nav nocontent">
|
||||
<li><a href="../../../../">Welcome</a></li>
|
||||
|
||||
|
||||
<li><a href="../../../../what/">What is Lektor</a>
|
||||
|
||||
|
||||
<li><a href="../../../../installation/">Installation</a>
|
||||
|
||||
|
||||
<li><a href="../../../../quickstart/">Quickstart</a>
|
||||
|
||||
|
||||
<li><a href="../../../../project/">Project</a>
|
||||
|
||||
|
||||
<li><a href="../../../../content/">Content</a>
|
||||
|
||||
|
||||
<li><a href="../../../../templates/">Templates</a>
|
||||
|
||||
|
||||
<li><a href="../../../../themes/">Themes</a>
|
||||
|
||||
|
||||
<li><a href="../../../../guides/">Guides</a>
|
||||
|
||||
|
||||
<li><a href="../../../../deployment/">Deployment</a>
|
||||
|
||||
|
||||
<li><a href="../../../../plugins/">Plugins</a>
|
||||
|
||||
|
||||
<li><a href="../../../../models/">Data Modelling</a>
|
||||
|
||||
|
||||
<li><a href="../../../../cli/">Command Line</a>
|
||||
|
||||
|
||||
<li><a href="../../../">API</a>
|
||||
|
||||
<ul>
|
||||
<li><a href="../../../build/">Build System</a>
|
||||
|
||||
|
||||
<li><a href="../../../databags/">Databags</a>
|
||||
|
||||
|
||||
<li><a href="../../">Database</a>
|
||||
|
||||
<ul>
|
||||
<li><a href="../../types/">Builtin Field Types</a>
|
||||
|
||||
|
||||
<li><a href="../../expression/">Expression</a>
|
||||
|
||||
|
||||
<li><a href="../../f/">F</a>
|
||||
|
||||
|
||||
<li><a href="../../get-alts/">get_alts()</a>
|
||||
|
||||
|
||||
<li><a href="../../pad/">Pad</a>
|
||||
|
||||
|
||||
<li><a href="../../query/">Query</a>
|
||||
|
||||
|
||||
<li><a href="../../record/">Record</a>
|
||||
|
||||
|
||||
<li><a href="../">SourceObject</a>
|
||||
|
||||
<ul>
|
||||
<li class="active"><a href="./">alt</a>
|
||||
|
||||
<ul></ul>
|
||||
|
||||
|
||||
<li><a href="../is-child-of/">is_child_of()</a>
|
||||
|
||||
|
||||
<li><a href="../is-discoverable/">is_discoverable</a>
|
||||
|
||||
|
||||
<li><a href="../is-hidden/">is_hidden</a>
|
||||
|
||||
|
||||
<li><a href="../is-undiscoverable/">is_undiscoverable</a>
|
||||
|
||||
|
||||
<li><a href="../is-visible/">is_visible</a>
|
||||
|
||||
|
||||
<li><a href="../parent/">parent</a>
|
||||
|
||||
|
||||
<li><a href="../path/">path</a>
|
||||
|
||||
|
||||
<li><a href="../record/">record</a>
|
||||
|
||||
|
||||
<li><a href="../source-filename/">source_filename</a>
|
||||
|
||||
|
||||
<li><a href="../url-path/">url_path</a>
|
||||
|
||||
|
||||
<li><a href="../url-to/">url_to()</a>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<li><a href="../../system-fields/">System Fields</a>
|
||||
|
||||
|
||||
<li><a href="../../type/">Type</a>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<li><a href="../../../environment/">Environment</a>
|
||||
|
||||
|
||||
<li><a href="../../../plugins/">Plugins</a>
|
||||
|
||||
|
||||
<li><a href="../../../project/">Project</a>
|
||||
|
||||
|
||||
<li><a href="../../../publisher/">Publisher</a>
|
||||
|
||||
|
||||
<li><a href="../../../templates/">Template API</a>
|
||||
|
||||
|
||||
<li><a href="../../../utils/">Utilities</a>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<li><a href="../../../../search/">Search</a>
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<div class="visible-md-block visible-lg-block">
|
||||
<h4>This Page</h4>
|
||||
<ul class="toc">
|
||||
|
||||
<li><a href="#example">Example</a></li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-sm-9 doc-styling">
|
||||
|
||||
|
||||
<h1><i class="glyphicon glyphicon-info-sign"></i> <code class="obj">alt</code></h1>
|
||||
|
||||
|
||||
|
||||
<ul class=page-meta>
|
||||
|
||||
<li>Property of <a href="../">SourceObject</a></li>
|
||||
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
<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"><!-- generated from alt </span><span class="cp">{{</span> <span class="nv">this.alt</span> <span class="cp">}}</span><span class="cm"> --></span>
|
||||
</pre></div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="comment-box">
|
||||
<h2>Comments</h2>
|
||||
|
||||
<div id="disqus_thread"></div>
|
||||
<script>
|
||||
var disqus_config = function() { this.page.identifier = "/docs/api/db/obj/alt"; this.page.url = "https://www.getlektor.com/docs/api/db/obj/alt/"; };
|
||||
(function() {
|
||||
var d = document, s = d.createElement('script');
|
||||
s.src = '//lektordocumentation.disqus.com/embed.js';
|
||||
s.setAttribute('data-timestamp', +new Date());
|
||||
(d.head || d.body).appendChild(s);
|
||||
})();
|
||||
</script>
|
||||
<noscript>
|
||||
Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript"
|
||||
rel="nofollow">comments powered by Disqus.</a>
|
||||
</noscript>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="bottomsummary">
|
||||
<div class="container">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<footer>
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-sm-4 icon-bar">
|
||||
<a href="https://github.com/lektor/lektor/" title="Lektor on GitHub"
|
||||
><i class="fa fa-github"></i></a>
|
||||
<a href="https://github.com/lektor/lektor/issues/" title="Report Issues for Lektor"
|
||||
><i class="fa fa-bug"></i></a>
|
||||
<a href="https://twitter.com/getlektor" title="Find Lektor on Twitter"
|
||||
><i class="fa fa-twitter"></i></a>
|
||||
<a href="https://gitter.im/lektor/lektor" title="Chat on Gitter"
|
||||
><i class="fa fa-comment"></i></a>
|
||||
<a href="https://github.com/lektor/lektor-website/tree/master/content/docs/api/db/obj/alt/contents.lr" title="View source for this page"><i class="fa fa-code"></i></a>
|
||||
</div>
|
||||
<div class="col-sm-8">
|
||||
<a href="../../../../../license/">License & Copyright</a> •
|
||||
<a href="../../../../../contact/">Contact</a> •
|
||||
Made with <i class="fa fa-fw fa-heart" title="Heart"><span hidden>Heart</span></i> in Carinthia
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
|
||||
<script type=text/javascript src="../../../../../static/app.js?h=bb1b933a" charset="utf-8"></script>
|
||||
<script>
|
||||
((window.gitter = {}).chat = {}).options = {
|
||||
room: 'lektor/lektor',
|
||||
activationElement: null
|
||||
};
|
||||
document.write('<button class="js-gitter-toggle-chat-button">Toggle Chat</button>');
|
||||
var dnt = navigator.doNotTrack || window.doNotTrack || navigator.msDoNotTrack;
|
||||
if (dnt != "1" && dnt != "yes") {
|
||||
window.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments)};ga.l=+new Date;
|
||||
ga('create', 'UA-70822533-1', 'auto');
|
||||
ga('set', 'anonymizeIp', true);
|
||||
ga('send', 'pageview');
|
||||
} else {
|
||||
console.debug("Respecting Do-Not-Track, not running analytics.");
|
||||
}
|
||||
</script>
|
||||
<script async src='https://www.google-analytics.com/analytics.js'></script>
|
||||
<script async defer id="github-bjs" src="https://buttons.github.io/buttons.js"></script>
|
||||
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script>
|
||||
<script src="https://sidecar.gitter.im/dist/sidecar.v1.js" async defer></script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,505 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<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/pygments.css">
|
||||
<link rel="shortcut icon" href="../../../../static/favicon.png?h=fa09bedd">
|
||||
<title>SourceObject | Documentation | Lektor Static Content Management System</title>
|
||||
</head>
|
||||
<body class="default">
|
||||
<nav class="navbar navbar-inverse navbar-static-top">
|
||||
<div class="container">
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle collapsed"
|
||||
data-toggle="collapse" data-target="#navbar"
|
||||
aria-expanded="false" aria-controls="navbar">
|
||||
<span class="sr-only">Toggle navigation</span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<a class="navbar-brand" href="../../../../">Lektor</a>
|
||||
</div>
|
||||
<div id="navbar" class="collapse navbar-collapse">
|
||||
<ul class="nav navbar-nav">
|
||||
|
||||
<li><a href="../../../../downloads/">Download</a></li>
|
||||
|
||||
<li class="active"><a href="../../../">Documentation</a></li>
|
||||
|
||||
<li><a href="../../../../showcase/">Showcase</a></li>
|
||||
|
||||
<li><a href="../../../../plugins/">Plugins</a></li>
|
||||
|
||||
<li><a href="../../../../community/">Community</a></li>
|
||||
|
||||
<li><a href="../../../../blog/">Blog</a></li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<div class="body-wrapper">
|
||||
|
||||
<div class="container">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-3">
|
||||
<ul class="tree-nav nocontent">
|
||||
<li><a href="../../../">Welcome</a></li>
|
||||
|
||||
|
||||
<li><a href="../../../what/">What is Lektor</a>
|
||||
|
||||
|
||||
<li><a href="../../../installation/">Installation</a>
|
||||
|
||||
|
||||
<li><a href="../../../quickstart/">Quickstart</a>
|
||||
|
||||
|
||||
<li><a href="../../../project/">Project</a>
|
||||
|
||||
|
||||
<li><a href="../../../content/">Content</a>
|
||||
|
||||
|
||||
<li><a href="../../../templates/">Templates</a>
|
||||
|
||||
|
||||
<li><a href="../../../themes/">Themes</a>
|
||||
|
||||
|
||||
<li><a href="../../../guides/">Guides</a>
|
||||
|
||||
|
||||
<li><a href="../../../deployment/">Deployment</a>
|
||||
|
||||
|
||||
<li><a href="../../../plugins/">Plugins</a>
|
||||
|
||||
|
||||
<li><a href="../../../models/">Data Modelling</a>
|
||||
|
||||
|
||||
<li><a href="../../../cli/">Command Line</a>
|
||||
|
||||
|
||||
<li><a href="../../">API</a>
|
||||
|
||||
<ul>
|
||||
<li><a href="../../build/">Build System</a>
|
||||
|
||||
|
||||
<li><a href="../../databags/">Databags</a>
|
||||
|
||||
|
||||
<li><a href="../">Database</a>
|
||||
|
||||
<ul>
|
||||
<li><a href="../types/">Builtin Field Types</a>
|
||||
|
||||
|
||||
<li><a href="../expression/">Expression</a>
|
||||
|
||||
|
||||
<li><a href="../f/">F</a>
|
||||
|
||||
|
||||
<li><a href="../get-alts/">get_alts()</a>
|
||||
|
||||
|
||||
<li><a href="../pad/">Pad</a>
|
||||
|
||||
|
||||
<li><a href="../query/">Query</a>
|
||||
|
||||
|
||||
<li><a href="../record/">Record</a>
|
||||
|
||||
|
||||
<li class="active"><a href="./">SourceObject</a>
|
||||
|
||||
<ul>
|
||||
<li><a href="alt/">alt</a>
|
||||
|
||||
|
||||
<li><a href="is-child-of/">is_child_of()</a>
|
||||
|
||||
|
||||
<li><a href="is-discoverable/">is_discoverable</a>
|
||||
|
||||
|
||||
<li><a href="is-hidden/">is_hidden</a>
|
||||
|
||||
|
||||
<li><a href="is-undiscoverable/">is_undiscoverable</a>
|
||||
|
||||
|
||||
<li><a href="is-visible/">is_visible</a>
|
||||
|
||||
|
||||
<li><a href="parent/">parent</a>
|
||||
|
||||
|
||||
<li><a href="path/">path</a>
|
||||
|
||||
|
||||
<li><a href="record/">record</a>
|
||||
|
||||
|
||||
<li><a href="source-filename/">source_filename</a>
|
||||
|
||||
|
||||
<li><a href="url-path/">url_path</a>
|
||||
|
||||
|
||||
<li><a href="url-to/">url_to()</a>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<li><a href="../system-fields/">System Fields</a>
|
||||
|
||||
|
||||
<li><a href="../type/">Type</a>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<li><a href="../../environment/">Environment</a>
|
||||
|
||||
|
||||
<li><a href="../../plugins/">Plugins</a>
|
||||
|
||||
|
||||
<li><a href="../../project/">Project</a>
|
||||
|
||||
|
||||
<li><a href="../../publisher/">Publisher</a>
|
||||
|
||||
|
||||
<li><a href="../../templates/">Template API</a>
|
||||
|
||||
|
||||
<li><a href="../../utils/">Utilities</a>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<li><a href="../../../search/">Search</a>
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<div class="visible-md-block visible-lg-block">
|
||||
<h4>This Page</h4>
|
||||
<ul class="toc">
|
||||
|
||||
<li><a href="#virtual-source-objects">Virtual Source Objects</a></li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-sm-9 doc-styling">
|
||||
|
||||
|
||||
<h1><i class="glyphicon glyphicon-leaf"></i> <code class="mod">lektor.db.</code><code class="obj">SourceObject</code></h1>
|
||||
|
||||
|
||||
|
||||
<ul class=page-meta>
|
||||
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
<p>Source objects is the common interface for all things that come out of the
|
||||
database. There are two types of source objects:</p>
|
||||
<ul>
|
||||
<li><a href="../record/" class="ref">Records</a> which are pages and attachments from the
|
||||
<code>contents/</code> folder.</li>
|
||||
<li><a href="../asset/" class="ref">Assets</a> which are files and directories from the
|
||||
<code>assets/</code> folder.</li>
|
||||
</ul>
|
||||
<p>Whatever object you have in hand that comes from the database, they will
|
||||
at least provide a minimal useful set of API methods and properties.</p>
|
||||
<p>Plugins can subclass source objects to come up with their own source
|
||||
objects if needed. In addition to that there is a special source object
|
||||
called the <code>VirtualSourceObject</code> which is more useful for plugin usage.</p>
|
||||
<h2 id="virtual-source-objects">Virtual Source Objects</h2><p>Most plugins will not have source objects that actually originate on the
|
||||
file system. This means that their "source" is entirely virtual. Because
|
||||
this is a very common situation there is a base class, the
|
||||
<code>VirtualSourceObject</code> which plugins can subclass. The constructor takes one
|
||||
argument which is the source record the virtual source lives below. Virtual
|
||||
sources are separated from the records they belong to with an at sign (<code>@</code>)
|
||||
in the path. The part after the at sign is called the “virtual path”.</p>
|
||||
<p>For instance in the below example the canonical path for the object would be
|
||||
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>
|
||||
<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>
|
||||
|
||||
<span class="nd">@property</span>
|
||||
<span class="k">def</span> <span class="nf">path</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
|
||||
<span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">record</span><span class="o">.</span><span class="n">path</span> <span class="o">+</span> <span class="s1">'@source'</span>
|
||||
|
||||
<span class="nd">@property</span>
|
||||
<span class="k">def</span> <span class="nf">source_content</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
|
||||
<span class="k">with</span> <span class="nb">open</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">record</span><span class="o">.</span><span class="n">source_filename</span><span class="p">)</span> <span class="k">as</span> <span class="n">f</span><span class="p">:</span>
|
||||
<span class="k">return</span> <span class="n">f</span><span class="o">.</span><span class="n">read</span><span class="p">()</span><span class="o">.</span><span class="n">decode</span><span class="p">(</span><span class="s1">'utf-8'</span><span class="p">)</span>
|
||||
|
||||
<span class="nd">@property</span>
|
||||
<span class="k">def</span> <span class="nf">url_path</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
|
||||
<span class="k">return</span> <span class="n">build_url</span><span class="p">([</span><span class="bp">self</span><span class="o">.</span><span class="n">record</span><span class="o">.</span><span class="n">url_path</span><span class="p">,</span> <span class="s1">'source.txt'</span><span class="p">])</span>
|
||||
</pre></div>
|
||||
<p>For more information see <a href="../../environment/add-build-program/" class="ref">add-build-program</a> as well as
|
||||
<a href="../../environment/virtualpathresolver/" class="ref">virtualpathresolver</a>.</p>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="child-pages nocontent">
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-6 child">
|
||||
<h4>
|
||||
<i class="glyphicon glyphicon-info-sign"></i>
|
||||
<a href="alt/">alt</a>
|
||||
</h4>
|
||||
|
||||
<p class="summary">The alt the source object corresponds to if available.</p>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-md-6 child">
|
||||
<h4>
|
||||
<i class="glyphicon glyphicon-cog"></i>
|
||||
<a href="is-child-of/">is_child_of()</a>
|
||||
</h4>
|
||||
|
||||
<p class="summary">Indicates if the record is a page or attachment.</p>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-6 child">
|
||||
<h4>
|
||||
<i class="glyphicon glyphicon-info-sign"></i>
|
||||
<a href="is-discoverable/">is_discoverable</a>
|
||||
</h4>
|
||||
|
||||
<p class="summary">Indicates that a record can be discovered via .children</p>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-md-6 child">
|
||||
<h4>
|
||||
<i class="glyphicon glyphicon-info-sign"></i>
|
||||
<a href="is-hidden/">is_hidden</a>
|
||||
</h4>
|
||||
|
||||
<p class="summary">Indicates if the object is hidden or not.</p>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-6 child">
|
||||
<h4>
|
||||
<i class="glyphicon glyphicon-info-sign"></i>
|
||||
<a href="is-undiscoverable/">is_undiscoverable</a>
|
||||
</h4>
|
||||
|
||||
<p class="summary">The inverse of is_discoverable.</p>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-md-6 child">
|
||||
<h4>
|
||||
<i class="glyphicon glyphicon-info-sign"></i>
|
||||
<a href="is-visible/">is_visible</a>
|
||||
</h4>
|
||||
|
||||
<p class="summary">Indicates if the object is visible or not.</p>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-6 child">
|
||||
<h4>
|
||||
<i class="glyphicon glyphicon-info-sign"></i>
|
||||
<a href="parent/">parent</a>
|
||||
</h4>
|
||||
|
||||
<p class="summary">The parent object for this source object.</p>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-md-6 child">
|
||||
<h4>
|
||||
<i class="glyphicon glyphicon-info-sign"></i>
|
||||
<a href="path/">path</a>
|
||||
</h4>
|
||||
|
||||
<p class="summary">The path in the source tree of the source object.</p>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-6 child">
|
||||
<h4>
|
||||
<i class="glyphicon glyphicon-info-sign"></i>
|
||||
<a href="record/">record</a>
|
||||
</h4>
|
||||
|
||||
<p class="summary">A reference to the associated base record.</p>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-md-6 child">
|
||||
<h4>
|
||||
<i class="glyphicon glyphicon-info-sign"></i>
|
||||
<a href="source-filename/">source_filename</a>
|
||||
</h4>
|
||||
|
||||
<p class="summary">Returns the filename of the source file.</p>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-6 child">
|
||||
<h4>
|
||||
<i class="glyphicon glyphicon-info-sign"></i>
|
||||
<a href="url-path/">url_path</a>
|
||||
</h4>
|
||||
|
||||
<p class="summary">The absolute URL path of the source object.</p>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-md-6 child">
|
||||
<h4>
|
||||
<i class="glyphicon glyphicon-cog"></i>
|
||||
<a href="url-to/">url_to()</a>
|
||||
</h4>
|
||||
|
||||
<p class="summary">Generates a URL relative to another path.</p>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="comment-box">
|
||||
<h2>Comments</h2>
|
||||
|
||||
<div id="disqus_thread"></div>
|
||||
<script>
|
||||
var disqus_config = function() { this.page.identifier = "/docs/api/db/obj"; this.page.url = "https://www.getlektor.com/docs/api/db/obj/"; };
|
||||
(function() {
|
||||
var d = document, s = d.createElement('script');
|
||||
s.src = '//lektordocumentation.disqus.com/embed.js';
|
||||
s.setAttribute('data-timestamp', +new Date());
|
||||
(d.head || d.body).appendChild(s);
|
||||
})();
|
||||
</script>
|
||||
<noscript>
|
||||
Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript"
|
||||
rel="nofollow">comments powered by Disqus.</a>
|
||||
</noscript>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="bottomsummary">
|
||||
<div class="container">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<footer>
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-sm-4 icon-bar">
|
||||
<a href="https://github.com/lektor/lektor/" title="Lektor on GitHub"
|
||||
><i class="fa fa-github"></i></a>
|
||||
<a href="https://github.com/lektor/lektor/issues/" title="Report Issues for Lektor"
|
||||
><i class="fa fa-bug"></i></a>
|
||||
<a href="https://twitter.com/getlektor" title="Find Lektor on Twitter"
|
||||
><i class="fa fa-twitter"></i></a>
|
||||
<a href="https://gitter.im/lektor/lektor" title="Chat on Gitter"
|
||||
><i class="fa fa-comment"></i></a>
|
||||
<a href="https://github.com/lektor/lektor-website/tree/master/content/docs/api/db/obj/contents.lr" title="View source for this page"><i class="fa fa-code"></i></a>
|
||||
</div>
|
||||
<div class="col-sm-8">
|
||||
<a href="../../../../license/">License & Copyright</a> •
|
||||
<a href="../../../../contact/">Contact</a> •
|
||||
Made with <i class="fa fa-fw fa-heart" title="Heart"><span hidden>Heart</span></i> in Carinthia
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
|
||||
<script type=text/javascript src="../../../../static/app.js?h=bb1b933a" charset="utf-8"></script>
|
||||
<script>
|
||||
((window.gitter = {}).chat = {}).options = {
|
||||
room: 'lektor/lektor',
|
||||
activationElement: null
|
||||
};
|
||||
document.write('<button class="js-gitter-toggle-chat-button">Toggle Chat</button>');
|
||||
var dnt = navigator.doNotTrack || window.doNotTrack || navigator.msDoNotTrack;
|
||||
if (dnt != "1" && dnt != "yes") {
|
||||
window.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments)};ga.l=+new Date;
|
||||
ga('create', 'UA-70822533-1', 'auto');
|
||||
ga('set', 'anonymizeIp', true);
|
||||
ga('send', 'pageview');
|
||||
} else {
|
||||
console.debug("Respecting Do-Not-Track, not running analytics.");
|
||||
}
|
||||
</script>
|
||||
<script async src='https://www.google-analytics.com/analytics.js'></script>
|
||||
<script async defer id="github-bjs" src="https://buttons.github.io/buttons.js"></script>
|
||||
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script>
|
||||
<script src="https://sidecar.gitter.im/dist/sidecar.v1.js" async defer></script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,325 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<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/pygments.css">
|
||||
<link rel="shortcut icon" href="../../../../../static/favicon.png?h=fa09bedd">
|
||||
<title>is_child_of | Documentation | Lektor Static Content Management System</title>
|
||||
</head>
|
||||
<body class="default">
|
||||
<nav class="navbar navbar-inverse navbar-static-top">
|
||||
<div class="container">
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle collapsed"
|
||||
data-toggle="collapse" data-target="#navbar"
|
||||
aria-expanded="false" aria-controls="navbar">
|
||||
<span class="sr-only">Toggle navigation</span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<a class="navbar-brand" href="../../../../../">Lektor</a>
|
||||
</div>
|
||||
<div id="navbar" class="collapse navbar-collapse">
|
||||
<ul class="nav navbar-nav">
|
||||
|
||||
<li><a href="../../../../../downloads/">Download</a></li>
|
||||
|
||||
<li class="active"><a href="../../../../">Documentation</a></li>
|
||||
|
||||
<li><a href="../../../../../showcase/">Showcase</a></li>
|
||||
|
||||
<li><a href="../../../../../plugins/">Plugins</a></li>
|
||||
|
||||
<li><a href="../../../../../community/">Community</a></li>
|
||||
|
||||
<li><a href="../../../../../blog/">Blog</a></li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<div class="body-wrapper">
|
||||
|
||||
<div class="container">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-3">
|
||||
<ul class="tree-nav nocontent">
|
||||
<li><a href="../../../../">Welcome</a></li>
|
||||
|
||||
|
||||
<li><a href="../../../../what/">What is Lektor</a>
|
||||
|
||||
|
||||
<li><a href="../../../../installation/">Installation</a>
|
||||
|
||||
|
||||
<li><a href="../../../../quickstart/">Quickstart</a>
|
||||
|
||||
|
||||
<li><a href="../../../../project/">Project</a>
|
||||
|
||||
|
||||
<li><a href="../../../../content/">Content</a>
|
||||
|
||||
|
||||
<li><a href="../../../../templates/">Templates</a>
|
||||
|
||||
|
||||
<li><a href="../../../../themes/">Themes</a>
|
||||
|
||||
|
||||
<li><a href="../../../../guides/">Guides</a>
|
||||
|
||||
|
||||
<li><a href="../../../../deployment/">Deployment</a>
|
||||
|
||||
|
||||
<li><a href="../../../../plugins/">Plugins</a>
|
||||
|
||||
|
||||
<li><a href="../../../../models/">Data Modelling</a>
|
||||
|
||||
|
||||
<li><a href="../../../../cli/">Command Line</a>
|
||||
|
||||
|
||||
<li><a href="../../../">API</a>
|
||||
|
||||
<ul>
|
||||
<li><a href="../../../build/">Build System</a>
|
||||
|
||||
|
||||
<li><a href="../../../databags/">Databags</a>
|
||||
|
||||
|
||||
<li><a href="../../">Database</a>
|
||||
|
||||
<ul>
|
||||
<li><a href="../../types/">Builtin Field Types</a>
|
||||
|
||||
|
||||
<li><a href="../../expression/">Expression</a>
|
||||
|
||||
|
||||
<li><a href="../../f/">F</a>
|
||||
|
||||
|
||||
<li><a href="../../get-alts/">get_alts()</a>
|
||||
|
||||
|
||||
<li><a href="../../pad/">Pad</a>
|
||||
|
||||
|
||||
<li><a href="../../query/">Query</a>
|
||||
|
||||
|
||||
<li><a href="../../record/">Record</a>
|
||||
|
||||
|
||||
<li><a href="../">SourceObject</a>
|
||||
|
||||
<ul>
|
||||
<li><a href="../alt/">alt</a>
|
||||
|
||||
|
||||
<li class="active"><a href="./">is_child_of()</a>
|
||||
|
||||
<ul></ul>
|
||||
|
||||
|
||||
<li><a href="../is-discoverable/">is_discoverable</a>
|
||||
|
||||
|
||||
<li><a href="../is-hidden/">is_hidden</a>
|
||||
|
||||
|
||||
<li><a href="../is-undiscoverable/">is_undiscoverable</a>
|
||||
|
||||
|
||||
<li><a href="../is-visible/">is_visible</a>
|
||||
|
||||
|
||||
<li><a href="../parent/">parent</a>
|
||||
|
||||
|
||||
<li><a href="../path/">path</a>
|
||||
|
||||
|
||||
<li><a href="../record/">record</a>
|
||||
|
||||
|
||||
<li><a href="../source-filename/">source_filename</a>
|
||||
|
||||
|
||||
<li><a href="../url-path/">url_path</a>
|
||||
|
||||
|
||||
<li><a href="../url-to/">url_to()</a>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<li><a href="../../system-fields/">System Fields</a>
|
||||
|
||||
|
||||
<li><a href="../../type/">Type</a>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<li><a href="../../../environment/">Environment</a>
|
||||
|
||||
|
||||
<li><a href="../../../plugins/">Plugins</a>
|
||||
|
||||
|
||||
<li><a href="../../../project/">Project</a>
|
||||
|
||||
|
||||
<li><a href="../../../publisher/">Publisher</a>
|
||||
|
||||
|
||||
<li><a href="../../../templates/">Template API</a>
|
||||
|
||||
|
||||
<li><a href="../../../utils/">Utilities</a>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<li><a href="../../../../search/">Search</a>
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<div class="visible-md-block visible-lg-block">
|
||||
<h4>This Page</h4>
|
||||
<ul class="toc">
|
||||
|
||||
<li><a href="#example">Example</a></li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-sm-9 doc-styling">
|
||||
|
||||
|
||||
<h1><i class="glyphicon glyphicon-cog"></i> <code class="obj">is_child_of</code> <span class="sig">(<code>path, strict=False</code>)</span></h1>
|
||||
|
||||
|
||||
|
||||
<ul class=page-meta>
|
||||
|
||||
<li>Method of <a href="../">SourceObject</a></li>
|
||||
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
<p>This method is a convenient way to check if a page is a child of another
|
||||
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"><</span><span class="nt">a</span> <span class="na">href</span><span class="o">=</span><span class="s">"</span><span class="cp">{{</span> <span class="s1">'/projects'</span><span class="o">|</span><span class="nf">url</span> <span class="cp">}}</span><span class="s">"</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">'/projects'</span><span class="o">)</span>
|
||||
<span class="cp">%}</span> <span class="na">class</span><span class="o">=</span><span class="s">"active"</span><span class="cp">{%</span> <span class="k">endif</span> <span class="cp">%}</span><span class="p">></span>Projects<span class="p"></</span><span class="nt">a</span><span class="p">></span>
|
||||
</pre></div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="comment-box">
|
||||
<h2>Comments</h2>
|
||||
|
||||
<div id="disqus_thread"></div>
|
||||
<script>
|
||||
var disqus_config = function() { this.page.identifier = "/docs/api/db/obj/is-child-of"; this.page.url = "https://www.getlektor.com/docs/api/db/obj/is-child-of/"; };
|
||||
(function() {
|
||||
var d = document, s = d.createElement('script');
|
||||
s.src = '//lektordocumentation.disqus.com/embed.js';
|
||||
s.setAttribute('data-timestamp', +new Date());
|
||||
(d.head || d.body).appendChild(s);
|
||||
})();
|
||||
</script>
|
||||
<noscript>
|
||||
Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript"
|
||||
rel="nofollow">comments powered by Disqus.</a>
|
||||
</noscript>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="bottomsummary">
|
||||
<div class="container">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<footer>
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-sm-4 icon-bar">
|
||||
<a href="https://github.com/lektor/lektor/" title="Lektor on GitHub"
|
||||
><i class="fa fa-github"></i></a>
|
||||
<a href="https://github.com/lektor/lektor/issues/" title="Report Issues for Lektor"
|
||||
><i class="fa fa-bug"></i></a>
|
||||
<a href="https://twitter.com/getlektor" title="Find Lektor on Twitter"
|
||||
><i class="fa fa-twitter"></i></a>
|
||||
<a href="https://gitter.im/lektor/lektor" title="Chat on Gitter"
|
||||
><i class="fa fa-comment"></i></a>
|
||||
<a href="https://github.com/lektor/lektor-website/tree/master/content/docs/api/db/obj/is-child-of/contents.lr" title="View source for this page"><i class="fa fa-code"></i></a>
|
||||
</div>
|
||||
<div class="col-sm-8">
|
||||
<a href="../../../../../license/">License & Copyright</a> •
|
||||
<a href="../../../../../contact/">Contact</a> •
|
||||
Made with <i class="fa fa-fw fa-heart" title="Heart"><span hidden>Heart</span></i> in Carinthia
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
|
||||
<script type=text/javascript src="../../../../../static/app.js?h=bb1b933a" charset="utf-8"></script>
|
||||
<script>
|
||||
((window.gitter = {}).chat = {}).options = {
|
||||
room: 'lektor/lektor',
|
||||
activationElement: null
|
||||
};
|
||||
document.write('<button class="js-gitter-toggle-chat-button">Toggle Chat</button>');
|
||||
var dnt = navigator.doNotTrack || window.doNotTrack || navigator.msDoNotTrack;
|
||||
if (dnt != "1" && dnt != "yes") {
|
||||
window.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments)};ga.l=+new Date;
|
||||
ga('create', 'UA-70822533-1', 'auto');
|
||||
ga('set', 'anonymizeIp', true);
|
||||
ga('send', 'pageview');
|
||||
} else {
|
||||
console.debug("Respecting Do-Not-Track, not running analytics.");
|
||||
}
|
||||
</script>
|
||||
<script async src='https://www.google-analytics.com/analytics.js'></script>
|
||||
<script async defer id="github-bjs" src="https://buttons.github.io/buttons.js"></script>
|
||||
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script>
|
||||
<script src="https://sidecar.gitter.im/dist/sidecar.v1.js" async defer></script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,335 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<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/pygments.css">
|
||||
<link rel="shortcut icon" href="../../../../../static/favicon.png?h=fa09bedd">
|
||||
<title>is_discoverable | Documentation | Lektor Static Content Management System</title>
|
||||
</head>
|
||||
<body class="default">
|
||||
<nav class="navbar navbar-inverse navbar-static-top">
|
||||
<div class="container">
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle collapsed"
|
||||
data-toggle="collapse" data-target="#navbar"
|
||||
aria-expanded="false" aria-controls="navbar">
|
||||
<span class="sr-only">Toggle navigation</span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<a class="navbar-brand" href="../../../../../">Lektor</a>
|
||||
</div>
|
||||
<div id="navbar" class="collapse navbar-collapse">
|
||||
<ul class="nav navbar-nav">
|
||||
|
||||
<li><a href="../../../../../downloads/">Download</a></li>
|
||||
|
||||
<li class="active"><a href="../../../../">Documentation</a></li>
|
||||
|
||||
<li><a href="../../../../../showcase/">Showcase</a></li>
|
||||
|
||||
<li><a href="../../../../../plugins/">Plugins</a></li>
|
||||
|
||||
<li><a href="../../../../../community/">Community</a></li>
|
||||
|
||||
<li><a href="../../../../../blog/">Blog</a></li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<div class="body-wrapper">
|
||||
|
||||
<div class="container">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-3">
|
||||
<ul class="tree-nav nocontent">
|
||||
<li><a href="../../../../">Welcome</a></li>
|
||||
|
||||
|
||||
<li><a href="../../../../what/">What is Lektor</a>
|
||||
|
||||
|
||||
<li><a href="../../../../installation/">Installation</a>
|
||||
|
||||
|
||||
<li><a href="../../../../quickstart/">Quickstart</a>
|
||||
|
||||
|
||||
<li><a href="../../../../project/">Project</a>
|
||||
|
||||
|
||||
<li><a href="../../../../content/">Content</a>
|
||||
|
||||
|
||||
<li><a href="../../../../templates/">Templates</a>
|
||||
|
||||
|
||||
<li><a href="../../../../themes/">Themes</a>
|
||||
|
||||
|
||||
<li><a href="../../../../guides/">Guides</a>
|
||||
|
||||
|
||||
<li><a href="../../../../deployment/">Deployment</a>
|
||||
|
||||
|
||||
<li><a href="../../../../plugins/">Plugins</a>
|
||||
|
||||
|
||||
<li><a href="../../../../models/">Data Modelling</a>
|
||||
|
||||
|
||||
<li><a href="../../../../cli/">Command Line</a>
|
||||
|
||||
|
||||
<li><a href="../../../">API</a>
|
||||
|
||||
<ul>
|
||||
<li><a href="../../../build/">Build System</a>
|
||||
|
||||
|
||||
<li><a href="../../../databags/">Databags</a>
|
||||
|
||||
|
||||
<li><a href="../../">Database</a>
|
||||
|
||||
<ul>
|
||||
<li><a href="../../types/">Builtin Field Types</a>
|
||||
|
||||
|
||||
<li><a href="../../expression/">Expression</a>
|
||||
|
||||
|
||||
<li><a href="../../f/">F</a>
|
||||
|
||||
|
||||
<li><a href="../../get-alts/">get_alts()</a>
|
||||
|
||||
|
||||
<li><a href="../../pad/">Pad</a>
|
||||
|
||||
|
||||
<li><a href="../../query/">Query</a>
|
||||
|
||||
|
||||
<li><a href="../../record/">Record</a>
|
||||
|
||||
|
||||
<li><a href="../">SourceObject</a>
|
||||
|
||||
<ul>
|
||||
<li><a href="../alt/">alt</a>
|
||||
|
||||
|
||||
<li><a href="../is-child-of/">is_child_of()</a>
|
||||
|
||||
|
||||
<li class="active"><a href="./">is_discoverable</a>
|
||||
|
||||
<ul></ul>
|
||||
|
||||
|
||||
<li><a href="../is-hidden/">is_hidden</a>
|
||||
|
||||
|
||||
<li><a href="../is-undiscoverable/">is_undiscoverable</a>
|
||||
|
||||
|
||||
<li><a href="../is-visible/">is_visible</a>
|
||||
|
||||
|
||||
<li><a href="../parent/">parent</a>
|
||||
|
||||
|
||||
<li><a href="../path/">path</a>
|
||||
|
||||
|
||||
<li><a href="../record/">record</a>
|
||||
|
||||
|
||||
<li><a href="../source-filename/">source_filename</a>
|
||||
|
||||
|
||||
<li><a href="../url-path/">url_path</a>
|
||||
|
||||
|
||||
<li><a href="../url-to/">url_to()</a>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<li><a href="../../system-fields/">System Fields</a>
|
||||
|
||||
|
||||
<li><a href="../../type/">Type</a>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<li><a href="../../../environment/">Environment</a>
|
||||
|
||||
|
||||
<li><a href="../../../plugins/">Plugins</a>
|
||||
|
||||
|
||||
<li><a href="../../../project/">Project</a>
|
||||
|
||||
|
||||
<li><a href="../../../publisher/">Publisher</a>
|
||||
|
||||
|
||||
<li><a href="../../../templates/">Template API</a>
|
||||
|
||||
|
||||
<li><a href="../../../utils/">Utilities</a>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<li><a href="../../../../search/">Search</a>
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<div class="visible-md-block visible-lg-block">
|
||||
<h4>This Page</h4>
|
||||
<ul class="toc">
|
||||
|
||||
<li><a href="#example">Example</a></li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-sm-9 doc-styling">
|
||||
|
||||
|
||||
<h1><i class="glyphicon glyphicon-info-sign"></i> <code class="obj">is_discoverable</code></h1>
|
||||
|
||||
|
||||
|
||||
<ul class=page-meta>
|
||||
|
||||
<li>Property of <a href="../">SourceObject</a></li>
|
||||
|
||||
|
||||
|
||||
<li>New in Lektor Version <em>2.0</em></li>
|
||||
|
||||
</ul>
|
||||
|
||||
<p>Records can be discoverable or non discoverable. This is controlled by the
|
||||
<code>_discoverable</code> system field which defaults to <code>yes</code>. This property can quickly
|
||||
check if a record is considered non-discoverable by Lektor or not. In
|
||||
particular a hidden record is also considered undiscoverable.</p>
|
||||
<p>Undiscoverable records can be queried and final pages will be built but they
|
||||
are exempt from queries of the record. This is useful for pages that should
|
||||
be built but not show up yet on overview pages. For instance this can be used
|
||||
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">'/downloads'</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"><</span><span class="nt">p</span><span class="p">><</span><span class="nt">a</span> <span class="na">href</span><span class="o">=</span><span class="s">"</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">"</span><span class="p">></span>Go to downloads<span class="p"></</span><span class="nt">a</span><span class="p">></span>
|
||||
<span class="cp">{%</span> <span class="k">endif</span> <span class="cp">%}</span>
|
||||
</pre></div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="comment-box">
|
||||
<h2>Comments</h2>
|
||||
|
||||
<div id="disqus_thread"></div>
|
||||
<script>
|
||||
var disqus_config = function() { this.page.identifier = "/docs/api/db/obj/is-discoverable"; this.page.url = "https://www.getlektor.com/docs/api/db/obj/is-discoverable/"; };
|
||||
(function() {
|
||||
var d = document, s = d.createElement('script');
|
||||
s.src = '//lektordocumentation.disqus.com/embed.js';
|
||||
s.setAttribute('data-timestamp', +new Date());
|
||||
(d.head || d.body).appendChild(s);
|
||||
})();
|
||||
</script>
|
||||
<noscript>
|
||||
Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript"
|
||||
rel="nofollow">comments powered by Disqus.</a>
|
||||
</noscript>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="bottomsummary">
|
||||
<div class="container">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<footer>
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-sm-4 icon-bar">
|
||||
<a href="https://github.com/lektor/lektor/" title="Lektor on GitHub"
|
||||
><i class="fa fa-github"></i></a>
|
||||
<a href="https://github.com/lektor/lektor/issues/" title="Report Issues for Lektor"
|
||||
><i class="fa fa-bug"></i></a>
|
||||
<a href="https://twitter.com/getlektor" title="Find Lektor on Twitter"
|
||||
><i class="fa fa-twitter"></i></a>
|
||||
<a href="https://gitter.im/lektor/lektor" title="Chat on Gitter"
|
||||
><i class="fa fa-comment"></i></a>
|
||||
<a href="https://github.com/lektor/lektor-website/tree/master/content/docs/api/db/obj/is-discoverable/contents.lr" title="View source for this page"><i class="fa fa-code"></i></a>
|
||||
</div>
|
||||
<div class="col-sm-8">
|
||||
<a href="../../../../../license/">License & Copyright</a> •
|
||||
<a href="../../../../../contact/">Contact</a> •
|
||||
Made with <i class="fa fa-fw fa-heart" title="Heart"><span hidden>Heart</span></i> in Carinthia
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
|
||||
<script type=text/javascript src="../../../../../static/app.js?h=bb1b933a" charset="utf-8"></script>
|
||||
<script>
|
||||
((window.gitter = {}).chat = {}).options = {
|
||||
room: 'lektor/lektor',
|
||||
activationElement: null
|
||||
};
|
||||
document.write('<button class="js-gitter-toggle-chat-button">Toggle Chat</button>');
|
||||
var dnt = navigator.doNotTrack || window.doNotTrack || navigator.msDoNotTrack;
|
||||
if (dnt != "1" && dnt != "yes") {
|
||||
window.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments)};ga.l=+new Date;
|
||||
ga('create', 'UA-70822533-1', 'auto');
|
||||
ga('set', 'anonymizeIp', true);
|
||||
ga('send', 'pageview');
|
||||
} else {
|
||||
console.debug("Respecting Do-Not-Track, not running analytics.");
|
||||
}
|
||||
</script>
|
||||
<script async src='https://www.google-analytics.com/analytics.js'></script>
|
||||
<script async defer id="github-bjs" src="https://buttons.github.io/buttons.js"></script>
|
||||
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script>
|
||||
<script src="https://sidecar.gitter.im/dist/sidecar.v1.js" async defer></script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,332 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<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/pygments.css">
|
||||
<link rel="shortcut icon" href="../../../../../static/favicon.png?h=fa09bedd">
|
||||
<title>is_hidden | Documentation | Lektor Static Content Management System</title>
|
||||
</head>
|
||||
<body class="default">
|
||||
<nav class="navbar navbar-inverse navbar-static-top">
|
||||
<div class="container">
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle collapsed"
|
||||
data-toggle="collapse" data-target="#navbar"
|
||||
aria-expanded="false" aria-controls="navbar">
|
||||
<span class="sr-only">Toggle navigation</span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<a class="navbar-brand" href="../../../../../">Lektor</a>
|
||||
</div>
|
||||
<div id="navbar" class="collapse navbar-collapse">
|
||||
<ul class="nav navbar-nav">
|
||||
|
||||
<li><a href="../../../../../downloads/">Download</a></li>
|
||||
|
||||
<li class="active"><a href="../../../../">Documentation</a></li>
|
||||
|
||||
<li><a href="../../../../../showcase/">Showcase</a></li>
|
||||
|
||||
<li><a href="../../../../../plugins/">Plugins</a></li>
|
||||
|
||||
<li><a href="../../../../../community/">Community</a></li>
|
||||
|
||||
<li><a href="../../../../../blog/">Blog</a></li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<div class="body-wrapper">
|
||||
|
||||
<div class="container">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-3">
|
||||
<ul class="tree-nav nocontent">
|
||||
<li><a href="../../../../">Welcome</a></li>
|
||||
|
||||
|
||||
<li><a href="../../../../what/">What is Lektor</a>
|
||||
|
||||
|
||||
<li><a href="../../../../installation/">Installation</a>
|
||||
|
||||
|
||||
<li><a href="../../../../quickstart/">Quickstart</a>
|
||||
|
||||
|
||||
<li><a href="../../../../project/">Project</a>
|
||||
|
||||
|
||||
<li><a href="../../../../content/">Content</a>
|
||||
|
||||
|
||||
<li><a href="../../../../templates/">Templates</a>
|
||||
|
||||
|
||||
<li><a href="../../../../themes/">Themes</a>
|
||||
|
||||
|
||||
<li><a href="../../../../guides/">Guides</a>
|
||||
|
||||
|
||||
<li><a href="../../../../deployment/">Deployment</a>
|
||||
|
||||
|
||||
<li><a href="../../../../plugins/">Plugins</a>
|
||||
|
||||
|
||||
<li><a href="../../../../models/">Data Modelling</a>
|
||||
|
||||
|
||||
<li><a href="../../../../cli/">Command Line</a>
|
||||
|
||||
|
||||
<li><a href="../../../">API</a>
|
||||
|
||||
<ul>
|
||||
<li><a href="../../../build/">Build System</a>
|
||||
|
||||
|
||||
<li><a href="../../../databags/">Databags</a>
|
||||
|
||||
|
||||
<li><a href="../../">Database</a>
|
||||
|
||||
<ul>
|
||||
<li><a href="../../types/">Builtin Field Types</a>
|
||||
|
||||
|
||||
<li><a href="../../expression/">Expression</a>
|
||||
|
||||
|
||||
<li><a href="../../f/">F</a>
|
||||
|
||||
|
||||
<li><a href="../../get-alts/">get_alts()</a>
|
||||
|
||||
|
||||
<li><a href="../../pad/">Pad</a>
|
||||
|
||||
|
||||
<li><a href="../../query/">Query</a>
|
||||
|
||||
|
||||
<li><a href="../../record/">Record</a>
|
||||
|
||||
|
||||
<li><a href="../">SourceObject</a>
|
||||
|
||||
<ul>
|
||||
<li><a href="../alt/">alt</a>
|
||||
|
||||
|
||||
<li><a href="../is-child-of/">is_child_of()</a>
|
||||
|
||||
|
||||
<li><a href="../is-discoverable/">is_discoverable</a>
|
||||
|
||||
|
||||
<li class="active"><a href="./">is_hidden</a>
|
||||
|
||||
<ul></ul>
|
||||
|
||||
|
||||
<li><a href="../is-undiscoverable/">is_undiscoverable</a>
|
||||
|
||||
|
||||
<li><a href="../is-visible/">is_visible</a>
|
||||
|
||||
|
||||
<li><a href="../parent/">parent</a>
|
||||
|
||||
|
||||
<li><a href="../path/">path</a>
|
||||
|
||||
|
||||
<li><a href="../record/">record</a>
|
||||
|
||||
|
||||
<li><a href="../source-filename/">source_filename</a>
|
||||
|
||||
|
||||
<li><a href="../url-path/">url_path</a>
|
||||
|
||||
|
||||
<li><a href="../url-to/">url_to()</a>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<li><a href="../../system-fields/">System Fields</a>
|
||||
|
||||
|
||||
<li><a href="../../type/">Type</a>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<li><a href="../../../environment/">Environment</a>
|
||||
|
||||
|
||||
<li><a href="../../../plugins/">Plugins</a>
|
||||
|
||||
|
||||
<li><a href="../../../project/">Project</a>
|
||||
|
||||
|
||||
<li><a href="../../../publisher/">Publisher</a>
|
||||
|
||||
|
||||
<li><a href="../../../templates/">Template API</a>
|
||||
|
||||
|
||||
<li><a href="../../../utils/">Utilities</a>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<li><a href="../../../../search/">Search</a>
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<div class="visible-md-block visible-lg-block">
|
||||
<h4>This Page</h4>
|
||||
<ul class="toc">
|
||||
|
||||
<li><a href="#example">Example</a></li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-sm-9 doc-styling">
|
||||
|
||||
|
||||
<h1><i class="glyphicon glyphicon-info-sign"></i> <code class="obj">is_hidden</code></h1>
|
||||
|
||||
|
||||
|
||||
<ul class=page-meta>
|
||||
|
||||
<li>Property of <a href="../">SourceObject</a></li>
|
||||
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
<p>Records can be hidden by setting the default <code>_hidden</code> system field to
|
||||
<code>yes</code>. However records also get hidden automatically if any of their parents
|
||||
are hidden. This property can quickly check if a record is considered hidden
|
||||
by Lektor or not.</p>
|
||||
<p>Hidden records can be queried but final pages will not be built. This is
|
||||
useful for pages that should only exist for assisting other pages. For
|
||||
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">'/downloads'</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"><</span><span class="nt">p</span><span class="p">></span>Downloads are currently unavailable
|
||||
<span class="cp">{%</span> <span class="k">endif</span> <span class="cp">%}</span>
|
||||
</pre></div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="comment-box">
|
||||
<h2>Comments</h2>
|
||||
|
||||
<div id="disqus_thread"></div>
|
||||
<script>
|
||||
var disqus_config = function() { this.page.identifier = "/docs/api/db/obj/is-hidden"; this.page.url = "https://www.getlektor.com/docs/api/db/obj/is-hidden/"; };
|
||||
(function() {
|
||||
var d = document, s = d.createElement('script');
|
||||
s.src = '//lektordocumentation.disqus.com/embed.js';
|
||||
s.setAttribute('data-timestamp', +new Date());
|
||||
(d.head || d.body).appendChild(s);
|
||||
})();
|
||||
</script>
|
||||
<noscript>
|
||||
Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript"
|
||||
rel="nofollow">comments powered by Disqus.</a>
|
||||
</noscript>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="bottomsummary">
|
||||
<div class="container">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<footer>
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-sm-4 icon-bar">
|
||||
<a href="https://github.com/lektor/lektor/" title="Lektor on GitHub"
|
||||
><i class="fa fa-github"></i></a>
|
||||
<a href="https://github.com/lektor/lektor/issues/" title="Report Issues for Lektor"
|
||||
><i class="fa fa-bug"></i></a>
|
||||
<a href="https://twitter.com/getlektor" title="Find Lektor on Twitter"
|
||||
><i class="fa fa-twitter"></i></a>
|
||||
<a href="https://gitter.im/lektor/lektor" title="Chat on Gitter"
|
||||
><i class="fa fa-comment"></i></a>
|
||||
<a href="https://github.com/lektor/lektor-website/tree/master/content/docs/api/db/obj/is-hidden/contents.lr" title="View source for this page"><i class="fa fa-code"></i></a>
|
||||
</div>
|
||||
<div class="col-sm-8">
|
||||
<a href="../../../../../license/">License & Copyright</a> •
|
||||
<a href="../../../../../contact/">Contact</a> •
|
||||
Made with <i class="fa fa-fw fa-heart" title="Heart"><span hidden>Heart</span></i> in Carinthia
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
|
||||
<script type=text/javascript src="../../../../../static/app.js?h=bb1b933a" charset="utf-8"></script>
|
||||
<script>
|
||||
((window.gitter = {}).chat = {}).options = {
|
||||
room: 'lektor/lektor',
|
||||
activationElement: null
|
||||
};
|
||||
document.write('<button class="js-gitter-toggle-chat-button">Toggle Chat</button>');
|
||||
var dnt = navigator.doNotTrack || window.doNotTrack || navigator.msDoNotTrack;
|
||||
if (dnt != "1" && dnt != "yes") {
|
||||
window.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments)};ga.l=+new Date;
|
||||
ga('create', 'UA-70822533-1', 'auto');
|
||||
ga('set', 'anonymizeIp', true);
|
||||
ga('send', 'pageview');
|
||||
} else {
|
||||
console.debug("Respecting Do-Not-Track, not running analytics.");
|
||||
}
|
||||
</script>
|
||||
<script async src='https://www.google-analytics.com/analytics.js'></script>
|
||||
<script async defer id="github-bjs" src="https://buttons.github.io/buttons.js"></script>
|
||||
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script>
|
||||
<script src="https://sidecar.gitter.im/dist/sidecar.v1.js" async defer></script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,313 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<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/pygments.css">
|
||||
<link rel="shortcut icon" href="../../../../../static/favicon.png?h=fa09bedd">
|
||||
<title>is_undiscoverable | Documentation | Lektor Static Content Management System</title>
|
||||
</head>
|
||||
<body class="default">
|
||||
<nav class="navbar navbar-inverse navbar-static-top">
|
||||
<div class="container">
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle collapsed"
|
||||
data-toggle="collapse" data-target="#navbar"
|
||||
aria-expanded="false" aria-controls="navbar">
|
||||
<span class="sr-only">Toggle navigation</span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<a class="navbar-brand" href="../../../../../">Lektor</a>
|
||||
</div>
|
||||
<div id="navbar" class="collapse navbar-collapse">
|
||||
<ul class="nav navbar-nav">
|
||||
|
||||
<li><a href="../../../../../downloads/">Download</a></li>
|
||||
|
||||
<li class="active"><a href="../../../../">Documentation</a></li>
|
||||
|
||||
<li><a href="../../../../../showcase/">Showcase</a></li>
|
||||
|
||||
<li><a href="../../../../../plugins/">Plugins</a></li>
|
||||
|
||||
<li><a href="../../../../../community/">Community</a></li>
|
||||
|
||||
<li><a href="../../../../../blog/">Blog</a></li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<div class="body-wrapper">
|
||||
|
||||
<div class="container">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-3">
|
||||
<ul class="tree-nav nocontent">
|
||||
<li><a href="../../../../">Welcome</a></li>
|
||||
|
||||
|
||||
<li><a href="../../../../what/">What is Lektor</a>
|
||||
|
||||
|
||||
<li><a href="../../../../installation/">Installation</a>
|
||||
|
||||
|
||||
<li><a href="../../../../quickstart/">Quickstart</a>
|
||||
|
||||
|
||||
<li><a href="../../../../project/">Project</a>
|
||||
|
||||
|
||||
<li><a href="../../../../content/">Content</a>
|
||||
|
||||
|
||||
<li><a href="../../../../templates/">Templates</a>
|
||||
|
||||
|
||||
<li><a href="../../../../themes/">Themes</a>
|
||||
|
||||
|
||||
<li><a href="../../../../guides/">Guides</a>
|
||||
|
||||
|
||||
<li><a href="../../../../deployment/">Deployment</a>
|
||||
|
||||
|
||||
<li><a href="../../../../plugins/">Plugins</a>
|
||||
|
||||
|
||||
<li><a href="../../../../models/">Data Modelling</a>
|
||||
|
||||
|
||||
<li><a href="../../../../cli/">Command Line</a>
|
||||
|
||||
|
||||
<li><a href="../../../">API</a>
|
||||
|
||||
<ul>
|
||||
<li><a href="../../../build/">Build System</a>
|
||||
|
||||
|
||||
<li><a href="../../../databags/">Databags</a>
|
||||
|
||||
|
||||
<li><a href="../../">Database</a>
|
||||
|
||||
<ul>
|
||||
<li><a href="../../types/">Builtin Field Types</a>
|
||||
|
||||
|
||||
<li><a href="../../expression/">Expression</a>
|
||||
|
||||
|
||||
<li><a href="../../f/">F</a>
|
||||
|
||||
|
||||
<li><a href="../../get-alts/">get_alts()</a>
|
||||
|
||||
|
||||
<li><a href="../../pad/">Pad</a>
|
||||
|
||||
|
||||
<li><a href="../../query/">Query</a>
|
||||
|
||||
|
||||
<li><a href="../../record/">Record</a>
|
||||
|
||||
|
||||
<li><a href="../">SourceObject</a>
|
||||
|
||||
<ul>
|
||||
<li><a href="../alt/">alt</a>
|
||||
|
||||
|
||||
<li><a href="../is-child-of/">is_child_of()</a>
|
||||
|
||||
|
||||
<li><a href="../is-discoverable/">is_discoverable</a>
|
||||
|
||||
|
||||
<li><a href="../is-hidden/">is_hidden</a>
|
||||
|
||||
|
||||
<li class="active"><a href="./">is_undiscoverable</a>
|
||||
|
||||
<ul></ul>
|
||||
|
||||
|
||||
<li><a href="../is-visible/">is_visible</a>
|
||||
|
||||
|
||||
<li><a href="../parent/">parent</a>
|
||||
|
||||
|
||||
<li><a href="../path/">path</a>
|
||||
|
||||
|
||||
<li><a href="../record/">record</a>
|
||||
|
||||
|
||||
<li><a href="../source-filename/">source_filename</a>
|
||||
|
||||
|
||||
<li><a href="../url-path/">url_path</a>
|
||||
|
||||
|
||||
<li><a href="../url-to/">url_to()</a>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<li><a href="../../system-fields/">System Fields</a>
|
||||
|
||||
|
||||
<li><a href="../../type/">Type</a>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<li><a href="../../../environment/">Environment</a>
|
||||
|
||||
|
||||
<li><a href="../../../plugins/">Plugins</a>
|
||||
|
||||
|
||||
<li><a href="../../../project/">Project</a>
|
||||
|
||||
|
||||
<li><a href="../../../publisher/">Publisher</a>
|
||||
|
||||
|
||||
<li><a href="../../../templates/">Template API</a>
|
||||
|
||||
|
||||
<li><a href="../../../utils/">Utilities</a>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<li><a href="../../../../search/">Search</a>
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-sm-9 doc-styling">
|
||||
|
||||
|
||||
<h1><i class="glyphicon glyphicon-info-sign"></i> <code class="obj">is_undiscoverable</code></h1>
|
||||
|
||||
|
||||
|
||||
<ul class=page-meta>
|
||||
|
||||
<li>Property of <a href="../">SourceObject</a></li>
|
||||
|
||||
|
||||
|
||||
<li>New in Lektor Version <em>2.0</em></li>
|
||||
|
||||
</ul>
|
||||
|
||||
<p>This works like <a href="../is-discoverable/" class="ref">is_discoverable</a> but the other
|
||||
way around. It just exists for consistency and to make checks look a little
|
||||
bit nicer in some places.</p>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="comment-box">
|
||||
<h2>Comments</h2>
|
||||
|
||||
<div id="disqus_thread"></div>
|
||||
<script>
|
||||
var disqus_config = function() { this.page.identifier = "/docs/api/db/obj/is-undiscoverable"; this.page.url = "https://www.getlektor.com/docs/api/db/obj/is-undiscoverable/"; };
|
||||
(function() {
|
||||
var d = document, s = d.createElement('script');
|
||||
s.src = '//lektordocumentation.disqus.com/embed.js';
|
||||
s.setAttribute('data-timestamp', +new Date());
|
||||
(d.head || d.body).appendChild(s);
|
||||
})();
|
||||
</script>
|
||||
<noscript>
|
||||
Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript"
|
||||
rel="nofollow">comments powered by Disqus.</a>
|
||||
</noscript>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="bottomsummary">
|
||||
<div class="container">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<footer>
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-sm-4 icon-bar">
|
||||
<a href="https://github.com/lektor/lektor/" title="Lektor on GitHub"
|
||||
><i class="fa fa-github"></i></a>
|
||||
<a href="https://github.com/lektor/lektor/issues/" title="Report Issues for Lektor"
|
||||
><i class="fa fa-bug"></i></a>
|
||||
<a href="https://twitter.com/getlektor" title="Find Lektor on Twitter"
|
||||
><i class="fa fa-twitter"></i></a>
|
||||
<a href="https://gitter.im/lektor/lektor" title="Chat on Gitter"
|
||||
><i class="fa fa-comment"></i></a>
|
||||
<a href="https://github.com/lektor/lektor-website/tree/master/content/docs/api/db/obj/is-undiscoverable/contents.lr" title="View source for this page"><i class="fa fa-code"></i></a>
|
||||
</div>
|
||||
<div class="col-sm-8">
|
||||
<a href="../../../../../license/">License & Copyright</a> •
|
||||
<a href="../../../../../contact/">Contact</a> •
|
||||
Made with <i class="fa fa-fw fa-heart" title="Heart"><span hidden>Heart</span></i> in Carinthia
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
|
||||
<script type=text/javascript src="../../../../../static/app.js?h=bb1b933a" charset="utf-8"></script>
|
||||
<script>
|
||||
((window.gitter = {}).chat = {}).options = {
|
||||
room: 'lektor/lektor',
|
||||
activationElement: null
|
||||
};
|
||||
document.write('<button class="js-gitter-toggle-chat-button">Toggle Chat</button>');
|
||||
var dnt = navigator.doNotTrack || window.doNotTrack || navigator.msDoNotTrack;
|
||||
if (dnt != "1" && dnt != "yes") {
|
||||
window.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments)};ga.l=+new Date;
|
||||
ga('create', 'UA-70822533-1', 'auto');
|
||||
ga('set', 'anonymizeIp', true);
|
||||
ga('send', 'pageview');
|
||||
} else {
|
||||
console.debug("Respecting Do-Not-Track, not running analytics.");
|
||||
}
|
||||
</script>
|
||||
<script async src='https://www.google-analytics.com/analytics.js'></script>
|
||||
<script async defer id="github-bjs" src="https://buttons.github.io/buttons.js"></script>
|
||||
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script>
|
||||
<script src="https://sidecar.gitter.im/dist/sidecar.v1.js" async defer></script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,323 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<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/pygments.css">
|
||||
<link rel="shortcut icon" href="../../../../../static/favicon.png?h=fa09bedd">
|
||||
<title>is_visible | Documentation | Lektor Static Content Management System</title>
|
||||
</head>
|
||||
<body class="default">
|
||||
<nav class="navbar navbar-inverse navbar-static-top">
|
||||
<div class="container">
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle collapsed"
|
||||
data-toggle="collapse" data-target="#navbar"
|
||||
aria-expanded="false" aria-controls="navbar">
|
||||
<span class="sr-only">Toggle navigation</span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<a class="navbar-brand" href="../../../../../">Lektor</a>
|
||||
</div>
|
||||
<div id="navbar" class="collapse navbar-collapse">
|
||||
<ul class="nav navbar-nav">
|
||||
|
||||
<li><a href="../../../../../downloads/">Download</a></li>
|
||||
|
||||
<li class="active"><a href="../../../../">Documentation</a></li>
|
||||
|
||||
<li><a href="../../../../../showcase/">Showcase</a></li>
|
||||
|
||||
<li><a href="../../../../../plugins/">Plugins</a></li>
|
||||
|
||||
<li><a href="../../../../../community/">Community</a></li>
|
||||
|
||||
<li><a href="../../../../../blog/">Blog</a></li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<div class="body-wrapper">
|
||||
|
||||
<div class="container">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-3">
|
||||
<ul class="tree-nav nocontent">
|
||||
<li><a href="../../../../">Welcome</a></li>
|
||||
|
||||
|
||||
<li><a href="../../../../what/">What is Lektor</a>
|
||||
|
||||
|
||||
<li><a href="../../../../installation/">Installation</a>
|
||||
|
||||
|
||||
<li><a href="../../../../quickstart/">Quickstart</a>
|
||||
|
||||
|
||||
<li><a href="../../../../project/">Project</a>
|
||||
|
||||
|
||||
<li><a href="../../../../content/">Content</a>
|
||||
|
||||
|
||||
<li><a href="../../../../templates/">Templates</a>
|
||||
|
||||
|
||||
<li><a href="../../../../themes/">Themes</a>
|
||||
|
||||
|
||||
<li><a href="../../../../guides/">Guides</a>
|
||||
|
||||
|
||||
<li><a href="../../../../deployment/">Deployment</a>
|
||||
|
||||
|
||||
<li><a href="../../../../plugins/">Plugins</a>
|
||||
|
||||
|
||||
<li><a href="../../../../models/">Data Modelling</a>
|
||||
|
||||
|
||||
<li><a href="../../../../cli/">Command Line</a>
|
||||
|
||||
|
||||
<li><a href="../../../">API</a>
|
||||
|
||||
<ul>
|
||||
<li><a href="../../../build/">Build System</a>
|
||||
|
||||
|
||||
<li><a href="../../../databags/">Databags</a>
|
||||
|
||||
|
||||
<li><a href="../../">Database</a>
|
||||
|
||||
<ul>
|
||||
<li><a href="../../types/">Builtin Field Types</a>
|
||||
|
||||
|
||||
<li><a href="../../expression/">Expression</a>
|
||||
|
||||
|
||||
<li><a href="../../f/">F</a>
|
||||
|
||||
|
||||
<li><a href="../../get-alts/">get_alts()</a>
|
||||
|
||||
|
||||
<li><a href="../../pad/">Pad</a>
|
||||
|
||||
|
||||
<li><a href="../../query/">Query</a>
|
||||
|
||||
|
||||
<li><a href="../../record/">Record</a>
|
||||
|
||||
|
||||
<li><a href="../">SourceObject</a>
|
||||
|
||||
<ul>
|
||||
<li><a href="../alt/">alt</a>
|
||||
|
||||
|
||||
<li><a href="../is-child-of/">is_child_of()</a>
|
||||
|
||||
|
||||
<li><a href="../is-discoverable/">is_discoverable</a>
|
||||
|
||||
|
||||
<li><a href="../is-hidden/">is_hidden</a>
|
||||
|
||||
|
||||
<li><a href="../is-undiscoverable/">is_undiscoverable</a>
|
||||
|
||||
|
||||
<li class="active"><a href="./">is_visible</a>
|
||||
|
||||
<ul></ul>
|
||||
|
||||
|
||||
<li><a href="../parent/">parent</a>
|
||||
|
||||
|
||||
<li><a href="../path/">path</a>
|
||||
|
||||
|
||||
<li><a href="../record/">record</a>
|
||||
|
||||
|
||||
<li><a href="../source-filename/">source_filename</a>
|
||||
|
||||
|
||||
<li><a href="../url-path/">url_path</a>
|
||||
|
||||
|
||||
<li><a href="../url-to/">url_to()</a>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<li><a href="../../system-fields/">System Fields</a>
|
||||
|
||||
|
||||
<li><a href="../../type/">Type</a>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<li><a href="../../../environment/">Environment</a>
|
||||
|
||||
|
||||
<li><a href="../../../plugins/">Plugins</a>
|
||||
|
||||
|
||||
<li><a href="../../../project/">Project</a>
|
||||
|
||||
|
||||
<li><a href="../../../publisher/">Publisher</a>
|
||||
|
||||
|
||||
<li><a href="../../../templates/">Template API</a>
|
||||
|
||||
|
||||
<li><a href="../../../utils/">Utilities</a>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<li><a href="../../../../search/">Search</a>
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<div class="visible-md-block visible-lg-block">
|
||||
<h4>This Page</h4>
|
||||
<ul class="toc">
|
||||
|
||||
<li><a href="#example">Example</a></li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-sm-9 doc-styling">
|
||||
|
||||
|
||||
<h1><i class="glyphicon glyphicon-info-sign"></i> <code class="obj">is_visible</code></h1>
|
||||
|
||||
|
||||
|
||||
<ul class=page-meta>
|
||||
|
||||
<li>Property of <a href="../">SourceObject</a></li>
|
||||
|
||||
|
||||
|
||||
</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">'/downloads'</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"><</span><span class="nt">p</span><span class="p">><</span><span class="nt">a</span> <span class="na">href</span><span class="o">=</span><span class="s">"</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">"</span><span class="p">></span>go to downloads<span class="p"></</span><span class="nt">a</span><span class="p">></span>
|
||||
<span class="cp">{%</span> <span class="k">endif</span> <span class="cp">%}</span>
|
||||
</pre></div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="comment-box">
|
||||
<h2>Comments</h2>
|
||||
|
||||
<div id="disqus_thread"></div>
|
||||
<script>
|
||||
var disqus_config = function() { this.page.identifier = "/docs/api/db/obj/is-visible"; this.page.url = "https://www.getlektor.com/docs/api/db/obj/is-visible/"; };
|
||||
(function() {
|
||||
var d = document, s = d.createElement('script');
|
||||
s.src = '//lektordocumentation.disqus.com/embed.js';
|
||||
s.setAttribute('data-timestamp', +new Date());
|
||||
(d.head || d.body).appendChild(s);
|
||||
})();
|
||||
</script>
|
||||
<noscript>
|
||||
Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript"
|
||||
rel="nofollow">comments powered by Disqus.</a>
|
||||
</noscript>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="bottomsummary">
|
||||
<div class="container">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<footer>
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-sm-4 icon-bar">
|
||||
<a href="https://github.com/lektor/lektor/" title="Lektor on GitHub"
|
||||
><i class="fa fa-github"></i></a>
|
||||
<a href="https://github.com/lektor/lektor/issues/" title="Report Issues for Lektor"
|
||||
><i class="fa fa-bug"></i></a>
|
||||
<a href="https://twitter.com/getlektor" title="Find Lektor on Twitter"
|
||||
><i class="fa fa-twitter"></i></a>
|
||||
<a href="https://gitter.im/lektor/lektor" title="Chat on Gitter"
|
||||
><i class="fa fa-comment"></i></a>
|
||||
<a href="https://github.com/lektor/lektor-website/tree/master/content/docs/api/db/obj/is-visible/contents.lr" title="View source for this page"><i class="fa fa-code"></i></a>
|
||||
</div>
|
||||
<div class="col-sm-8">
|
||||
<a href="../../../../../license/">License & Copyright</a> •
|
||||
<a href="../../../../../contact/">Contact</a> •
|
||||
Made with <i class="fa fa-fw fa-heart" title="Heart"><span hidden>Heart</span></i> in Carinthia
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
|
||||
<script type=text/javascript src="../../../../../static/app.js?h=bb1b933a" charset="utf-8"></script>
|
||||
<script>
|
||||
((window.gitter = {}).chat = {}).options = {
|
||||
room: 'lektor/lektor',
|
||||
activationElement: null
|
||||
};
|
||||
document.write('<button class="js-gitter-toggle-chat-button">Toggle Chat</button>');
|
||||
var dnt = navigator.doNotTrack || window.doNotTrack || navigator.msDoNotTrack;
|
||||
if (dnt != "1" && dnt != "yes") {
|
||||
window.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments)};ga.l=+new Date;
|
||||
ga('create', 'UA-70822533-1', 'auto');
|
||||
ga('set', 'anonymizeIp', true);
|
||||
ga('send', 'pageview');
|
||||
} else {
|
||||
console.debug("Respecting Do-Not-Track, not running analytics.");
|
||||
}
|
||||
</script>
|
||||
<script async src='https://www.google-analytics.com/analytics.js'></script>
|
||||
<script async defer id="github-bjs" src="https://buttons.github.io/buttons.js"></script>
|
||||
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script>
|
||||
<script src="https://sidecar.gitter.im/dist/sidecar.v1.js" async defer></script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,323 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<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/pygments.css">
|
||||
<link rel="shortcut icon" href="../../../../../static/favicon.png?h=fa09bedd">
|
||||
<title>parent | Documentation | Lektor Static Content Management System</title>
|
||||
</head>
|
||||
<body class="default">
|
||||
<nav class="navbar navbar-inverse navbar-static-top">
|
||||
<div class="container">
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle collapsed"
|
||||
data-toggle="collapse" data-target="#navbar"
|
||||
aria-expanded="false" aria-controls="navbar">
|
||||
<span class="sr-only">Toggle navigation</span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<a class="navbar-brand" href="../../../../../">Lektor</a>
|
||||
</div>
|
||||
<div id="navbar" class="collapse navbar-collapse">
|
||||
<ul class="nav navbar-nav">
|
||||
|
||||
<li><a href="../../../../../downloads/">Download</a></li>
|
||||
|
||||
<li class="active"><a href="../../../../">Documentation</a></li>
|
||||
|
||||
<li><a href="../../../../../showcase/">Showcase</a></li>
|
||||
|
||||
<li><a href="../../../../../plugins/">Plugins</a></li>
|
||||
|
||||
<li><a href="../../../../../community/">Community</a></li>
|
||||
|
||||
<li><a href="../../../../../blog/">Blog</a></li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<div class="body-wrapper">
|
||||
|
||||
<div class="container">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-3">
|
||||
<ul class="tree-nav nocontent">
|
||||
<li><a href="../../../../">Welcome</a></li>
|
||||
|
||||
|
||||
<li><a href="../../../../what/">What is Lektor</a>
|
||||
|
||||
|
||||
<li><a href="../../../../installation/">Installation</a>
|
||||
|
||||
|
||||
<li><a href="../../../../quickstart/">Quickstart</a>
|
||||
|
||||
|
||||
<li><a href="../../../../project/">Project</a>
|
||||
|
||||
|
||||
<li><a href="../../../../content/">Content</a>
|
||||
|
||||
|
||||
<li><a href="../../../../templates/">Templates</a>
|
||||
|
||||
|
||||
<li><a href="../../../../themes/">Themes</a>
|
||||
|
||||
|
||||
<li><a href="../../../../guides/">Guides</a>
|
||||
|
||||
|
||||
<li><a href="../../../../deployment/">Deployment</a>
|
||||
|
||||
|
||||
<li><a href="../../../../plugins/">Plugins</a>
|
||||
|
||||
|
||||
<li><a href="../../../../models/">Data Modelling</a>
|
||||
|
||||
|
||||
<li><a href="../../../../cli/">Command Line</a>
|
||||
|
||||
|
||||
<li><a href="../../../">API</a>
|
||||
|
||||
<ul>
|
||||
<li><a href="../../../build/">Build System</a>
|
||||
|
||||
|
||||
<li><a href="../../../databags/">Databags</a>
|
||||
|
||||
|
||||
<li><a href="../../">Database</a>
|
||||
|
||||
<ul>
|
||||
<li><a href="../../types/">Builtin Field Types</a>
|
||||
|
||||
|
||||
<li><a href="../../expression/">Expression</a>
|
||||
|
||||
|
||||
<li><a href="../../f/">F</a>
|
||||
|
||||
|
||||
<li><a href="../../get-alts/">get_alts()</a>
|
||||
|
||||
|
||||
<li><a href="../../pad/">Pad</a>
|
||||
|
||||
|
||||
<li><a href="../../query/">Query</a>
|
||||
|
||||
|
||||
<li><a href="../../record/">Record</a>
|
||||
|
||||
|
||||
<li><a href="../">SourceObject</a>
|
||||
|
||||
<ul>
|
||||
<li><a href="../alt/">alt</a>
|
||||
|
||||
|
||||
<li><a href="../is-child-of/">is_child_of()</a>
|
||||
|
||||
|
||||
<li><a href="../is-discoverable/">is_discoverable</a>
|
||||
|
||||
|
||||
<li><a href="../is-hidden/">is_hidden</a>
|
||||
|
||||
|
||||
<li><a href="../is-undiscoverable/">is_undiscoverable</a>
|
||||
|
||||
|
||||
<li><a href="../is-visible/">is_visible</a>
|
||||
|
||||
|
||||
<li class="active"><a href="./">parent</a>
|
||||
|
||||
<ul></ul>
|
||||
|
||||
|
||||
<li><a href="../path/">path</a>
|
||||
|
||||
|
||||
<li><a href="../record/">record</a>
|
||||
|
||||
|
||||
<li><a href="../source-filename/">source_filename</a>
|
||||
|
||||
|
||||
<li><a href="../url-path/">url_path</a>
|
||||
|
||||
|
||||
<li><a href="../url-to/">url_to()</a>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<li><a href="../../system-fields/">System Fields</a>
|
||||
|
||||
|
||||
<li><a href="../../type/">Type</a>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<li><a href="../../../environment/">Environment</a>
|
||||
|
||||
|
||||
<li><a href="../../../plugins/">Plugins</a>
|
||||
|
||||
|
||||
<li><a href="../../../project/">Project</a>
|
||||
|
||||
|
||||
<li><a href="../../../publisher/">Publisher</a>
|
||||
|
||||
|
||||
<li><a href="../../../templates/">Template API</a>
|
||||
|
||||
|
||||
<li><a href="../../../utils/">Utilities</a>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<li><a href="../../../../search/">Search</a>
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<div class="visible-md-block visible-lg-block">
|
||||
<h4>This Page</h4>
|
||||
<ul class="toc">
|
||||
|
||||
<li><a href="#example">Example</a></li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-sm-9 doc-styling">
|
||||
|
||||
|
||||
<h1><i class="glyphicon glyphicon-info-sign"></i> <code class="obj">parent</code></h1>
|
||||
|
||||
|
||||
|
||||
<ul class=page-meta>
|
||||
|
||||
<li>Property of <a href="../">SourceObject</a></li>
|
||||
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
<p>For most source objects it's possible to discover their parents through
|
||||
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"><</span><span class="nt">p</span><span class="p">></span>My parent is: <span class="cp">{{</span> <span class="nv">this.parent.path</span> <span class="cp">}}</span>
|
||||
</pre></div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="comment-box">
|
||||
<h2>Comments</h2>
|
||||
|
||||
<div id="disqus_thread"></div>
|
||||
<script>
|
||||
var disqus_config = function() { this.page.identifier = "/docs/api/db/obj/parent"; this.page.url = "https://www.getlektor.com/docs/api/db/obj/parent/"; };
|
||||
(function() {
|
||||
var d = document, s = d.createElement('script');
|
||||
s.src = '//lektordocumentation.disqus.com/embed.js';
|
||||
s.setAttribute('data-timestamp', +new Date());
|
||||
(d.head || d.body).appendChild(s);
|
||||
})();
|
||||
</script>
|
||||
<noscript>
|
||||
Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript"
|
||||
rel="nofollow">comments powered by Disqus.</a>
|
||||
</noscript>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="bottomsummary">
|
||||
<div class="container">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<footer>
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-sm-4 icon-bar">
|
||||
<a href="https://github.com/lektor/lektor/" title="Lektor on GitHub"
|
||||
><i class="fa fa-github"></i></a>
|
||||
<a href="https://github.com/lektor/lektor/issues/" title="Report Issues for Lektor"
|
||||
><i class="fa fa-bug"></i></a>
|
||||
<a href="https://twitter.com/getlektor" title="Find Lektor on Twitter"
|
||||
><i class="fa fa-twitter"></i></a>
|
||||
<a href="https://gitter.im/lektor/lektor" title="Chat on Gitter"
|
||||
><i class="fa fa-comment"></i></a>
|
||||
<a href="https://github.com/lektor/lektor-website/tree/master/content/docs/api/db/obj/parent/contents.lr" title="View source for this page"><i class="fa fa-code"></i></a>
|
||||
</div>
|
||||
<div class="col-sm-8">
|
||||
<a href="../../../../../license/">License & Copyright</a> •
|
||||
<a href="../../../../../contact/">Contact</a> •
|
||||
Made with <i class="fa fa-fw fa-heart" title="Heart"><span hidden>Heart</span></i> in Carinthia
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
|
||||
<script type=text/javascript src="../../../../../static/app.js?h=bb1b933a" charset="utf-8"></script>
|
||||
<script>
|
||||
((window.gitter = {}).chat = {}).options = {
|
||||
room: 'lektor/lektor',
|
||||
activationElement: null
|
||||
};
|
||||
document.write('<button class="js-gitter-toggle-chat-button">Toggle Chat</button>');
|
||||
var dnt = navigator.doNotTrack || window.doNotTrack || navigator.msDoNotTrack;
|
||||
if (dnt != "1" && dnt != "yes") {
|
||||
window.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments)};ga.l=+new Date;
|
||||
ga('create', 'UA-70822533-1', 'auto');
|
||||
ga('set', 'anonymizeIp', true);
|
||||
ga('send', 'pageview');
|
||||
} else {
|
||||
console.debug("Respecting Do-Not-Track, not running analytics.");
|
||||
}
|
||||
</script>
|
||||
<script async src='https://www.google-analytics.com/analytics.js'></script>
|
||||
<script async defer id="github-bjs" src="https://buttons.github.io/buttons.js"></script>
|
||||
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script>
|
||||
<script src="https://sidecar.gitter.im/dist/sidecar.v1.js" async defer></script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,312 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<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/pygments.css">
|
||||
<link rel="shortcut icon" href="../../../../../static/favicon.png?h=fa09bedd">
|
||||
<title>path | Documentation | Lektor Static Content Management System</title>
|
||||
</head>
|
||||
<body class="default">
|
||||
<nav class="navbar navbar-inverse navbar-static-top">
|
||||
<div class="container">
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle collapsed"
|
||||
data-toggle="collapse" data-target="#navbar"
|
||||
aria-expanded="false" aria-controls="navbar">
|
||||
<span class="sr-only">Toggle navigation</span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<a class="navbar-brand" href="../../../../../">Lektor</a>
|
||||
</div>
|
||||
<div id="navbar" class="collapse navbar-collapse">
|
||||
<ul class="nav navbar-nav">
|
||||
|
||||
<li><a href="../../../../../downloads/">Download</a></li>
|
||||
|
||||
<li class="active"><a href="../../../../">Documentation</a></li>
|
||||
|
||||
<li><a href="../../../../../showcase/">Showcase</a></li>
|
||||
|
||||
<li><a href="../../../../../plugins/">Plugins</a></li>
|
||||
|
||||
<li><a href="../../../../../community/">Community</a></li>
|
||||
|
||||
<li><a href="../../../../../blog/">Blog</a></li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<div class="body-wrapper">
|
||||
|
||||
<div class="container">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-3">
|
||||
<ul class="tree-nav nocontent">
|
||||
<li><a href="../../../../">Welcome</a></li>
|
||||
|
||||
|
||||
<li><a href="../../../../what/">What is Lektor</a>
|
||||
|
||||
|
||||
<li><a href="../../../../installation/">Installation</a>
|
||||
|
||||
|
||||
<li><a href="../../../../quickstart/">Quickstart</a>
|
||||
|
||||
|
||||
<li><a href="../../../../project/">Project</a>
|
||||
|
||||
|
||||
<li><a href="../../../../content/">Content</a>
|
||||
|
||||
|
||||
<li><a href="../../../../templates/">Templates</a>
|
||||
|
||||
|
||||
<li><a href="../../../../themes/">Themes</a>
|
||||
|
||||
|
||||
<li><a href="../../../../guides/">Guides</a>
|
||||
|
||||
|
||||
<li><a href="../../../../deployment/">Deployment</a>
|
||||
|
||||
|
||||
<li><a href="../../../../plugins/">Plugins</a>
|
||||
|
||||
|
||||
<li><a href="../../../../models/">Data Modelling</a>
|
||||
|
||||
|
||||
<li><a href="../../../../cli/">Command Line</a>
|
||||
|
||||
|
||||
<li><a href="../../../">API</a>
|
||||
|
||||
<ul>
|
||||
<li><a href="../../../build/">Build System</a>
|
||||
|
||||
|
||||
<li><a href="../../../databags/">Databags</a>
|
||||
|
||||
|
||||
<li><a href="../../">Database</a>
|
||||
|
||||
<ul>
|
||||
<li><a href="../../types/">Builtin Field Types</a>
|
||||
|
||||
|
||||
<li><a href="../../expression/">Expression</a>
|
||||
|
||||
|
||||
<li><a href="../../f/">F</a>
|
||||
|
||||
|
||||
<li><a href="../../get-alts/">get_alts()</a>
|
||||
|
||||
|
||||
<li><a href="../../pad/">Pad</a>
|
||||
|
||||
|
||||
<li><a href="../../query/">Query</a>
|
||||
|
||||
|
||||
<li><a href="../../record/">Record</a>
|
||||
|
||||
|
||||
<li><a href="../">SourceObject</a>
|
||||
|
||||
<ul>
|
||||
<li><a href="../alt/">alt</a>
|
||||
|
||||
|
||||
<li><a href="../is-child-of/">is_child_of()</a>
|
||||
|
||||
|
||||
<li><a href="../is-discoverable/">is_discoverable</a>
|
||||
|
||||
|
||||
<li><a href="../is-hidden/">is_hidden</a>
|
||||
|
||||
|
||||
<li><a href="../is-undiscoverable/">is_undiscoverable</a>
|
||||
|
||||
|
||||
<li><a href="../is-visible/">is_visible</a>
|
||||
|
||||
|
||||
<li><a href="../parent/">parent</a>
|
||||
|
||||
|
||||
<li class="active"><a href="./">path</a>
|
||||
|
||||
<ul></ul>
|
||||
|
||||
|
||||
<li><a href="../record/">record</a>
|
||||
|
||||
|
||||
<li><a href="../source-filename/">source_filename</a>
|
||||
|
||||
|
||||
<li><a href="../url-path/">url_path</a>
|
||||
|
||||
|
||||
<li><a href="../url-to/">url_to()</a>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<li><a href="../../system-fields/">System Fields</a>
|
||||
|
||||
|
||||
<li><a href="../../type/">Type</a>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<li><a href="../../../environment/">Environment</a>
|
||||
|
||||
|
||||
<li><a href="../../../plugins/">Plugins</a>
|
||||
|
||||
|
||||
<li><a href="../../../project/">Project</a>
|
||||
|
||||
|
||||
<li><a href="../../../publisher/">Publisher</a>
|
||||
|
||||
|
||||
<li><a href="../../../templates/">Template API</a>
|
||||
|
||||
|
||||
<li><a href="../../../utils/">Utilities</a>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<li><a href="../../../../search/">Search</a>
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-sm-9 doc-styling">
|
||||
|
||||
|
||||
<h1><i class="glyphicon glyphicon-info-sign"></i> <code class="obj">path</code></h1>
|
||||
|
||||
|
||||
|
||||
<ul class=page-meta>
|
||||
|
||||
<li>Property of <a href="../">SourceObject</a></li>
|
||||
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
<p>For source objects that have a file system representation this resolves to
|
||||
the path that can be used to uniquely query the object via the database.</p>
|
||||
<p>For some source objects (like assets or source objects from plugins) the path
|
||||
will be <code>None</code> as the object cannot be queried (it's virtual).</p>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="comment-box">
|
||||
<h2>Comments</h2>
|
||||
|
||||
<div id="disqus_thread"></div>
|
||||
<script>
|
||||
var disqus_config = function() { this.page.identifier = "/docs/api/db/obj/path"; this.page.url = "https://www.getlektor.com/docs/api/db/obj/path/"; };
|
||||
(function() {
|
||||
var d = document, s = d.createElement('script');
|
||||
s.src = '//lektordocumentation.disqus.com/embed.js';
|
||||
s.setAttribute('data-timestamp', +new Date());
|
||||
(d.head || d.body).appendChild(s);
|
||||
})();
|
||||
</script>
|
||||
<noscript>
|
||||
Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript"
|
||||
rel="nofollow">comments powered by Disqus.</a>
|
||||
</noscript>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="bottomsummary">
|
||||
<div class="container">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<footer>
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-sm-4 icon-bar">
|
||||
<a href="https://github.com/lektor/lektor/" title="Lektor on GitHub"
|
||||
><i class="fa fa-github"></i></a>
|
||||
<a href="https://github.com/lektor/lektor/issues/" title="Report Issues for Lektor"
|
||||
><i class="fa fa-bug"></i></a>
|
||||
<a href="https://twitter.com/getlektor" title="Find Lektor on Twitter"
|
||||
><i class="fa fa-twitter"></i></a>
|
||||
<a href="https://gitter.im/lektor/lektor" title="Chat on Gitter"
|
||||
><i class="fa fa-comment"></i></a>
|
||||
<a href="https://github.com/lektor/lektor-website/tree/master/content/docs/api/db/obj/path/contents.lr" title="View source for this page"><i class="fa fa-code"></i></a>
|
||||
</div>
|
||||
<div class="col-sm-8">
|
||||
<a href="../../../../../license/">License & Copyright</a> •
|
||||
<a href="../../../../../contact/">Contact</a> •
|
||||
Made with <i class="fa fa-fw fa-heart" title="Heart"><span hidden>Heart</span></i> in Carinthia
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
|
||||
<script type=text/javascript src="../../../../../static/app.js?h=bb1b933a" charset="utf-8"></script>
|
||||
<script>
|
||||
((window.gitter = {}).chat = {}).options = {
|
||||
room: 'lektor/lektor',
|
||||
activationElement: null
|
||||
};
|
||||
document.write('<button class="js-gitter-toggle-chat-button">Toggle Chat</button>');
|
||||
var dnt = navigator.doNotTrack || window.doNotTrack || navigator.msDoNotTrack;
|
||||
if (dnt != "1" && dnt != "yes") {
|
||||
window.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments)};ga.l=+new Date;
|
||||
ga('create', 'UA-70822533-1', 'auto');
|
||||
ga('set', 'anonymizeIp', true);
|
||||
ga('send', 'pageview');
|
||||
} else {
|
||||
console.debug("Respecting Do-Not-Track, not running analytics.");
|
||||
}
|
||||
</script>
|
||||
<script async src='https://www.google-analytics.com/analytics.js'></script>
|
||||
<script async defer id="github-bjs" src="https://buttons.github.io/buttons.js"></script>
|
||||
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script>
|
||||
<script src="https://sidecar.gitter.im/dist/sidecar.v1.js" async defer></script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,332 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<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/pygments.css">
|
||||
<link rel="shortcut icon" href="../../../../../static/favicon.png?h=fa09bedd">
|
||||
<title>record | Documentation | Lektor Static Content Management System</title>
|
||||
</head>
|
||||
<body class="default">
|
||||
<nav class="navbar navbar-inverse navbar-static-top">
|
||||
<div class="container">
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle collapsed"
|
||||
data-toggle="collapse" data-target="#navbar"
|
||||
aria-expanded="false" aria-controls="navbar">
|
||||
<span class="sr-only">Toggle navigation</span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<a class="navbar-brand" href="../../../../../">Lektor</a>
|
||||
</div>
|
||||
<div id="navbar" class="collapse navbar-collapse">
|
||||
<ul class="nav navbar-nav">
|
||||
|
||||
<li><a href="../../../../../downloads/">Download</a></li>
|
||||
|
||||
<li class="active"><a href="../../../../">Documentation</a></li>
|
||||
|
||||
<li><a href="../../../../../showcase/">Showcase</a></li>
|
||||
|
||||
<li><a href="../../../../../plugins/">Plugins</a></li>
|
||||
|
||||
<li><a href="../../../../../community/">Community</a></li>
|
||||
|
||||
<li><a href="../../../../../blog/">Blog</a></li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<div class="body-wrapper">
|
||||
|
||||
<div class="container">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-3">
|
||||
<ul class="tree-nav nocontent">
|
||||
<li><a href="../../../../">Welcome</a></li>
|
||||
|
||||
|
||||
<li><a href="../../../../what/">What is Lektor</a>
|
||||
|
||||
|
||||
<li><a href="../../../../installation/">Installation</a>
|
||||
|
||||
|
||||
<li><a href="../../../../quickstart/">Quickstart</a>
|
||||
|
||||
|
||||
<li><a href="../../../../project/">Project</a>
|
||||
|
||||
|
||||
<li><a href="../../../../content/">Content</a>
|
||||
|
||||
|
||||
<li><a href="../../../../templates/">Templates</a>
|
||||
|
||||
|
||||
<li><a href="../../../../themes/">Themes</a>
|
||||
|
||||
|
||||
<li><a href="../../../../guides/">Guides</a>
|
||||
|
||||
|
||||
<li><a href="../../../../deployment/">Deployment</a>
|
||||
|
||||
|
||||
<li><a href="../../../../plugins/">Plugins</a>
|
||||
|
||||
|
||||
<li><a href="../../../../models/">Data Modelling</a>
|
||||
|
||||
|
||||
<li><a href="../../../../cli/">Command Line</a>
|
||||
|
||||
|
||||
<li><a href="../../../">API</a>
|
||||
|
||||
<ul>
|
||||
<li><a href="../../../build/">Build System</a>
|
||||
|
||||
|
||||
<li><a href="../../../databags/">Databags</a>
|
||||
|
||||
|
||||
<li><a href="../../">Database</a>
|
||||
|
||||
<ul>
|
||||
<li><a href="../../types/">Builtin Field Types</a>
|
||||
|
||||
|
||||
<li><a href="../../expression/">Expression</a>
|
||||
|
||||
|
||||
<li><a href="../../f/">F</a>
|
||||
|
||||
|
||||
<li><a href="../../get-alts/">get_alts()</a>
|
||||
|
||||
|
||||
<li><a href="../../pad/">Pad</a>
|
||||
|
||||
|
||||
<li><a href="../../query/">Query</a>
|
||||
|
||||
|
||||
<li><a href="../../record/">Record</a>
|
||||
|
||||
|
||||
<li><a href="../">SourceObject</a>
|
||||
|
||||
<ul>
|
||||
<li><a href="../alt/">alt</a>
|
||||
|
||||
|
||||
<li><a href="../is-child-of/">is_child_of()</a>
|
||||
|
||||
|
||||
<li><a href="../is-discoverable/">is_discoverable</a>
|
||||
|
||||
|
||||
<li><a href="../is-hidden/">is_hidden</a>
|
||||
|
||||
|
||||
<li><a href="../is-undiscoverable/">is_undiscoverable</a>
|
||||
|
||||
|
||||
<li><a href="../is-visible/">is_visible</a>
|
||||
|
||||
|
||||
<li><a href="../parent/">parent</a>
|
||||
|
||||
|
||||
<li><a href="../path/">path</a>
|
||||
|
||||
|
||||
<li class="active"><a href="./">record</a>
|
||||
|
||||
<ul></ul>
|
||||
|
||||
|
||||
<li><a href="../source-filename/">source_filename</a>
|
||||
|
||||
|
||||
<li><a href="../url-path/">url_path</a>
|
||||
|
||||
|
||||
<li><a href="../url-to/">url_to()</a>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<li><a href="../../system-fields/">System Fields</a>
|
||||
|
||||
|
||||
<li><a href="../../type/">Type</a>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<li><a href="../../../environment/">Environment</a>
|
||||
|
||||
|
||||
<li><a href="../../../plugins/">Plugins</a>
|
||||
|
||||
|
||||
<li><a href="../../../project/">Project</a>
|
||||
|
||||
|
||||
<li><a href="../../../publisher/">Publisher</a>
|
||||
|
||||
|
||||
<li><a href="../../../templates/">Template API</a>
|
||||
|
||||
|
||||
<li><a href="../../../utils/">Utilities</a>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<li><a href="../../../../search/">Search</a>
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<div class="visible-md-block visible-lg-block">
|
||||
<h4>This Page</h4>
|
||||
<ul class="toc">
|
||||
|
||||
<li><a href="#example">Example</a></li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-sm-9 doc-styling">
|
||||
|
||||
|
||||
<h1><i class="glyphicon glyphicon-info-sign"></i> <code class="obj">record</code></h1>
|
||||
|
||||
|
||||
|
||||
<ul class=page-meta>
|
||||
|
||||
<li>Property of <a href="../">SourceObject</a></li>
|
||||
|
||||
|
||||
|
||||
<li>New in Lektor Version <em>2.0</em></li>
|
||||
|
||||
</ul>
|
||||
|
||||
<p>Most records (other than the root) have a <a href="../parent/" class="ref">parent</a>. This as
|
||||
a concept generally makes in most situations. However when virtual sources
|
||||
come into play the parent often just refers to another virtual source but not
|
||||
the root record they all belong to.</p>
|
||||
<p>This property for the most part refers back to the object itself. However
|
||||
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>
|
||||
<span class="p"><</span><span class="nt">a</span> <span class="na">href</span><span class="o">=</span><span class="s">"</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">"</span><span class="p">></span>go back to overview<span class="p"></</span><span class="nt">a</span><span class="p">></span>
|
||||
<span class="cp">{%</span> <span class="k">endif</span> <span class="cp">%}</span>
|
||||
</pre></div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="comment-box">
|
||||
<h2>Comments</h2>
|
||||
|
||||
<div id="disqus_thread"></div>
|
||||
<script>
|
||||
var disqus_config = function() { this.page.identifier = "/docs/api/db/obj/record"; this.page.url = "https://www.getlektor.com/docs/api/db/obj/record/"; };
|
||||
(function() {
|
||||
var d = document, s = d.createElement('script');
|
||||
s.src = '//lektordocumentation.disqus.com/embed.js';
|
||||
s.setAttribute('data-timestamp', +new Date());
|
||||
(d.head || d.body).appendChild(s);
|
||||
})();
|
||||
</script>
|
||||
<noscript>
|
||||
Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript"
|
||||
rel="nofollow">comments powered by Disqus.</a>
|
||||
</noscript>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="bottomsummary">
|
||||
<div class="container">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<footer>
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-sm-4 icon-bar">
|
||||
<a href="https://github.com/lektor/lektor/" title="Lektor on GitHub"
|
||||
><i class="fa fa-github"></i></a>
|
||||
<a href="https://github.com/lektor/lektor/issues/" title="Report Issues for Lektor"
|
||||
><i class="fa fa-bug"></i></a>
|
||||
<a href="https://twitter.com/getlektor" title="Find Lektor on Twitter"
|
||||
><i class="fa fa-twitter"></i></a>
|
||||
<a href="https://gitter.im/lektor/lektor" title="Chat on Gitter"
|
||||
><i class="fa fa-comment"></i></a>
|
||||
<a href="https://github.com/lektor/lektor-website/tree/master/content/docs/api/db/obj/record/contents.lr" title="View source for this page"><i class="fa fa-code"></i></a>
|
||||
</div>
|
||||
<div class="col-sm-8">
|
||||
<a href="../../../../../license/">License & Copyright</a> •
|
||||
<a href="../../../../../contact/">Contact</a> •
|
||||
Made with <i class="fa fa-fw fa-heart" title="Heart"><span hidden>Heart</span></i> in Carinthia
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
|
||||
<script type=text/javascript src="../../../../../static/app.js?h=bb1b933a" charset="utf-8"></script>
|
||||
<script>
|
||||
((window.gitter = {}).chat = {}).options = {
|
||||
room: 'lektor/lektor',
|
||||
activationElement: null
|
||||
};
|
||||
document.write('<button class="js-gitter-toggle-chat-button">Toggle Chat</button>');
|
||||
var dnt = navigator.doNotTrack || window.doNotTrack || navigator.msDoNotTrack;
|
||||
if (dnt != "1" && dnt != "yes") {
|
||||
window.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments)};ga.l=+new Date;
|
||||
ga('create', 'UA-70822533-1', 'auto');
|
||||
ga('set', 'anonymizeIp', true);
|
||||
ga('send', 'pageview');
|
||||
} else {
|
||||
console.debug("Respecting Do-Not-Track, not running analytics.");
|
||||
}
|
||||
</script>
|
||||
<script async src='https://www.google-analytics.com/analytics.js'></script>
|
||||
<script async defer id="github-bjs" src="https://buttons.github.io/buttons.js"></script>
|
||||
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script>
|
||||
<script src="https://sidecar.gitter.im/dist/sidecar.v1.js" async defer></script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,325 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<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/pygments.css">
|
||||
<link rel="shortcut icon" href="../../../../../static/favicon.png?h=fa09bedd">
|
||||
<title>source_filename | Documentation | Lektor Static Content Management System</title>
|
||||
</head>
|
||||
<body class="default">
|
||||
<nav class="navbar navbar-inverse navbar-static-top">
|
||||
<div class="container">
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle collapsed"
|
||||
data-toggle="collapse" data-target="#navbar"
|
||||
aria-expanded="false" aria-controls="navbar">
|
||||
<span class="sr-only">Toggle navigation</span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<a class="navbar-brand" href="../../../../../">Lektor</a>
|
||||
</div>
|
||||
<div id="navbar" class="collapse navbar-collapse">
|
||||
<ul class="nav navbar-nav">
|
||||
|
||||
<li><a href="../../../../../downloads/">Download</a></li>
|
||||
|
||||
<li class="active"><a href="../../../../">Documentation</a></li>
|
||||
|
||||
<li><a href="../../../../../showcase/">Showcase</a></li>
|
||||
|
||||
<li><a href="../../../../../plugins/">Plugins</a></li>
|
||||
|
||||
<li><a href="../../../../../community/">Community</a></li>
|
||||
|
||||
<li><a href="../../../../../blog/">Blog</a></li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<div class="body-wrapper">
|
||||
|
||||
<div class="container">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-3">
|
||||
<ul class="tree-nav nocontent">
|
||||
<li><a href="../../../../">Welcome</a></li>
|
||||
|
||||
|
||||
<li><a href="../../../../what/">What is Lektor</a>
|
||||
|
||||
|
||||
<li><a href="../../../../installation/">Installation</a>
|
||||
|
||||
|
||||
<li><a href="../../../../quickstart/">Quickstart</a>
|
||||
|
||||
|
||||
<li><a href="../../../../project/">Project</a>
|
||||
|
||||
|
||||
<li><a href="../../../../content/">Content</a>
|
||||
|
||||
|
||||
<li><a href="../../../../templates/">Templates</a>
|
||||
|
||||
|
||||
<li><a href="../../../../themes/">Themes</a>
|
||||
|
||||
|
||||
<li><a href="../../../../guides/">Guides</a>
|
||||
|
||||
|
||||
<li><a href="../../../../deployment/">Deployment</a>
|
||||
|
||||
|
||||
<li><a href="../../../../plugins/">Plugins</a>
|
||||
|
||||
|
||||
<li><a href="../../../../models/">Data Modelling</a>
|
||||
|
||||
|
||||
<li><a href="../../../../cli/">Command Line</a>
|
||||
|
||||
|
||||
<li><a href="../../../">API</a>
|
||||
|
||||
<ul>
|
||||
<li><a href="../../../build/">Build System</a>
|
||||
|
||||
|
||||
<li><a href="../../../databags/">Databags</a>
|
||||
|
||||
|
||||
<li><a href="../../">Database</a>
|
||||
|
||||
<ul>
|
||||
<li><a href="../../types/">Builtin Field Types</a>
|
||||
|
||||
|
||||
<li><a href="../../expression/">Expression</a>
|
||||
|
||||
|
||||
<li><a href="../../f/">F</a>
|
||||
|
||||
|
||||
<li><a href="../../get-alts/">get_alts()</a>
|
||||
|
||||
|
||||
<li><a href="../../pad/">Pad</a>
|
||||
|
||||
|
||||
<li><a href="../../query/">Query</a>
|
||||
|
||||
|
||||
<li><a href="../../record/">Record</a>
|
||||
|
||||
|
||||
<li><a href="../">SourceObject</a>
|
||||
|
||||
<ul>
|
||||
<li><a href="../alt/">alt</a>
|
||||
|
||||
|
||||
<li><a href="../is-child-of/">is_child_of()</a>
|
||||
|
||||
|
||||
<li><a href="../is-discoverable/">is_discoverable</a>
|
||||
|
||||
|
||||
<li><a href="../is-hidden/">is_hidden</a>
|
||||
|
||||
|
||||
<li><a href="../is-undiscoverable/">is_undiscoverable</a>
|
||||
|
||||
|
||||
<li><a href="../is-visible/">is_visible</a>
|
||||
|
||||
|
||||
<li><a href="../parent/">parent</a>
|
||||
|
||||
|
||||
<li><a href="../path/">path</a>
|
||||
|
||||
|
||||
<li><a href="../record/">record</a>
|
||||
|
||||
|
||||
<li class="active"><a href="./">source_filename</a>
|
||||
|
||||
<ul></ul>
|
||||
|
||||
|
||||
<li><a href="../url-path/">url_path</a>
|
||||
|
||||
|
||||
<li><a href="../url-to/">url_to()</a>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<li><a href="../../system-fields/">System Fields</a>
|
||||
|
||||
|
||||
<li><a href="../../type/">Type</a>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<li><a href="../../../environment/">Environment</a>
|
||||
|
||||
|
||||
<li><a href="../../../plugins/">Plugins</a>
|
||||
|
||||
|
||||
<li><a href="../../../project/">Project</a>
|
||||
|
||||
|
||||
<li><a href="../../../publisher/">Publisher</a>
|
||||
|
||||
|
||||
<li><a href="../../../templates/">Template API</a>
|
||||
|
||||
|
||||
<li><a href="../../../utils/">Utilities</a>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<li><a href="../../../../search/">Search</a>
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<div class="visible-md-block visible-lg-block">
|
||||
<h4>This Page</h4>
|
||||
<ul class="toc">
|
||||
|
||||
<li><a href="#example">Example</a></li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-sm-9 doc-styling">
|
||||
|
||||
|
||||
<h1><i class="glyphicon glyphicon-info-sign"></i> <code class="obj">source_filename</code></h1>
|
||||
|
||||
|
||||
|
||||
<ul class=page-meta>
|
||||
|
||||
<li>Property of <a href="../">SourceObject</a></li>
|
||||
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
<p>This returns the primary source filename of the source object. So for
|
||||
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"><</span><span class="nt">p</span><span class="p">></span>
|
||||
Generated from <span class="cp">{{</span> <span class="nv">this.source_filename</span> <span class="cp">}}</span>
|
||||
<span class="p"></</span><span class="nt">p</span><span class="p">></span>
|
||||
</pre></div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="comment-box">
|
||||
<h2>Comments</h2>
|
||||
|
||||
<div id="disqus_thread"></div>
|
||||
<script>
|
||||
var disqus_config = function() { this.page.identifier = "/docs/api/db/obj/source-filename"; this.page.url = "https://www.getlektor.com/docs/api/db/obj/source-filename/"; };
|
||||
(function() {
|
||||
var d = document, s = d.createElement('script');
|
||||
s.src = '//lektordocumentation.disqus.com/embed.js';
|
||||
s.setAttribute('data-timestamp', +new Date());
|
||||
(d.head || d.body).appendChild(s);
|
||||
})();
|
||||
</script>
|
||||
<noscript>
|
||||
Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript"
|
||||
rel="nofollow">comments powered by Disqus.</a>
|
||||
</noscript>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="bottomsummary">
|
||||
<div class="container">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<footer>
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-sm-4 icon-bar">
|
||||
<a href="https://github.com/lektor/lektor/" title="Lektor on GitHub"
|
||||
><i class="fa fa-github"></i></a>
|
||||
<a href="https://github.com/lektor/lektor/issues/" title="Report Issues for Lektor"
|
||||
><i class="fa fa-bug"></i></a>
|
||||
<a href="https://twitter.com/getlektor" title="Find Lektor on Twitter"
|
||||
><i class="fa fa-twitter"></i></a>
|
||||
<a href="https://gitter.im/lektor/lektor" title="Chat on Gitter"
|
||||
><i class="fa fa-comment"></i></a>
|
||||
<a href="https://github.com/lektor/lektor-website/tree/master/content/docs/api/db/obj/source-filename/contents.lr" title="View source for this page"><i class="fa fa-code"></i></a>
|
||||
</div>
|
||||
<div class="col-sm-8">
|
||||
<a href="../../../../../license/">License & Copyright</a> •
|
||||
<a href="../../../../../contact/">Contact</a> •
|
||||
Made with <i class="fa fa-fw fa-heart" title="Heart"><span hidden>Heart</span></i> in Carinthia
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
|
||||
<script type=text/javascript src="../../../../../static/app.js?h=bb1b933a" charset="utf-8"></script>
|
||||
<script>
|
||||
((window.gitter = {}).chat = {}).options = {
|
||||
room: 'lektor/lektor',
|
||||
activationElement: null
|
||||
};
|
||||
document.write('<button class="js-gitter-toggle-chat-button">Toggle Chat</button>');
|
||||
var dnt = navigator.doNotTrack || window.doNotTrack || navigator.msDoNotTrack;
|
||||
if (dnt != "1" && dnt != "yes") {
|
||||
window.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments)};ga.l=+new Date;
|
||||
ga('create', 'UA-70822533-1', 'auto');
|
||||
ga('set', 'anonymizeIp', true);
|
||||
ga('send', 'pageview');
|
||||
} else {
|
||||
console.debug("Respecting Do-Not-Track, not running analytics.");
|
||||
}
|
||||
</script>
|
||||
<script async src='https://www.google-analytics.com/analytics.js'></script>
|
||||
<script async defer id="github-bjs" src="https://buttons.github.io/buttons.js"></script>
|
||||
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script>
|
||||
<script src="https://sidecar.gitter.im/dist/sidecar.v1.js" async defer></script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,311 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<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/pygments.css">
|
||||
<link rel="shortcut icon" href="../../../../../static/favicon.png?h=fa09bedd">
|
||||
<title>url_path | Documentation | Lektor Static Content Management System</title>
|
||||
</head>
|
||||
<body class="default">
|
||||
<nav class="navbar navbar-inverse navbar-static-top">
|
||||
<div class="container">
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle collapsed"
|
||||
data-toggle="collapse" data-target="#navbar"
|
||||
aria-expanded="false" aria-controls="navbar">
|
||||
<span class="sr-only">Toggle navigation</span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<a class="navbar-brand" href="../../../../../">Lektor</a>
|
||||
</div>
|
||||
<div id="navbar" class="collapse navbar-collapse">
|
||||
<ul class="nav navbar-nav">
|
||||
|
||||
<li><a href="../../../../../downloads/">Download</a></li>
|
||||
|
||||
<li class="active"><a href="../../../../">Documentation</a></li>
|
||||
|
||||
<li><a href="../../../../../showcase/">Showcase</a></li>
|
||||
|
||||
<li><a href="../../../../../plugins/">Plugins</a></li>
|
||||
|
||||
<li><a href="../../../../../community/">Community</a></li>
|
||||
|
||||
<li><a href="../../../../../blog/">Blog</a></li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<div class="body-wrapper">
|
||||
|
||||
<div class="container">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-3">
|
||||
<ul class="tree-nav nocontent">
|
||||
<li><a href="../../../../">Welcome</a></li>
|
||||
|
||||
|
||||
<li><a href="../../../../what/">What is Lektor</a>
|
||||
|
||||
|
||||
<li><a href="../../../../installation/">Installation</a>
|
||||
|
||||
|
||||
<li><a href="../../../../quickstart/">Quickstart</a>
|
||||
|
||||
|
||||
<li><a href="../../../../project/">Project</a>
|
||||
|
||||
|
||||
<li><a href="../../../../content/">Content</a>
|
||||
|
||||
|
||||
<li><a href="../../../../templates/">Templates</a>
|
||||
|
||||
|
||||
<li><a href="../../../../themes/">Themes</a>
|
||||
|
||||
|
||||
<li><a href="../../../../guides/">Guides</a>
|
||||
|
||||
|
||||
<li><a href="../../../../deployment/">Deployment</a>
|
||||
|
||||
|
||||
<li><a href="../../../../plugins/">Plugins</a>
|
||||
|
||||
|
||||
<li><a href="../../../../models/">Data Modelling</a>
|
||||
|
||||
|
||||
<li><a href="../../../../cli/">Command Line</a>
|
||||
|
||||
|
||||
<li><a href="../../../">API</a>
|
||||
|
||||
<ul>
|
||||
<li><a href="../../../build/">Build System</a>
|
||||
|
||||
|
||||
<li><a href="../../../databags/">Databags</a>
|
||||
|
||||
|
||||
<li><a href="../../">Database</a>
|
||||
|
||||
<ul>
|
||||
<li><a href="../../types/">Builtin Field Types</a>
|
||||
|
||||
|
||||
<li><a href="../../expression/">Expression</a>
|
||||
|
||||
|
||||
<li><a href="../../f/">F</a>
|
||||
|
||||
|
||||
<li><a href="../../get-alts/">get_alts()</a>
|
||||
|
||||
|
||||
<li><a href="../../pad/">Pad</a>
|
||||
|
||||
|
||||
<li><a href="../../query/">Query</a>
|
||||
|
||||
|
||||
<li><a href="../../record/">Record</a>
|
||||
|
||||
|
||||
<li><a href="../">SourceObject</a>
|
||||
|
||||
<ul>
|
||||
<li><a href="../alt/">alt</a>
|
||||
|
||||
|
||||
<li><a href="../is-child-of/">is_child_of()</a>
|
||||
|
||||
|
||||
<li><a href="../is-discoverable/">is_discoverable</a>
|
||||
|
||||
|
||||
<li><a href="../is-hidden/">is_hidden</a>
|
||||
|
||||
|
||||
<li><a href="../is-undiscoverable/">is_undiscoverable</a>
|
||||
|
||||
|
||||
<li><a href="../is-visible/">is_visible</a>
|
||||
|
||||
|
||||
<li><a href="../parent/">parent</a>
|
||||
|
||||
|
||||
<li><a href="../path/">path</a>
|
||||
|
||||
|
||||
<li><a href="../record/">record</a>
|
||||
|
||||
|
||||
<li><a href="../source-filename/">source_filename</a>
|
||||
|
||||
|
||||
<li class="active"><a href="./">url_path</a>
|
||||
|
||||
<ul></ul>
|
||||
|
||||
|
||||
<li><a href="../url-to/">url_to()</a>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<li><a href="../../system-fields/">System Fields</a>
|
||||
|
||||
|
||||
<li><a href="../../type/">Type</a>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<li><a href="../../../environment/">Environment</a>
|
||||
|
||||
|
||||
<li><a href="../../../plugins/">Plugins</a>
|
||||
|
||||
|
||||
<li><a href="../../../project/">Project</a>
|
||||
|
||||
|
||||
<li><a href="../../../publisher/">Publisher</a>
|
||||
|
||||
|
||||
<li><a href="../../../templates/">Template API</a>
|
||||
|
||||
|
||||
<li><a href="../../../utils/">Utilities</a>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<li><a href="../../../../search/">Search</a>
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-sm-9 doc-styling">
|
||||
|
||||
|
||||
<h1><i class="glyphicon glyphicon-info-sign"></i> <code class="obj">url_path</code></h1>
|
||||
|
||||
|
||||
|
||||
<ul class=page-meta>
|
||||
|
||||
<li>Property of <a href="../">SourceObject</a></li>
|
||||
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
<p>This is the absolute URL path to the page where the source object can be
|
||||
reached when rendered. Typically the <a href="../../../templates/filters/url/" class="ref">url</a>
|
||||
filter or the <a href="../url-to/" class="ref">url_to</a> method would be used.</p>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="comment-box">
|
||||
<h2>Comments</h2>
|
||||
|
||||
<div id="disqus_thread"></div>
|
||||
<script>
|
||||
var disqus_config = function() { this.page.identifier = "/docs/api/db/obj/url-path"; this.page.url = "https://www.getlektor.com/docs/api/db/obj/url-path/"; };
|
||||
(function() {
|
||||
var d = document, s = d.createElement('script');
|
||||
s.src = '//lektordocumentation.disqus.com/embed.js';
|
||||
s.setAttribute('data-timestamp', +new Date());
|
||||
(d.head || d.body).appendChild(s);
|
||||
})();
|
||||
</script>
|
||||
<noscript>
|
||||
Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript"
|
||||
rel="nofollow">comments powered by Disqus.</a>
|
||||
</noscript>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="bottomsummary">
|
||||
<div class="container">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<footer>
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-sm-4 icon-bar">
|
||||
<a href="https://github.com/lektor/lektor/" title="Lektor on GitHub"
|
||||
><i class="fa fa-github"></i></a>
|
||||
<a href="https://github.com/lektor/lektor/issues/" title="Report Issues for Lektor"
|
||||
><i class="fa fa-bug"></i></a>
|
||||
<a href="https://twitter.com/getlektor" title="Find Lektor on Twitter"
|
||||
><i class="fa fa-twitter"></i></a>
|
||||
<a href="https://gitter.im/lektor/lektor" title="Chat on Gitter"
|
||||
><i class="fa fa-comment"></i></a>
|
||||
<a href="https://github.com/lektor/lektor-website/tree/master/content/docs/api/db/obj/url-path/contents.lr" title="View source for this page"><i class="fa fa-code"></i></a>
|
||||
</div>
|
||||
<div class="col-sm-8">
|
||||
<a href="../../../../../license/">License & Copyright</a> •
|
||||
<a href="../../../../../contact/">Contact</a> •
|
||||
Made with <i class="fa fa-fw fa-heart" title="Heart"><span hidden>Heart</span></i> in Carinthia
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
|
||||
<script type=text/javascript src="../../../../../static/app.js?h=bb1b933a" charset="utf-8"></script>
|
||||
<script>
|
||||
((window.gitter = {}).chat = {}).options = {
|
||||
room: 'lektor/lektor',
|
||||
activationElement: null
|
||||
};
|
||||
document.write('<button class="js-gitter-toggle-chat-button">Toggle Chat</button>');
|
||||
var dnt = navigator.doNotTrack || window.doNotTrack || navigator.msDoNotTrack;
|
||||
if (dnt != "1" && dnt != "yes") {
|
||||
window.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments)};ga.l=+new Date;
|
||||
ga('create', 'UA-70822533-1', 'auto');
|
||||
ga('set', 'anonymizeIp', true);
|
||||
ga('send', 'pageview');
|
||||
} else {
|
||||
console.debug("Respecting Do-Not-Track, not running analytics.");
|
||||
}
|
||||
</script>
|
||||
<script async src='https://www.google-analytics.com/analytics.js'></script>
|
||||
<script async defer id="github-bjs" src="https://buttons.github.io/buttons.js"></script>
|
||||
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script>
|
||||
<script src="https://sidecar.gitter.im/dist/sidecar.v1.js" async defer></script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,331 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<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/pygments.css">
|
||||
<link rel="shortcut icon" href="../../../../../static/favicon.png?h=fa09bedd">
|
||||
<title>url_to | Documentation | Lektor Static Content Management System</title>
|
||||
</head>
|
||||
<body class="default">
|
||||
<nav class="navbar navbar-inverse navbar-static-top">
|
||||
<div class="container">
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle collapsed"
|
||||
data-toggle="collapse" data-target="#navbar"
|
||||
aria-expanded="false" aria-controls="navbar">
|
||||
<span class="sr-only">Toggle navigation</span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<a class="navbar-brand" href="../../../../../">Lektor</a>
|
||||
</div>
|
||||
<div id="navbar" class="collapse navbar-collapse">
|
||||
<ul class="nav navbar-nav">
|
||||
|
||||
<li><a href="../../../../../downloads/">Download</a></li>
|
||||
|
||||
<li class="active"><a href="../../../../">Documentation</a></li>
|
||||
|
||||
<li><a href="../../../../../showcase/">Showcase</a></li>
|
||||
|
||||
<li><a href="../../../../../plugins/">Plugins</a></li>
|
||||
|
||||
<li><a href="../../../../../community/">Community</a></li>
|
||||
|
||||
<li><a href="../../../../../blog/">Blog</a></li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<div class="body-wrapper">
|
||||
|
||||
<div class="container">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-3">
|
||||
<ul class="tree-nav nocontent">
|
||||
<li><a href="../../../../">Welcome</a></li>
|
||||
|
||||
|
||||
<li><a href="../../../../what/">What is Lektor</a>
|
||||
|
||||
|
||||
<li><a href="../../../../installation/">Installation</a>
|
||||
|
||||
|
||||
<li><a href="../../../../quickstart/">Quickstart</a>
|
||||
|
||||
|
||||
<li><a href="../../../../project/">Project</a>
|
||||
|
||||
|
||||
<li><a href="../../../../content/">Content</a>
|
||||
|
||||
|
||||
<li><a href="../../../../templates/">Templates</a>
|
||||
|
||||
|
||||
<li><a href="../../../../themes/">Themes</a>
|
||||
|
||||
|
||||
<li><a href="../../../../guides/">Guides</a>
|
||||
|
||||
|
||||
<li><a href="../../../../deployment/">Deployment</a>
|
||||
|
||||
|
||||
<li><a href="../../../../plugins/">Plugins</a>
|
||||
|
||||
|
||||
<li><a href="../../../../models/">Data Modelling</a>
|
||||
|
||||
|
||||
<li><a href="../../../../cli/">Command Line</a>
|
||||
|
||||
|
||||
<li><a href="../../../">API</a>
|
||||
|
||||
<ul>
|
||||
<li><a href="../../../build/">Build System</a>
|
||||
|
||||
|
||||
<li><a href="../../../databags/">Databags</a>
|
||||
|
||||
|
||||
<li><a href="../../">Database</a>
|
||||
|
||||
<ul>
|
||||
<li><a href="../../types/">Builtin Field Types</a>
|
||||
|
||||
|
||||
<li><a href="../../expression/">Expression</a>
|
||||
|
||||
|
||||
<li><a href="../../f/">F</a>
|
||||
|
||||
|
||||
<li><a href="../../get-alts/">get_alts()</a>
|
||||
|
||||
|
||||
<li><a href="../../pad/">Pad</a>
|
||||
|
||||
|
||||
<li><a href="../../query/">Query</a>
|
||||
|
||||
|
||||
<li><a href="../../record/">Record</a>
|
||||
|
||||
|
||||
<li><a href="../">SourceObject</a>
|
||||
|
||||
<ul>
|
||||
<li><a href="../alt/">alt</a>
|
||||
|
||||
|
||||
<li><a href="../is-child-of/">is_child_of()</a>
|
||||
|
||||
|
||||
<li><a href="../is-discoverable/">is_discoverable</a>
|
||||
|
||||
|
||||
<li><a href="../is-hidden/">is_hidden</a>
|
||||
|
||||
|
||||
<li><a href="../is-undiscoverable/">is_undiscoverable</a>
|
||||
|
||||
|
||||
<li><a href="../is-visible/">is_visible</a>
|
||||
|
||||
|
||||
<li><a href="../parent/">parent</a>
|
||||
|
||||
|
||||
<li><a href="../path/">path</a>
|
||||
|
||||
|
||||
<li><a href="../record/">record</a>
|
||||
|
||||
|
||||
<li><a href="../source-filename/">source_filename</a>
|
||||
|
||||
|
||||
<li><a href="../url-path/">url_path</a>
|
||||
|
||||
|
||||
<li class="active"><a href="./">url_to()</a>
|
||||
|
||||
<ul></ul>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<li><a href="../../system-fields/">System Fields</a>
|
||||
|
||||
|
||||
<li><a href="../../type/">Type</a>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<li><a href="../../../environment/">Environment</a>
|
||||
|
||||
|
||||
<li><a href="../../../plugins/">Plugins</a>
|
||||
|
||||
|
||||
<li><a href="../../../project/">Project</a>
|
||||
|
||||
|
||||
<li><a href="../../../publisher/">Publisher</a>
|
||||
|
||||
|
||||
<li><a href="../../../templates/">Template API</a>
|
||||
|
||||
|
||||
<li><a href="../../../utils/">Utilities</a>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<li><a href="../../../../search/">Search</a>
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<div class="visible-md-block visible-lg-block">
|
||||
<h4>This Page</h4>
|
||||
<ul class="toc">
|
||||
|
||||
<li><a href="#example">Example</a></li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-sm-9 doc-styling">
|
||||
|
||||
|
||||
<h1><i class="glyphicon glyphicon-cog"></i> <code class="obj">url_to</code> <span class="sig">(<code>path, alt=None, absolute=None, external=None</code>)</span></h1>
|
||||
|
||||
|
||||
|
||||
<ul class=page-meta>
|
||||
|
||||
<li>Method of <a href="../">SourceObject</a></li>
|
||||
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
<p>Calculates the URL from the current source object to the given other source
|
||||
object. Alternatively a path can also be provided instead of a source object.
|
||||
If the path starts with a leading bang (<code>!</code>) then no resolving is performed.
|
||||
If no <code>alt</code> is provided the <code>alt</code> of the page is used.</p>
|
||||
<p>This is what the <code>|url</code> filter uses internally to generate URLs.</p>
|
||||
<p>In addition to that <code>absolute</code> can enforce the URL to be absolute instead of
|
||||
relative to the current page and <code>external</code> can be used to also add the
|
||||
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">'/downloads'</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>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="comment-box">
|
||||
<h2>Comments</h2>
|
||||
|
||||
<div id="disqus_thread"></div>
|
||||
<script>
|
||||
var disqus_config = function() { this.page.identifier = "/docs/api/db/obj/url-to"; this.page.url = "https://www.getlektor.com/docs/api/db/obj/url-to/"; };
|
||||
(function() {
|
||||
var d = document, s = d.createElement('script');
|
||||
s.src = '//lektordocumentation.disqus.com/embed.js';
|
||||
s.setAttribute('data-timestamp', +new Date());
|
||||
(d.head || d.body).appendChild(s);
|
||||
})();
|
||||
</script>
|
||||
<noscript>
|
||||
Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript"
|
||||
rel="nofollow">comments powered by Disqus.</a>
|
||||
</noscript>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="bottomsummary">
|
||||
<div class="container">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<footer>
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-sm-4 icon-bar">
|
||||
<a href="https://github.com/lektor/lektor/" title="Lektor on GitHub"
|
||||
><i class="fa fa-github"></i></a>
|
||||
<a href="https://github.com/lektor/lektor/issues/" title="Report Issues for Lektor"
|
||||
><i class="fa fa-bug"></i></a>
|
||||
<a href="https://twitter.com/getlektor" title="Find Lektor on Twitter"
|
||||
><i class="fa fa-twitter"></i></a>
|
||||
<a href="https://gitter.im/lektor/lektor" title="Chat on Gitter"
|
||||
><i class="fa fa-comment"></i></a>
|
||||
<a href="https://github.com/lektor/lektor-website/tree/master/content/docs/api/db/obj/url-to/contents.lr" title="View source for this page"><i class="fa fa-code"></i></a>
|
||||
</div>
|
||||
<div class="col-sm-8">
|
||||
<a href="../../../../../license/">License & Copyright</a> •
|
||||
<a href="../../../../../contact/">Contact</a> •
|
||||
Made with <i class="fa fa-fw fa-heart" title="Heart"><span hidden>Heart</span></i> in Carinthia
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
|
||||
<script type=text/javascript src="../../../../../static/app.js?h=bb1b933a" charset="utf-8"></script>
|
||||
<script>
|
||||
((window.gitter = {}).chat = {}).options = {
|
||||
room: 'lektor/lektor',
|
||||
activationElement: null
|
||||
};
|
||||
document.write('<button class="js-gitter-toggle-chat-button">Toggle Chat</button>');
|
||||
var dnt = navigator.doNotTrack || window.doNotTrack || navigator.msDoNotTrack;
|
||||
if (dnt != "1" && dnt != "yes") {
|
||||
window.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments)};ga.l=+new Date;
|
||||
ga('create', 'UA-70822533-1', 'auto');
|
||||
ga('set', 'anonymizeIp', true);
|
||||
ga('send', 'pageview');
|
||||
} else {
|
||||
console.debug("Respecting Do-Not-Track, not running analytics.");
|
||||
}
|
||||
</script>
|
||||
<script async src='https://www.google-analytics.com/analytics.js'></script>
|
||||
<script async defer id="github-bjs" src="https://buttons.github.io/buttons.js"></script>
|
||||
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script>
|
||||
<script src="https://sidecar.gitter.im/dist/sidecar.v1.js" async defer></script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,291 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<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/pygments.css">
|
||||
<link rel="shortcut icon" href="../../../../../static/favicon.png?h=fa09bedd">
|
||||
<title>databags | Documentation | Lektor Static Content Management System</title>
|
||||
</head>
|
||||
<body class="default">
|
||||
<nav class="navbar navbar-inverse navbar-static-top">
|
||||
<div class="container">
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle collapsed"
|
||||
data-toggle="collapse" data-target="#navbar"
|
||||
aria-expanded="false" aria-controls="navbar">
|
||||
<span class="sr-only">Toggle navigation</span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<a class="navbar-brand" href="../../../../../">Lektor</a>
|
||||
</div>
|
||||
<div id="navbar" class="collapse navbar-collapse">
|
||||
<ul class="nav navbar-nav">
|
||||
|
||||
<li><a href="../../../../../downloads/">Download</a></li>
|
||||
|
||||
<li class="active"><a href="../../../../">Documentation</a></li>
|
||||
|
||||
<li><a href="../../../../../showcase/">Showcase</a></li>
|
||||
|
||||
<li><a href="../../../../../plugins/">Plugins</a></li>
|
||||
|
||||
<li><a href="../../../../../community/">Community</a></li>
|
||||
|
||||
<li><a href="../../../../../blog/">Blog</a></li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<div class="body-wrapper">
|
||||
|
||||
<div class="container">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-3">
|
||||
<ul class="tree-nav nocontent">
|
||||
<li><a href="../../../../">Welcome</a></li>
|
||||
|
||||
|
||||
<li><a href="../../../../what/">What is Lektor</a>
|
||||
|
||||
|
||||
<li><a href="../../../../installation/">Installation</a>
|
||||
|
||||
|
||||
<li><a href="../../../../quickstart/">Quickstart</a>
|
||||
|
||||
|
||||
<li><a href="../../../../project/">Project</a>
|
||||
|
||||
|
||||
<li><a href="../../../../content/">Content</a>
|
||||
|
||||
|
||||
<li><a href="../../../../templates/">Templates</a>
|
||||
|
||||
|
||||
<li><a href="../../../../themes/">Themes</a>
|
||||
|
||||
|
||||
<li><a href="../../../../guides/">Guides</a>
|
||||
|
||||
|
||||
<li><a href="../../../../deployment/">Deployment</a>
|
||||
|
||||
|
||||
<li><a href="../../../../plugins/">Plugins</a>
|
||||
|
||||
|
||||
<li><a href="../../../../models/">Data Modelling</a>
|
||||
|
||||
|
||||
<li><a href="../../../../cli/">Command Line</a>
|
||||
|
||||
|
||||
<li><a href="../../../">API</a>
|
||||
|
||||
<ul>
|
||||
<li><a href="../../../build/">Build System</a>
|
||||
|
||||
|
||||
<li><a href="../../../databags/">Databags</a>
|
||||
|
||||
|
||||
<li><a href="../../">Database</a>
|
||||
|
||||
<ul>
|
||||
<li><a href="../../types/">Builtin Field Types</a>
|
||||
|
||||
|
||||
<li><a href="../../expression/">Expression</a>
|
||||
|
||||
|
||||
<li><a href="../../f/">F</a>
|
||||
|
||||
|
||||
<li><a href="../../get-alts/">get_alts()</a>
|
||||
|
||||
|
||||
<li><a href="../">Pad</a>
|
||||
|
||||
<ul>
|
||||
<li class="active"><a href="./">databags</a>
|
||||
|
||||
<ul></ul>
|
||||
|
||||
|
||||
<li><a href="../get/">get()</a>
|
||||
|
||||
|
||||
<li><a href="../get-root/">get_root()</a>
|
||||
|
||||
|
||||
<li><a href="../query/">query()</a>
|
||||
|
||||
|
||||
<li><a href="../resolve-url-path/">resolve_url_path()</a>
|
||||
|
||||
|
||||
<li><a href="../root/">root</a>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<li><a href="../../query/">Query</a>
|
||||
|
||||
|
||||
<li><a href="../../record/">Record</a>
|
||||
|
||||
|
||||
<li><a href="../../obj/">SourceObject</a>
|
||||
|
||||
|
||||
<li><a href="../../system-fields/">System Fields</a>
|
||||
|
||||
|
||||
<li><a href="../../type/">Type</a>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<li><a href="../../../environment/">Environment</a>
|
||||
|
||||
|
||||
<li><a href="../../../plugins/">Plugins</a>
|
||||
|
||||
|
||||
<li><a href="../../../project/">Project</a>
|
||||
|
||||
|
||||
<li><a href="../../../publisher/">Publisher</a>
|
||||
|
||||
|
||||
<li><a href="../../../templates/">Template API</a>
|
||||
|
||||
|
||||
<li><a href="../../../utils/">Utilities</a>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<li><a href="../../../../search/">Search</a>
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-sm-9 doc-styling">
|
||||
|
||||
|
||||
<h1><i class="glyphicon glyphicon-info-sign"></i> <code class="obj">databags</code></h1>
|
||||
|
||||
|
||||
|
||||
<ul class=page-meta>
|
||||
|
||||
<li>Property of <a href="../">Pad</a></li>
|
||||
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
<p>Through this attribute you can access the stored <a href="../../../databags/" class="ref">databags</a>.</p>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="comment-box">
|
||||
<h2>Comments</h2>
|
||||
|
||||
<div id="disqus_thread"></div>
|
||||
<script>
|
||||
var disqus_config = function() { this.page.identifier = "/docs/api/db/pad/databags"; this.page.url = "https://www.getlektor.com/docs/api/db/pad/databags/"; };
|
||||
(function() {
|
||||
var d = document, s = d.createElement('script');
|
||||
s.src = '//lektordocumentation.disqus.com/embed.js';
|
||||
s.setAttribute('data-timestamp', +new Date());
|
||||
(d.head || d.body).appendChild(s);
|
||||
})();
|
||||
</script>
|
||||
<noscript>
|
||||
Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript"
|
||||
rel="nofollow">comments powered by Disqus.</a>
|
||||
</noscript>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="bottomsummary">
|
||||
<div class="container">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<footer>
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-sm-4 icon-bar">
|
||||
<a href="https://github.com/lektor/lektor/" title="Lektor on GitHub"
|
||||
><i class="fa fa-github"></i></a>
|
||||
<a href="https://github.com/lektor/lektor/issues/" title="Report Issues for Lektor"
|
||||
><i class="fa fa-bug"></i></a>
|
||||
<a href="https://twitter.com/getlektor" title="Find Lektor on Twitter"
|
||||
><i class="fa fa-twitter"></i></a>
|
||||
<a href="https://gitter.im/lektor/lektor" title="Chat on Gitter"
|
||||
><i class="fa fa-comment"></i></a>
|
||||
<a href="https://github.com/lektor/lektor-website/tree/master/content/docs/api/db/pad/databags/contents.lr" title="View source for this page"><i class="fa fa-code"></i></a>
|
||||
</div>
|
||||
<div class="col-sm-8">
|
||||
<a href="../../../../../license/">License & Copyright</a> •
|
||||
<a href="../../../../../contact/">Contact</a> •
|
||||
Made with <i class="fa fa-fw fa-heart" title="Heart"><span hidden>Heart</span></i> in Carinthia
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
|
||||
<script type=text/javascript src="../../../../../static/app.js?h=bb1b933a" charset="utf-8"></script>
|
||||
<script>
|
||||
((window.gitter = {}).chat = {}).options = {
|
||||
room: 'lektor/lektor',
|
||||
activationElement: null
|
||||
};
|
||||
document.write('<button class="js-gitter-toggle-chat-button">Toggle Chat</button>');
|
||||
var dnt = navigator.doNotTrack || window.doNotTrack || navigator.msDoNotTrack;
|
||||
if (dnt != "1" && dnt != "yes") {
|
||||
window.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments)};ga.l=+new Date;
|
||||
ga('create', 'UA-70822533-1', 'auto');
|
||||
ga('set', 'anonymizeIp', true);
|
||||
ga('send', 'pageview');
|
||||
} else {
|
||||
console.debug("Respecting Do-Not-Track, not running analytics.");
|
||||
}
|
||||
</script>
|
||||
<script async src='https://www.google-analytics.com/analytics.js'></script>
|
||||
<script async defer id="github-bjs" src="https://buttons.github.io/buttons.js"></script>
|
||||
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script>
|
||||
<script src="https://sidecar.gitter.im/dist/sidecar.v1.js" async defer></script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,306 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<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/pygments.css">
|
||||
<link rel="shortcut icon" href="../../../../../static/favicon.png?h=fa09bedd">
|
||||
<title>get_root | Documentation | Lektor Static Content Management System</title>
|
||||
</head>
|
||||
<body class="default">
|
||||
<nav class="navbar navbar-inverse navbar-static-top">
|
||||
<div class="container">
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle collapsed"
|
||||
data-toggle="collapse" data-target="#navbar"
|
||||
aria-expanded="false" aria-controls="navbar">
|
||||
<span class="sr-only">Toggle navigation</span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<a class="navbar-brand" href="../../../../../">Lektor</a>
|
||||
</div>
|
||||
<div id="navbar" class="collapse navbar-collapse">
|
||||
<ul class="nav navbar-nav">
|
||||
|
||||
<li><a href="../../../../../downloads/">Download</a></li>
|
||||
|
||||
<li class="active"><a href="../../../../">Documentation</a></li>
|
||||
|
||||
<li><a href="../../../../../showcase/">Showcase</a></li>
|
||||
|
||||
<li><a href="../../../../../plugins/">Plugins</a></li>
|
||||
|
||||
<li><a href="../../../../../community/">Community</a></li>
|
||||
|
||||
<li><a href="../../../../../blog/">Blog</a></li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<div class="body-wrapper">
|
||||
|
||||
<div class="container">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-3">
|
||||
<ul class="tree-nav nocontent">
|
||||
<li><a href="../../../../">Welcome</a></li>
|
||||
|
||||
|
||||
<li><a href="../../../../what/">What is Lektor</a>
|
||||
|
||||
|
||||
<li><a href="../../../../installation/">Installation</a>
|
||||
|
||||
|
||||
<li><a href="../../../../quickstart/">Quickstart</a>
|
||||
|
||||
|
||||
<li><a href="../../../../project/">Project</a>
|
||||
|
||||
|
||||
<li><a href="../../../../content/">Content</a>
|
||||
|
||||
|
||||
<li><a href="../../../../templates/">Templates</a>
|
||||
|
||||
|
||||
<li><a href="../../../../themes/">Themes</a>
|
||||
|
||||
|
||||
<li><a href="../../../../guides/">Guides</a>
|
||||
|
||||
|
||||
<li><a href="../../../../deployment/">Deployment</a>
|
||||
|
||||
|
||||
<li><a href="../../../../plugins/">Plugins</a>
|
||||
|
||||
|
||||
<li><a href="../../../../models/">Data Modelling</a>
|
||||
|
||||
|
||||
<li><a href="../../../../cli/">Command Line</a>
|
||||
|
||||
|
||||
<li><a href="../../../">API</a>
|
||||
|
||||
<ul>
|
||||
<li><a href="../../../build/">Build System</a>
|
||||
|
||||
|
||||
<li><a href="../../../databags/">Databags</a>
|
||||
|
||||
|
||||
<li><a href="../../">Database</a>
|
||||
|
||||
<ul>
|
||||
<li><a href="../../types/">Builtin Field Types</a>
|
||||
|
||||
|
||||
<li><a href="../../expression/">Expression</a>
|
||||
|
||||
|
||||
<li><a href="../../f/">F</a>
|
||||
|
||||
|
||||
<li><a href="../../get-alts/">get_alts()</a>
|
||||
|
||||
|
||||
<li><a href="../">Pad</a>
|
||||
|
||||
<ul>
|
||||
<li><a href="../databags/">databags</a>
|
||||
|
||||
|
||||
<li><a href="../get/">get()</a>
|
||||
|
||||
|
||||
<li class="active"><a href="./">get_root()</a>
|
||||
|
||||
<ul></ul>
|
||||
|
||||
|
||||
<li><a href="../query/">query()</a>
|
||||
|
||||
|
||||
<li><a href="../resolve-url-path/">resolve_url_path()</a>
|
||||
|
||||
|
||||
<li><a href="../root/">root</a>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<li><a href="../../query/">Query</a>
|
||||
|
||||
|
||||
<li><a href="../../record/">Record</a>
|
||||
|
||||
|
||||
<li><a href="../../obj/">SourceObject</a>
|
||||
|
||||
|
||||
<li><a href="../../system-fields/">System Fields</a>
|
||||
|
||||
|
||||
<li><a href="../../type/">Type</a>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<li><a href="../../../environment/">Environment</a>
|
||||
|
||||
|
||||
<li><a href="../../../plugins/">Plugins</a>
|
||||
|
||||
|
||||
<li><a href="../../../project/">Project</a>
|
||||
|
||||
|
||||
<li><a href="../../../publisher/">Publisher</a>
|
||||
|
||||
|
||||
<li><a href="../../../templates/">Template API</a>
|
||||
|
||||
|
||||
<li><a href="../../../utils/">Utilities</a>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<li><a href="../../../../search/">Search</a>
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<div class="visible-md-block visible-lg-block">
|
||||
<h4>This Page</h4>
|
||||
<ul class="toc">
|
||||
|
||||
<li><a href="#example">Example</a></li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-sm-9 doc-styling">
|
||||
|
||||
|
||||
<h1><i class="glyphicon glyphicon-cog"></i> <code class="obj">get_root</code> <span class="sig">(<code>alt='_primary'</code>)</span></h1>
|
||||
|
||||
|
||||
|
||||
<ul class=page-meta>
|
||||
|
||||
<li>Method of <a href="../">Pad</a></li>
|
||||
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
<p>The tree only has one root record but it can come in different
|
||||
<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">'de'</span><span class="o">)</span> <span class="cp">%}</span>
|
||||
<span class="p"><</span><span class="nt">a</span> <span class="na">href</span><span class="o">=</span><span class="s">"</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">"</span><span class="p">></span>Go to German Page<span class="p"></</span><span class="nt">a</span><span class="p">></span>
|
||||
</pre></div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="comment-box">
|
||||
<h2>Comments</h2>
|
||||
|
||||
<div id="disqus_thread"></div>
|
||||
<script>
|
||||
var disqus_config = function() { this.page.identifier = "/docs/api/db/pad/get-root"; this.page.url = "https://www.getlektor.com/docs/api/db/pad/get-root/"; };
|
||||
(function() {
|
||||
var d = document, s = d.createElement('script');
|
||||
s.src = '//lektordocumentation.disqus.com/embed.js';
|
||||
s.setAttribute('data-timestamp', +new Date());
|
||||
(d.head || d.body).appendChild(s);
|
||||
})();
|
||||
</script>
|
||||
<noscript>
|
||||
Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript"
|
||||
rel="nofollow">comments powered by Disqus.</a>
|
||||
</noscript>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="bottomsummary">
|
||||
<div class="container">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<footer>
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-sm-4 icon-bar">
|
||||
<a href="https://github.com/lektor/lektor/" title="Lektor on GitHub"
|
||||
><i class="fa fa-github"></i></a>
|
||||
<a href="https://github.com/lektor/lektor/issues/" title="Report Issues for Lektor"
|
||||
><i class="fa fa-bug"></i></a>
|
||||
<a href="https://twitter.com/getlektor" title="Find Lektor on Twitter"
|
||||
><i class="fa fa-twitter"></i></a>
|
||||
<a href="https://gitter.im/lektor/lektor" title="Chat on Gitter"
|
||||
><i class="fa fa-comment"></i></a>
|
||||
<a href="https://github.com/lektor/lektor-website/tree/master/content/docs/api/db/pad/get-root/contents.lr" title="View source for this page"><i class="fa fa-code"></i></a>
|
||||
</div>
|
||||
<div class="col-sm-8">
|
||||
<a href="../../../../../license/">License & Copyright</a> •
|
||||
<a href="../../../../../contact/">Contact</a> •
|
||||
Made with <i class="fa fa-fw fa-heart" title="Heart"><span hidden>Heart</span></i> in Carinthia
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
|
||||
<script type=text/javascript src="../../../../../static/app.js?h=bb1b933a" charset="utf-8"></script>
|
||||
<script>
|
||||
((window.gitter = {}).chat = {}).options = {
|
||||
room: 'lektor/lektor',
|
||||
activationElement: null
|
||||
};
|
||||
document.write('<button class="js-gitter-toggle-chat-button">Toggle Chat</button>');
|
||||
var dnt = navigator.doNotTrack || window.doNotTrack || navigator.msDoNotTrack;
|
||||
if (dnt != "1" && dnt != "yes") {
|
||||
window.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments)};ga.l=+new Date;
|
||||
ga('create', 'UA-70822533-1', 'auto');
|
||||
ga('set', 'anonymizeIp', true);
|
||||
ga('send', 'pageview');
|
||||
} else {
|
||||
console.debug("Respecting Do-Not-Track, not running analytics.");
|
||||
}
|
||||
</script>
|
||||
<script async src='https://www.google-analytics.com/analytics.js'></script>
|
||||
<script async defer id="github-bjs" src="https://buttons.github.io/buttons.js"></script>
|
||||
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script>
|
||||
<script src="https://sidecar.gitter.im/dist/sidecar.v1.js" async defer></script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,324 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<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/pygments.css">
|
||||
<link rel="shortcut icon" href="../../../../../static/favicon.png?h=fa09bedd">
|
||||
<title>get | Documentation | Lektor Static Content Management System</title>
|
||||
</head>
|
||||
<body class="default">
|
||||
<nav class="navbar navbar-inverse navbar-static-top">
|
||||
<div class="container">
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle collapsed"
|
||||
data-toggle="collapse" data-target="#navbar"
|
||||
aria-expanded="false" aria-controls="navbar">
|
||||
<span class="sr-only">Toggle navigation</span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<a class="navbar-brand" href="../../../../../">Lektor</a>
|
||||
</div>
|
||||
<div id="navbar" class="collapse navbar-collapse">
|
||||
<ul class="nav navbar-nav">
|
||||
|
||||
<li><a href="../../../../../downloads/">Download</a></li>
|
||||
|
||||
<li class="active"><a href="../../../../">Documentation</a></li>
|
||||
|
||||
<li><a href="../../../../../showcase/">Showcase</a></li>
|
||||
|
||||
<li><a href="../../../../../plugins/">Plugins</a></li>
|
||||
|
||||
<li><a href="../../../../../community/">Community</a></li>
|
||||
|
||||
<li><a href="../../../../../blog/">Blog</a></li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<div class="body-wrapper">
|
||||
|
||||
<div class="container">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-3">
|
||||
<ul class="tree-nav nocontent">
|
||||
<li><a href="../../../../">Welcome</a></li>
|
||||
|
||||
|
||||
<li><a href="../../../../what/">What is Lektor</a>
|
||||
|
||||
|
||||
<li><a href="../../../../installation/">Installation</a>
|
||||
|
||||
|
||||
<li><a href="../../../../quickstart/">Quickstart</a>
|
||||
|
||||
|
||||
<li><a href="../../../../project/">Project</a>
|
||||
|
||||
|
||||
<li><a href="../../../../content/">Content</a>
|
||||
|
||||
|
||||
<li><a href="../../../../templates/">Templates</a>
|
||||
|
||||
|
||||
<li><a href="../../../../themes/">Themes</a>
|
||||
|
||||
|
||||
<li><a href="../../../../guides/">Guides</a>
|
||||
|
||||
|
||||
<li><a href="../../../../deployment/">Deployment</a>
|
||||
|
||||
|
||||
<li><a href="../../../../plugins/">Plugins</a>
|
||||
|
||||
|
||||
<li><a href="../../../../models/">Data Modelling</a>
|
||||
|
||||
|
||||
<li><a href="../../../../cli/">Command Line</a>
|
||||
|
||||
|
||||
<li><a href="../../../">API</a>
|
||||
|
||||
<ul>
|
||||
<li><a href="../../../build/">Build System</a>
|
||||
|
||||
|
||||
<li><a href="../../../databags/">Databags</a>
|
||||
|
||||
|
||||
<li><a href="../../">Database</a>
|
||||
|
||||
<ul>
|
||||
<li><a href="../../types/">Builtin Field Types</a>
|
||||
|
||||
|
||||
<li><a href="../../expression/">Expression</a>
|
||||
|
||||
|
||||
<li><a href="../../f/">F</a>
|
||||
|
||||
|
||||
<li><a href="../../get-alts/">get_alts()</a>
|
||||
|
||||
|
||||
<li><a href="../">Pad</a>
|
||||
|
||||
<ul>
|
||||
<li><a href="../databags/">databags</a>
|
||||
|
||||
|
||||
<li class="active"><a href="./">get()</a>
|
||||
|
||||
<ul></ul>
|
||||
|
||||
|
||||
<li><a href="../get-root/">get_root()</a>
|
||||
|
||||
|
||||
<li><a href="../query/">query()</a>
|
||||
|
||||
|
||||
<li><a href="../resolve-url-path/">resolve_url_path()</a>
|
||||
|
||||
|
||||
<li><a href="../root/">root</a>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<li><a href="../../query/">Query</a>
|
||||
|
||||
|
||||
<li><a href="../../record/">Record</a>
|
||||
|
||||
|
||||
<li><a href="../../obj/">SourceObject</a>
|
||||
|
||||
|
||||
<li><a href="../../system-fields/">System Fields</a>
|
||||
|
||||
|
||||
<li><a href="../../type/">Type</a>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<li><a href="../../../environment/">Environment</a>
|
||||
|
||||
|
||||
<li><a href="../../../plugins/">Plugins</a>
|
||||
|
||||
|
||||
<li><a href="../../../project/">Project</a>
|
||||
|
||||
|
||||
<li><a href="../../../publisher/">Publisher</a>
|
||||
|
||||
|
||||
<li><a href="../../../templates/">Template API</a>
|
||||
|
||||
|
||||
<li><a href="../../../utils/">Utilities</a>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<li><a href="../../../../search/">Search</a>
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<div class="visible-md-block visible-lg-block">
|
||||
<h4>This Page</h4>
|
||||
<ul class="toc">
|
||||
|
||||
<li><a href="#examples">Examples</a></li>
|
||||
|
||||
<li><a href="#virtual-paths">Virtual Paths</a></li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-sm-9 doc-styling">
|
||||
|
||||
|
||||
<h1><i class="glyphicon glyphicon-cog"></i> <code class="obj">get</code> <span class="sig">(<code>id, alt='_primary', page_num=None</code>)</span></h1>
|
||||
|
||||
|
||||
|
||||
<ul class=page-meta>
|
||||
|
||||
<li>Method of <a href="../">Pad</a></li>
|
||||
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
<p>This can look up a single <a href="../../record/" class="ref">Record</a> and return it. In templates this method
|
||||
is particularly useful when having to work with other pages that are well
|
||||
known to the system but some information should be pulled from. Note that
|
||||
this loads by default the "primary" <a href="../../../../content/alts/" class="ref">Alternative</a>.</p>
|
||||
<p>The path needs to be absolute with folder separated by slashes.</p>
|
||||
<p>The default behavior is to load the unpaginated version of a record. If you
|
||||
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">'/'</span><span class="o">)</span> <span class="cp">%}</span>
|
||||
<span class="p"><</span><span class="nt">title</span><span class="p">></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"></</span><span class="nt">title</span><span class="p">></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">'ru'</span><span class="o">)</span> <span class="cp">%}</span>
|
||||
<span class="p"><</span><span class="nt">p</span><span class="p">></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">>>> </span><span class="n">pad</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s1">'/blog@3'</span><span class="p">)</span>
|
||||
<span class="go"><Page model=u'blog' path='/blog' page_num=3></span>
|
||||
</pre></div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="comment-box">
|
||||
<h2>Comments</h2>
|
||||
|
||||
<div id="disqus_thread"></div>
|
||||
<script>
|
||||
var disqus_config = function() { this.page.identifier = "/docs/api/db/pad/get"; this.page.url = "https://www.getlektor.com/docs/api/db/pad/get/"; };
|
||||
(function() {
|
||||
var d = document, s = d.createElement('script');
|
||||
s.src = '//lektordocumentation.disqus.com/embed.js';
|
||||
s.setAttribute('data-timestamp', +new Date());
|
||||
(d.head || d.body).appendChild(s);
|
||||
})();
|
||||
</script>
|
||||
<noscript>
|
||||
Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript"
|
||||
rel="nofollow">comments powered by Disqus.</a>
|
||||
</noscript>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="bottomsummary">
|
||||
<div class="container">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<footer>
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-sm-4 icon-bar">
|
||||
<a href="https://github.com/lektor/lektor/" title="Lektor on GitHub"
|
||||
><i class="fa fa-github"></i></a>
|
||||
<a href="https://github.com/lektor/lektor/issues/" title="Report Issues for Lektor"
|
||||
><i class="fa fa-bug"></i></a>
|
||||
<a href="https://twitter.com/getlektor" title="Find Lektor on Twitter"
|
||||
><i class="fa fa-twitter"></i></a>
|
||||
<a href="https://gitter.im/lektor/lektor" title="Chat on Gitter"
|
||||
><i class="fa fa-comment"></i></a>
|
||||
<a href="https://github.com/lektor/lektor-website/tree/master/content/docs/api/db/pad/get/contents.lr" title="View source for this page"><i class="fa fa-code"></i></a>
|
||||
</div>
|
||||
<div class="col-sm-8">
|
||||
<a href="../../../../../license/">License & Copyright</a> •
|
||||
<a href="../../../../../contact/">Contact</a> •
|
||||
Made with <i class="fa fa-fw fa-heart" title="Heart"><span hidden>Heart</span></i> in Carinthia
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
|
||||
<script type=text/javascript src="../../../../../static/app.js?h=bb1b933a" charset="utf-8"></script>
|
||||
<script>
|
||||
((window.gitter = {}).chat = {}).options = {
|
||||
room: 'lektor/lektor',
|
||||
activationElement: null
|
||||
};
|
||||
document.write('<button class="js-gitter-toggle-chat-button">Toggle Chat</button>');
|
||||
var dnt = navigator.doNotTrack || window.doNotTrack || navigator.msDoNotTrack;
|
||||
if (dnt != "1" && dnt != "yes") {
|
||||
window.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments)};ga.l=+new Date;
|
||||
ga('create', 'UA-70822533-1', 'auto');
|
||||
ga('set', 'anonymizeIp', true);
|
||||
ga('send', 'pageview');
|
||||
} else {
|
||||
console.debug("Respecting Do-Not-Track, not running analytics.");
|
||||
}
|
||||
</script>
|
||||
<script async src='https://www.google-analytics.com/analytics.js'></script>
|
||||
<script async defer id="github-bjs" src="https://buttons.github.io/buttons.js"></script>
|
||||
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script>
|
||||
<script src="https://sidecar.gitter.im/dist/sidecar.v1.js" async defer></script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,416 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<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/pygments.css">
|
||||
<link rel="shortcut icon" href="../../../../static/favicon.png?h=fa09bedd">
|
||||
<title>Pad | Documentation | Lektor Static Content Management System</title>
|
||||
</head>
|
||||
<body class="default">
|
||||
<nav class="navbar navbar-inverse navbar-static-top">
|
||||
<div class="container">
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle collapsed"
|
||||
data-toggle="collapse" data-target="#navbar"
|
||||
aria-expanded="false" aria-controls="navbar">
|
||||
<span class="sr-only">Toggle navigation</span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<a class="navbar-brand" href="../../../../">Lektor</a>
|
||||
</div>
|
||||
<div id="navbar" class="collapse navbar-collapse">
|
||||
<ul class="nav navbar-nav">
|
||||
|
||||
<li><a href="../../../../downloads/">Download</a></li>
|
||||
|
||||
<li class="active"><a href="../../../">Documentation</a></li>
|
||||
|
||||
<li><a href="../../../../showcase/">Showcase</a></li>
|
||||
|
||||
<li><a href="../../../../plugins/">Plugins</a></li>
|
||||
|
||||
<li><a href="../../../../community/">Community</a></li>
|
||||
|
||||
<li><a href="../../../../blog/">Blog</a></li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<div class="body-wrapper">
|
||||
|
||||
<div class="container">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-3">
|
||||
<ul class="tree-nav nocontent">
|
||||
<li><a href="../../../">Welcome</a></li>
|
||||
|
||||
|
||||
<li><a href="../../../what/">What is Lektor</a>
|
||||
|
||||
|
||||
<li><a href="../../../installation/">Installation</a>
|
||||
|
||||
|
||||
<li><a href="../../../quickstart/">Quickstart</a>
|
||||
|
||||
|
||||
<li><a href="../../../project/">Project</a>
|
||||
|
||||
|
||||
<li><a href="../../../content/">Content</a>
|
||||
|
||||
|
||||
<li><a href="../../../templates/">Templates</a>
|
||||
|
||||
|
||||
<li><a href="../../../themes/">Themes</a>
|
||||
|
||||
|
||||
<li><a href="../../../guides/">Guides</a>
|
||||
|
||||
|
||||
<li><a href="../../../deployment/">Deployment</a>
|
||||
|
||||
|
||||
<li><a href="../../../plugins/">Plugins</a>
|
||||
|
||||
|
||||
<li><a href="../../../models/">Data Modelling</a>
|
||||
|
||||
|
||||
<li><a href="../../../cli/">Command Line</a>
|
||||
|
||||
|
||||
<li><a href="../../">API</a>
|
||||
|
||||
<ul>
|
||||
<li><a href="../../build/">Build System</a>
|
||||
|
||||
|
||||
<li><a href="../../databags/">Databags</a>
|
||||
|
||||
|
||||
<li><a href="../">Database</a>
|
||||
|
||||
<ul>
|
||||
<li><a href="../types/">Builtin Field Types</a>
|
||||
|
||||
|
||||
<li><a href="../expression/">Expression</a>
|
||||
|
||||
|
||||
<li><a href="../f/">F</a>
|
||||
|
||||
|
||||
<li><a href="../get-alts/">get_alts()</a>
|
||||
|
||||
|
||||
<li class="active"><a href="./">Pad</a>
|
||||
|
||||
<ul>
|
||||
<li><a href="databags/">databags</a>
|
||||
|
||||
|
||||
<li><a href="get/">get()</a>
|
||||
|
||||
|
||||
<li><a href="get-root/">get_root()</a>
|
||||
|
||||
|
||||
<li><a href="query/">query()</a>
|
||||
|
||||
|
||||
<li><a href="resolve-url-path/">resolve_url_path()</a>
|
||||
|
||||
|
||||
<li><a href="root/">root</a>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<li><a href="../query/">Query</a>
|
||||
|
||||
|
||||
<li><a href="../record/">Record</a>
|
||||
|
||||
|
||||
<li><a href="../obj/">SourceObject</a>
|
||||
|
||||
|
||||
<li><a href="../system-fields/">System Fields</a>
|
||||
|
||||
|
||||
<li><a href="../type/">Type</a>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<li><a href="../../environment/">Environment</a>
|
||||
|
||||
|
||||
<li><a href="../../plugins/">Plugins</a>
|
||||
|
||||
|
||||
<li><a href="../../project/">Project</a>
|
||||
|
||||
|
||||
<li><a href="../../publisher/">Publisher</a>
|
||||
|
||||
|
||||
<li><a href="../../templates/">Template API</a>
|
||||
|
||||
|
||||
<li><a href="../../utils/">Utilities</a>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<li><a href="../../../search/">Search</a>
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<div class="visible-md-block visible-lg-block">
|
||||
<h4>This Page</h4>
|
||||
<ul class="toc">
|
||||
|
||||
<li><a href="#template-usage">Template Usage</a></li>
|
||||
|
||||
<li><a href="#plugin-usage">Plugin Usage</a></li>
|
||||
|
||||
<li><a href="#manual-pad-creation">Manual Pad Creation</a></li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-sm-9 doc-styling">
|
||||
|
||||
|
||||
<h1><i class="glyphicon glyphicon-leaf"></i> <code class="mod">lektor.db.</code><code class="obj">Pad</code></h1>
|
||||
|
||||
|
||||
|
||||
<ul class=page-meta>
|
||||
|
||||
|
||||
<li>Template variable: <a href="../../templates/globals/site/"><code>site</code></a></li>
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
<p>The <code>Pad</code> is a helper class that provides basic access to querying the
|
||||
database. Inside templates an instance of it is available under the
|
||||
<code>site</code> variable automatically.</p>
|
||||
<p>To understand what the pad does you need to consider what it is. The
|
||||
pad is similar to a <code>connection</code> in a regular database. Whenever you
|
||||
load a record it's temporarily cached on the pad. So unless you overflow
|
||||
the cache, loading the object a second time will most likely return an
|
||||
already loaded instance from the pad. This also means that the pad
|
||||
is not threadsafe. So if you want (for whatever reason) use multiple
|
||||
threads you have to create a separate pad for each thread.</p>
|
||||
<p>This typically only comes up in the context of plugins or more complex
|
||||
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">'/'</span><span class="o">)</span> <span class="cp">%}</span>
|
||||
<span class="p"><</span><span class="nt">title</span><span class="p">></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"></</span><span class="nt">title</span><span class="p">></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>
|
||||
|
||||
<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>
|
||||
<span class="n">pad</span> <span class="o">=</span> <span class="n">get_ctx</span><span class="p">()</span><span class="o">.</span><span class="n">pad</span>
|
||||
</pre></div>
|
||||
<p>Note that you can only get access to a pad if a context is available. This
|
||||
will not be the case when the plugin is currently being initialized for
|
||||
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>
|
||||
|
||||
<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>
|
||||
<span class="n">pad</span> <span class="o">=</span> <span class="n">env</span><span class="o">.</span><span class="n">new_pad</span><span class="p">()</span>
|
||||
<span class="n">root_record</span> <span class="o">=</span> <span class="n">pad</span><span class="o">.</span><span class="n">root</span>
|
||||
</pre></div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="child-pages nocontent">
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-6 child">
|
||||
<h4>
|
||||
<i class="glyphicon glyphicon-info-sign"></i>
|
||||
<a href="databags/">databags</a>
|
||||
</h4>
|
||||
|
||||
<p class="summary">Provides access to the databags system.</p>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-md-6 child">
|
||||
<h4>
|
||||
<i class="glyphicon glyphicon-cog"></i>
|
||||
<a href="get/">get()</a>
|
||||
</h4>
|
||||
|
||||
<p class="summary">Loads a single record.</p>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-6 child">
|
||||
<h4>
|
||||
<i class="glyphicon glyphicon-cog"></i>
|
||||
<a href="get-root/">get_root()</a>
|
||||
</h4>
|
||||
|
||||
<p class="summary">Returns the root object of a specific alternative.</p>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-md-6 child">
|
||||
<h4>
|
||||
<i class="glyphicon glyphicon-cog"></i>
|
||||
<a href="query/">query()</a>
|
||||
</h4>
|
||||
|
||||
<p class="summary">Creates a query at a specific path.</p>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-6 child">
|
||||
<h4>
|
||||
<i class="glyphicon glyphicon-cog"></i>
|
||||
<a href="resolve-url-path/">resolve_url_path()</a>
|
||||
</h4>
|
||||
|
||||
<p class="summary">Resolves a URL path to a into a source object.</p>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-md-6 child">
|
||||
<h4>
|
||||
<i class="glyphicon glyphicon-info-sign"></i>
|
||||
<a href="root/">root</a>
|
||||
</h4>
|
||||
|
||||
<p class="summary">Returns the root object of the primary alternative.</p>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="comment-box">
|
||||
<h2>Comments</h2>
|
||||
|
||||
<div id="disqus_thread"></div>
|
||||
<script>
|
||||
var disqus_config = function() { this.page.identifier = "/docs/api/db/pad"; this.page.url = "https://www.getlektor.com/docs/api/db/pad/"; };
|
||||
(function() {
|
||||
var d = document, s = d.createElement('script');
|
||||
s.src = '//lektordocumentation.disqus.com/embed.js';
|
||||
s.setAttribute('data-timestamp', +new Date());
|
||||
(d.head || d.body).appendChild(s);
|
||||
})();
|
||||
</script>
|
||||
<noscript>
|
||||
Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript"
|
||||
rel="nofollow">comments powered by Disqus.</a>
|
||||
</noscript>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="bottomsummary">
|
||||
<div class="container">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<footer>
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-sm-4 icon-bar">
|
||||
<a href="https://github.com/lektor/lektor/" title="Lektor on GitHub"
|
||||
><i class="fa fa-github"></i></a>
|
||||
<a href="https://github.com/lektor/lektor/issues/" title="Report Issues for Lektor"
|
||||
><i class="fa fa-bug"></i></a>
|
||||
<a href="https://twitter.com/getlektor" title="Find Lektor on Twitter"
|
||||
><i class="fa fa-twitter"></i></a>
|
||||
<a href="https://gitter.im/lektor/lektor" title="Chat on Gitter"
|
||||
><i class="fa fa-comment"></i></a>
|
||||
<a href="https://github.com/lektor/lektor-website/tree/master/content/docs/api/db/pad/contents.lr" title="View source for this page"><i class="fa fa-code"></i></a>
|
||||
</div>
|
||||
<div class="col-sm-8">
|
||||
<a href="../../../../license/">License & Copyright</a> •
|
||||
<a href="../../../../contact/">Contact</a> •
|
||||
Made with <i class="fa fa-fw fa-heart" title="Heart"><span hidden>Heart</span></i> in Carinthia
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
|
||||
<script type=text/javascript src="../../../../static/app.js?h=bb1b933a" charset="utf-8"></script>
|
||||
<script>
|
||||
((window.gitter = {}).chat = {}).options = {
|
||||
room: 'lektor/lektor',
|
||||
activationElement: null
|
||||
};
|
||||
document.write('<button class="js-gitter-toggle-chat-button">Toggle Chat</button>');
|
||||
var dnt = navigator.doNotTrack || window.doNotTrack || navigator.msDoNotTrack;
|
||||
if (dnt != "1" && dnt != "yes") {
|
||||
window.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments)};ga.l=+new Date;
|
||||
ga('create', 'UA-70822533-1', 'auto');
|
||||
ga('set', 'anonymizeIp', true);
|
||||
ga('send', 'pageview');
|
||||
} else {
|
||||
console.debug("Respecting Do-Not-Track, not running analytics.");
|
||||
}
|
||||
</script>
|
||||
<script async src='https://www.google-analytics.com/analytics.js'></script>
|
||||
<script async defer id="github-bjs" src="https://buttons.github.io/buttons.js"></script>
|
||||
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script>
|
||||
<script src="https://sidecar.gitter.im/dist/sidecar.v1.js" async defer></script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,309 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<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/pygments.css">
|
||||
<link rel="shortcut icon" href="../../../../../static/favicon.png?h=fa09bedd">
|
||||
<title>query | Documentation | Lektor Static Content Management System</title>
|
||||
</head>
|
||||
<body class="default">
|
||||
<nav class="navbar navbar-inverse navbar-static-top">
|
||||
<div class="container">
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle collapsed"
|
||||
data-toggle="collapse" data-target="#navbar"
|
||||
aria-expanded="false" aria-controls="navbar">
|
||||
<span class="sr-only">Toggle navigation</span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<a class="navbar-brand" href="../../../../../">Lektor</a>
|
||||
</div>
|
||||
<div id="navbar" class="collapse navbar-collapse">
|
||||
<ul class="nav navbar-nav">
|
||||
|
||||
<li><a href="../../../../../downloads/">Download</a></li>
|
||||
|
||||
<li class="active"><a href="../../../../">Documentation</a></li>
|
||||
|
||||
<li><a href="../../../../../showcase/">Showcase</a></li>
|
||||
|
||||
<li><a href="../../../../../plugins/">Plugins</a></li>
|
||||
|
||||
<li><a href="../../../../../community/">Community</a></li>
|
||||
|
||||
<li><a href="../../../../../blog/">Blog</a></li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<div class="body-wrapper">
|
||||
|
||||
<div class="container">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-3">
|
||||
<ul class="tree-nav nocontent">
|
||||
<li><a href="../../../../">Welcome</a></li>
|
||||
|
||||
|
||||
<li><a href="../../../../what/">What is Lektor</a>
|
||||
|
||||
|
||||
<li><a href="../../../../installation/">Installation</a>
|
||||
|
||||
|
||||
<li><a href="../../../../quickstart/">Quickstart</a>
|
||||
|
||||
|
||||
<li><a href="../../../../project/">Project</a>
|
||||
|
||||
|
||||
<li><a href="../../../../content/">Content</a>
|
||||
|
||||
|
||||
<li><a href="../../../../templates/">Templates</a>
|
||||
|
||||
|
||||
<li><a href="../../../../themes/">Themes</a>
|
||||
|
||||
|
||||
<li><a href="../../../../guides/">Guides</a>
|
||||
|
||||
|
||||
<li><a href="../../../../deployment/">Deployment</a>
|
||||
|
||||
|
||||
<li><a href="../../../../plugins/">Plugins</a>
|
||||
|
||||
|
||||
<li><a href="../../../../models/">Data Modelling</a>
|
||||
|
||||
|
||||
<li><a href="../../../../cli/">Command Line</a>
|
||||
|
||||
|
||||
<li><a href="../../../">API</a>
|
||||
|
||||
<ul>
|
||||
<li><a href="../../../build/">Build System</a>
|
||||
|
||||
|
||||
<li><a href="../../../databags/">Databags</a>
|
||||
|
||||
|
||||
<li><a href="../../">Database</a>
|
||||
|
||||
<ul>
|
||||
<li><a href="../../types/">Builtin Field Types</a>
|
||||
|
||||
|
||||
<li><a href="../../expression/">Expression</a>
|
||||
|
||||
|
||||
<li><a href="../../f/">F</a>
|
||||
|
||||
|
||||
<li><a href="../../get-alts/">get_alts()</a>
|
||||
|
||||
|
||||
<li><a href="../">Pad</a>
|
||||
|
||||
<ul>
|
||||
<li><a href="../databags/">databags</a>
|
||||
|
||||
|
||||
<li><a href="../get/">get()</a>
|
||||
|
||||
|
||||
<li><a href="../get-root/">get_root()</a>
|
||||
|
||||
|
||||
<li class="active"><a href="./">query()</a>
|
||||
|
||||
<ul></ul>
|
||||
|
||||
|
||||
<li><a href="../resolve-url-path/">resolve_url_path()</a>
|
||||
|
||||
|
||||
<li><a href="../root/">root</a>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<li><a href="../../query/">Query</a>
|
||||
|
||||
|
||||
<li><a href="../../record/">Record</a>
|
||||
|
||||
|
||||
<li><a href="../../obj/">SourceObject</a>
|
||||
|
||||
|
||||
<li><a href="../../system-fields/">System Fields</a>
|
||||
|
||||
|
||||
<li><a href="../../type/">Type</a>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<li><a href="../../../environment/">Environment</a>
|
||||
|
||||
|
||||
<li><a href="../../../plugins/">Plugins</a>
|
||||
|
||||
|
||||
<li><a href="../../../project/">Project</a>
|
||||
|
||||
|
||||
<li><a href="../../../publisher/">Publisher</a>
|
||||
|
||||
|
||||
<li><a href="../../../templates/">Template API</a>
|
||||
|
||||
|
||||
<li><a href="../../../utils/">Utilities</a>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<li><a href="../../../../search/">Search</a>
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<div class="visible-md-block visible-lg-block">
|
||||
<h4>This Page</h4>
|
||||
<ul class="toc">
|
||||
|
||||
<li><a href="#example">Example</a></li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-sm-9 doc-styling">
|
||||
|
||||
|
||||
<h1><i class="glyphicon glyphicon-cog"></i> <code class="obj">query</code> <span class="sig">(<code>path=None, alt='_primary'</code>)</span></h1>
|
||||
|
||||
|
||||
|
||||
<ul class=page-meta>
|
||||
|
||||
<li>Method of <a href="../">Pad</a></li>
|
||||
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
<p>This is one of the many ways to create a <a href="../../query/" class="ref">Query</a> object in
|
||||
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"><</span><span class="nt">ul</span><span class="p">></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">'/projects'</span><span class="o">)</span> <span class="cp">%}</span>
|
||||
<span class="p"><</span><span class="nt">li</span><span class="p">></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"></</span><span class="nt">li</span><span class="p">></span>
|
||||
<span class="cp">{%</span> <span class="k">endfor</span> <span class="cp">%}</span>
|
||||
<span class="p"></</span><span class="nt">ul</span><span class="p">></span>
|
||||
</pre></div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="comment-box">
|
||||
<h2>Comments</h2>
|
||||
|
||||
<div id="disqus_thread"></div>
|
||||
<script>
|
||||
var disqus_config = function() { this.page.identifier = "/docs/api/db/pad/query"; this.page.url = "https://www.getlektor.com/docs/api/db/pad/query/"; };
|
||||
(function() {
|
||||
var d = document, s = d.createElement('script');
|
||||
s.src = '//lektordocumentation.disqus.com/embed.js';
|
||||
s.setAttribute('data-timestamp', +new Date());
|
||||
(d.head || d.body).appendChild(s);
|
||||
})();
|
||||
</script>
|
||||
<noscript>
|
||||
Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript"
|
||||
rel="nofollow">comments powered by Disqus.</a>
|
||||
</noscript>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="bottomsummary">
|
||||
<div class="container">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<footer>
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-sm-4 icon-bar">
|
||||
<a href="https://github.com/lektor/lektor/" title="Lektor on GitHub"
|
||||
><i class="fa fa-github"></i></a>
|
||||
<a href="https://github.com/lektor/lektor/issues/" title="Report Issues for Lektor"
|
||||
><i class="fa fa-bug"></i></a>
|
||||
<a href="https://twitter.com/getlektor" title="Find Lektor on Twitter"
|
||||
><i class="fa fa-twitter"></i></a>
|
||||
<a href="https://gitter.im/lektor/lektor" title="Chat on Gitter"
|
||||
><i class="fa fa-comment"></i></a>
|
||||
<a href="https://github.com/lektor/lektor-website/tree/master/content/docs/api/db/pad/query/contents.lr" title="View source for this page"><i class="fa fa-code"></i></a>
|
||||
</div>
|
||||
<div class="col-sm-8">
|
||||
<a href="../../../../../license/">License & Copyright</a> •
|
||||
<a href="../../../../../contact/">Contact</a> •
|
||||
Made with <i class="fa fa-fw fa-heart" title="Heart"><span hidden>Heart</span></i> in Carinthia
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
|
||||
<script type=text/javascript src="../../../../../static/app.js?h=bb1b933a" charset="utf-8"></script>
|
||||
<script>
|
||||
((window.gitter = {}).chat = {}).options = {
|
||||
room: 'lektor/lektor',
|
||||
activationElement: null
|
||||
};
|
||||
document.write('<button class="js-gitter-toggle-chat-button">Toggle Chat</button>');
|
||||
var dnt = navigator.doNotTrack || window.doNotTrack || navigator.msDoNotTrack;
|
||||
if (dnt != "1" && dnt != "yes") {
|
||||
window.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments)};ga.l=+new Date;
|
||||
ga('create', 'UA-70822533-1', 'auto');
|
||||
ga('set', 'anonymizeIp', true);
|
||||
ga('send', 'pageview');
|
||||
} else {
|
||||
console.debug("Respecting Do-Not-Track, not running analytics.");
|
||||
}
|
||||
</script>
|
||||
<script async src='https://www.google-analytics.com/analytics.js'></script>
|
||||
<script async defer id="github-bjs" src="https://buttons.github.io/buttons.js"></script>
|
||||
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script>
|
||||
<script src="https://sidecar.gitter.im/dist/sidecar.v1.js" async defer></script>
|
||||
</body>
|
||||
</html>
|