Merge branch 'master' into update-package-json-in-webpack-guide

This commit is contained in:
Raphael Pierzina 2017-02-21 22:15:04 +00:00
commit 6fa33d56e4
12 changed files with 19 additions and 12 deletions

View File

@ -6,7 +6,7 @@ type: property
--- ---
body: body:
Because of Lektor's tree based nature it almost all records can have children Because of Lektor's tree based nature almost all records can have children
below them. The `children` attribute provides a convenient way to access below them. The `children` attribute provides a convenient way to access
those. It returns a [Query :ref](../../query/) object that can be used to those. It returns a [Query :ref](../../query/) object that can be used to
further filter down children. further filter down children.

View File

@ -9,7 +9,7 @@ type: class
body: body:
Records are [Source Objects :ref](../obj/) that come from the `content/` Records are [Source Objects :ref](../obj/) that come from the `content/`
folder and correspond to [Data Models :ref](../../../models/). The provide folder and correspond to [Data Models :ref](../../../models/). They provide
a wider range of functionality compared to a standard source object but a wider range of functionality compared to a standard source object but
they also provide all the functionality a regular source object does. they also provide all the functionality a regular source object does.

View File

@ -38,6 +38,8 @@ into a dictionary that can be dumped to JSON for instance.
| `latitude` | The longitude as floating point value. | `latitude` | The longitude as floating point value.
| `longitude` | The longitude as floating point value. | `longitude` | The longitude as floating point value.
| `altitude` | The altitude in meters as floating point value. | `altitude` | The altitude in meters as floating point value.
| `documentname` | The image document name as a string.
| `description` | The image description as a string.
## Example ## Example

View File

@ -10,7 +10,7 @@ body:
`lektor plugins add NAME` `lektor plugins add NAME`
This command can add a new plugion to the project. If just given This command can add a new plugin to the project. If just given
the name of the plugin the latest version of that plugin is added to the name of the plugin the latest version of that plugin is added to
the project. the project.

View File

@ -75,7 +75,7 @@ targeted, different files will be used. This table visualizes this:
## Alternatives and Paths ## Alternatives and Paths
Alternatives have a special behavior with regards to paths. They alternative Alternatives have a special behavior with regards to paths. The alternative
code does not exist in the path! This can be confusing at first, but has the code does not exist in the path! This can be confusing at first, but has the
advantage that they automatically work in most places as the paths are the advantage that they automatically work in most places as the paths are the
same for different alternatives. For more information see same for different alternatives. For more information see

View File

@ -32,7 +32,7 @@ target = ftps://myuser:mypassword@ftp.example.com/var/www/example
## Credentials ## Credentials
FTP is considered a largely insecure protocol for Lektor. As such if you FTP is considered a largely insecure protocol for Lektor. As such if you
want to use it you should keep your project file save as credentials will want to use it you should keep your project file safe as credentials will
be most likely embedded there. Alternatively you can set the credentials be most likely embedded there. Alternatively you can set the credentials
via the command line with the `--username` and `--password` option (or via the via the command line with the `--username` and `--password` option (or via the
environment variables `LEKTOR_DEPLOY_USERNAME` and `LEKTOR_DEPLOY_PASSWORD`) environment variables `LEKTOR_DEPLOY_USERNAME` and `LEKTOR_DEPLOY_PASSWORD`)

View File

@ -44,15 +44,18 @@ with behavior for GitHub Pages.
## CNAME Support ## CNAME Support
If you want to use a [CNAME :ext](https://en.wikipedia.org/wiki/CNAME) with If you want to use a custom domain with GitHub pages (also known as a
GitHub pages and Lektor you can provide the intended CNAME with the `?cname` [CNAME :ext](https://en.wikipedia.org/wiki/CNAME)), provide the intended
parameter: CNAME in the target URL using the `?cname` parameter:
```ini ```ini
[servers.production] [servers.production]
target = ghpages://your-user/your-repository?cname=www.example.com target = ghpages://your-user/your-repository?cname=www.example.com
``` ```
Note that this will overwrite whatever custom domain you may have set on
GitHub with every deployment.
For more information about how CNAMEs work with GitHub you can read about For more information about how CNAMEs work with GitHub you can read about
the feature in the GitHub help center: the feature in the GitHub help center:
[Adding a CNAME file to your repository [Adding a CNAME file to your repository

View File

@ -36,7 +36,7 @@ For more information about this you can read the [Project File Documentation
## Creating an Error Page ## Creating an Error Page
You can create easy create a 404 page by creating a `404.html/contents.lr` You can easily add a 404 page by creating a `404.html/contents.lr`
file. If you do not care much about the contents and structure of the file file. If you do not care much about the contents and structure of the file
you can just point it to an empty model (`none`) and manually select a you can just point it to an empty model (`none`) and manually select a
`404.html` template like this: `404.html` template like this:

View File

@ -93,7 +93,7 @@ _model: doc-pages
_hidden: yes _hidden: yes
``` ```
This will set up our index model and our doc-pages model for the `docs/` This will set up our index model and our doc-pages model for the `doc/`
folder. The latter is also set to `_hidden` which will make Lektor prevent folder. The latter is also set to `_hidden` which will make Lektor prevent
the generation of those files: they are invisible. So we need to find other the generation of those files: they are invisible. So we need to find other
ways to render them. ways to render them.

View File

@ -89,7 +89,7 @@ Models have the following options that can customize the model itself:
This is very useful for models that are implied through configuration. This is very useful for models that are implied through configuration.
- `protected`: if a model is set to protected then all of its instances - `protected`: if a model is set to protected then all of its instances
cannot be deleted once created. cannot be deleted once created.
- `inherits`: if you want to inherit all fields from another model then this - `inherits`: if you want to inherit all fields and model option settings from another model then this
can be set to the name of another model. can be set to the name of another model.
In addition to that, there are some configuration sections in the model file In addition to that, there are some configuration sections in the model file

View File

@ -37,6 +37,7 @@ so they might not keep pace with development on Lektor.
* [github-repos :ext](https://github.com/marksteve/lektor-github-repos): * [github-repos :ext](https://github.com/marksteve/lektor-github-repos):
fetches your GitHub repos for display in Lektor templates fetches your GitHub repos for display in Lektor templates
* [google-analytics :ext](https://github.com/kmonsoor/lektor-google-analytics): Adds `Google Analytics` support to Lektor-generated site. * [google-analytics :ext](https://github.com/kmonsoor/lektor-google-analytics): Adds `Google Analytics` support to Lektor-generated site.
* [yandex-metrica :ext](https://github.com/gagoman/lektor-yandex-metrica): Adds `Yandex Metrica` support to Lektor-generated site.
* [atom :ext](https://github.com/ajdavis/lektor-atom): Generate Atom feeds for your content. * [atom :ext](https://github.com/ajdavis/lektor-atom): Generate Atom feeds for your content.
* [surge :ext](https://github.com/ajdavis/lektor-surge): Publish your site to [Surge](https://surge.sh/). * [surge :ext](https://github.com/ajdavis/lektor-surge): Publish your site to [Surge](https://surge.sh/).
* [netlify :ext](https://github.com/ajdavis/lektor-netlify): Publish your site to [Netlify](https://www.netlify.com/). * [netlify :ext](https://github.com/ajdavis/lektor-netlify): Publish your site to [Netlify](https://www.netlify.com/).
@ -44,6 +45,7 @@ so they might not keep pace with development on Lektor.
* [i18n :ext](https://github.com/numericube/lektor-i18n-plugin): Use GetText .PO files to translate your site **content**. * [i18n :ext](https://github.com/numericube/lektor-i18n-plugin): Use GetText .PO files to translate your site **content**.
* [htmlmin :ext](https://github.com/vesuvium/lektor-htmlmin): Automatically minifies .html files in build directory * [htmlmin :ext](https://github.com/vesuvium/lektor-htmlmin): Automatically minifies .html files in build directory
* [creative-commons :ext](https://github.com/humrochagf/lektor-creative-commons): Add Creative Commons license to your pages * [creative-commons :ext](https://github.com/humrochagf/lektor-creative-commons): Add Creative Commons license to your pages
* [nofollow :ext](https://github.com/yargies/lektor-nofollow): Easily create nofollow links in markdown
! Have your own plugin and you want to see it here? Just [edit this page ! Have your own plugin and you want to see it here? Just [edit this page
on GitHub :ref](https://github.com/lektor/lektor-website/edit/master/content/docs/plugins/list/contents.lr), on GitHub :ref](https://github.com/lektor/lektor-website/edit/master/content/docs/plugins/list/contents.lr),

View File

@ -52,7 +52,7 @@ a page. This is easy to accomplish as well:
```html+jinja ```html+jinja
<nav> <nav>
<ul class="nav"> <ul class="nav">
{% for project in site.get('/projects') %} {% for project in site.get('/projects').children %}
<li{% if this == project %} class="active"{% endif <li{% if this == project %} class="active"{% endif
%}><a href="{{ project|url }}">{{ project.name }}</a></li> %}><a href="{{ project|url }}">{{ project.name }}</a></li>
{% endfor %} {% endfor %}