Merge branch 'pr/2'

This commit is contained in:
Armin Ronacher 2015-12-21 13:16:09 +01:00
commit cf1e4f5e2e
14 changed files with 31 additions and 30 deletions

View File

@ -22,6 +22,7 @@ The following attributes exist on the pagination object:
| `next` | The record for the net page (might be `None`)
| `total` | The total number of items across all pages
| `pages` | The total number of pages
| `page` | The number of current page
| `has_prev` | `True` if a previous page exists
| `has_next` | `True` if a next page exists
| `items` | The query that resolves to the children of the current page.

View File

@ -74,5 +74,5 @@ or more complex:
```
To see how the actual blocks are rendered have a look at the main
[Flow Documentation :ref](../../content/flow/) which covers templating
[Flow Documentation :ref](../../../../content/flow/) which covers templating
in detail.

View File

@ -12,7 +12,7 @@ or regions.
## Enabling Alternatives
To enable alternatives you need to extend your [Project File
:ref](../../project/). For each alternative a new
:ref](../../project/file/). For each alternative a new
section has to be added. It's important that one of the alternatives is
marked as "primary" which informs the system which of the alternatives is
the reference.

View File

@ -9,7 +9,7 @@ directly in the page folder and become available publicly.
## Attachment Types
For the most part Lektor does care much about what types your attachments
For the most part Lektor does not care much about what types your attachments
are but it will specially handle some. In particular image formats supported
by browsers have special support for automatic thumbnailing and accessing
basic image data.
@ -33,10 +33,10 @@ extra extension:
| sunset.jpeg | sunset.jpeg.lr
| code.py | code.py.lr
Attachments can be [given a default model :ref](../../models/#attachments) or
a model can be explicitly given in the content file with the `_model` field.
Attachments can be [given a default model :ref](../../models/attachments/) or
a model can be explicitly given in the metadata content file with the `_model` field.
Here a basic example:
Here is a basic example:
```
_model: image

View File

@ -46,7 +46,7 @@ the rendered end result will be at `/portfolio/project-a/`.
## Page, Model and Template
Each page is associated with a model and a template. Each page needs to have
a model that defines with fields exist. The template by default matches the
a model that defines which fields exist. The template by default matches the
model name but it can be overridden on a per-page basis.
So how is the model selected? Either expicitly in the `contents.lr` file

View File

@ -21,9 +21,9 @@ all parents.
Can a slug contain slashes? Yes indeed it can. A slug is free to contain
any slashes if it wants and they will be handled just as you expect. So it's
perfectly valid for a page to have `2015/5/demo` as slug. What's not possible
is for a page to pretent that it belongs to a different parent. The parent
paths are always added to it. So once the page is below `/foo` the URL path
will always begin with the URL path of the page `foo`.
is for a page to pretend that it belongs to a different parent. The parent
paths are always added to it. So once a page has a parent page `/foo`
its URL path will always begin with the URL path of the page `foo`.
## Slug Customization
@ -44,7 +44,7 @@ The second option is to use the `_slug` system field. This field is available
for all models automatically and overrides the slug explicitly. This is
particularly useful to force a slug that could not be represented on the file
system (for instance because it should contain a slash) or because you want
to change the slug for a different [Alternative :ref](../alternatives/). As
to change the slug for a different [Alternative :ref](../alts/). As
an example a page translated to German might want to translate the slug as well.
### Implied Slug Configuration
@ -103,7 +103,7 @@ You can pick the default for URL generation in the project configuration.
For more information read about the [Project Configuration
:ref](../../project/file/#[project]).
The default of `relative` a realtive URL style means that you can deploy a
The default of `relative`, a relative URL style, means that you can deploy a
website to a sub folder without any configuration, however most likely custom
404 pages will fail to find the needed assets. Fully canonical URLs are not
recommended as default style.

View File

@ -26,13 +26,13 @@ and then click on *Lektor ➤ Install Shell Command*.
If you do not want to install the desktop app you can just install the command
line executable. This one runs on more operating systems (OSX, Linux and
Windows) but that installation is a bit more involved.
Windows) but the installation is a bit more involved.
You need to make sure you have the following software installed on your computer:
* Python 2.7 (**not** Python 3.x)
* ImageMagick (`brew install imagemagick` or `apt-get install imagemagick`
can get you this on OS X and Ubuntu respectively, on Windows do `choco install imagemagick`, which requires [chocolatey](https://chocolatey.org/), or download from [here](http://www.imagemagick.org))
can get you this on OS X and Ubuntu respectively, on Windows do `choco install imagemagick`, which requires [chocolatey :ext](https://chocolatey.org/), or download from [here :ext](http://www.imagemagick.org))
Once you have that installed and made sure that they are on your `PATH` you can get Lektor installed with our
installation script:

View File

@ -48,7 +48,7 @@ panel.
## Fields
Fields for models are ordered in the UI in the order they appear in the model.
Most options in the field are specific to the type that is selectd, but some
Most options in the field are specific to the type that is selected, but some
are the same for all of them.
Fields not only define the behavior of the data (for instance strings and
@ -76,7 +76,7 @@ extensively in the [types documentation :ref](../api/db/types/).
## Model Options
Models have the following options that can cutomize the model itself:
Models have the following options that can customize the model itself:
- `name`: the name of the model itself. Usually a more capitalized form of
the filename which is the ID of the model.

View File

@ -4,9 +4,9 @@ summary: Explains how to model flow blocks.
---
body:
To use [Flow :ref](../../flow/) you need to define flow block models.
To use [Flow :ref](../../content/flow/) you need to define flow block models.
If you are not familiar with Flow yet, you should read the [Introduction
Documentation](../../flow/) to Flow first.
Documentation](../../content/flow/) to Flow first.
## Defining Models

View File

@ -17,7 +17,7 @@ name = My Fancy Project
The name of the file can be arbitrary but must have the `.lektorproject`
extension or Lektor will not be able to find it. When Lektor looks for a
project it looks upwards from the current folder until it finds a single
file with the `.lektorproject` extension then that's the root of the project.
file with the `.lektorproject` extension and that's then the root of the project.
## Config Sections

View File

@ -54,7 +54,7 @@ content/
thumbnail.png
```
The content folder is explained in detail in [Content :ref](../content/).
The content folder is explained in detail in [Content :ref](../../content/).
### `models/`
@ -62,7 +62,7 @@ This is the bread and butter of what makes Lektor powerful. The models define
exactly how the data from the content folder should be processed. The `models`
folder contains a list of INI files that each correspond to a single model.
For more information about this refer to the [Data Modelling :ref](../models/)
For more information about this refer to the [Data Modelling :ref](../../models/)
documentation.
### `templates/`
@ -80,8 +80,8 @@ files they will appear as such in the final output.
### `flowblocks/`
The `flowblocks` folder contains models for blocks that are used by the
[Flow System :ref](../content/flow/). Flow blocks split part of a page into
smaller pieces that can be individually designed. They work similar to models
[Flow System :ref](../../content/flow/). Flow blocks split a part of a page into
smaller pieces so that can be individually designed. They work similar to models
but are contained within a field of a model.
### `packages/`
@ -96,8 +96,8 @@ files in there are named `<plugin-id>.ini`.
### `databags/`
Lektor also supports [Data Bags :ref](../content/databags/) which go into a
Lektor also supports [Data Bags :ref](../../content/databags/) which go into a
folder named `databags/`. These are files with some general information
that can be accessed from templates. For instance you could store menus and
navigations there, API keys and much more. Just information you want to
access from different places and maybe not keep in templates directly.
navigations there, API keys and much more. This is generally just information
you want to access from different places and maybe not keep in templates directly.

View File

@ -38,7 +38,7 @@ evaluated in but the following are always available:
## The First Template
So let's dive in making our first template. In case you went through the
[Quickstart :ref](../quickstart/) which should give you an example model
[Quickstart :ref](../quickstart/) you should already have an example model
to work with called `page`, otherwise just add one with the format shown
in the [Data Modelling Documentation :ref](../models/).

View File

@ -60,7 +60,7 @@ Here an example that shows the camera information:
While browsers are reasonably good at downscaling images themselves, you
still need to transmit the entire image. When you want smaller images it
often makes sense to generate thumbnails automatically. In Lektor each
image provides the [thumbnail :ref](../../../api/record/thumbnail/) method.
image provides the [thumbnail :ref](../../api/db/record/thumbnail/) method.
It accepts the width and height of the target image. If the height is not
provided it will be scaled proportionally. The return value can be converted

View File

@ -6,13 +6,13 @@ sort_key: 20
---
body:
When it comes to creating websites, there ludicrous amount of tools available.
When it comes to creating websites, there is a ludicrous amount of tools available.
They range from full blown content management solutions like Drupal over
desktop solutions like Google Web Designer to Cloud Hosted Website solutions
like WIX to more programmer focused approaches like Jekyll which generate
websites out of templates and markdown files.
*Lektor is different than any of these.*
*Lektor is different from any of these.*
## Lektor is Static