GitLab is used only for code review, issue tracking and project management. Canonical locations for source code are still https://gitweb.torproject.org/ https://git.torproject.org/ and git-rw.torproject.org.

Commit 038ea4a6 authored by Hiro's avatar Hiro 🏄
Browse files

New upstream version 3.1.3

parent b6db0f61
.DS_Store
*~
*.pyc
*.egg-info
*.pex
.cache
#*
build
dist
venv
......@@ -14,6 +16,7 @@ coverage/
coverage.xml
coverage.lcov
.nyc_output
.pytest_cache
node_modules
gui/build
......
language: python
branches:
only:
- master
matrix:
include:
# Node 6
- python: 2.7
env: TRAVIS_NODE_VERSION=6
- python: 3.5
env: TRAVIS_NODE_VERSION=6
- python: 3.6
env: TRAVIS_NODE_VERSION=6
# Node 7 is End-of-Life
# Node 8
- python: 2.7
env: TRAVIS_NODE_VERSION=8
- python: 3.5
env: TRAVIS_NODE_VERSION=8
- python: 3.6
env: TRAVIS_NODE_VERSION=8
# Node 9
- python: 2.7
- python: 3.6
env: TRAVIS_NODE_VERSION=9
# Node 10 - Py 2.7, 3.5-3.6
- python: 2.7
env: TRAVIS_NODE_VERSION=10
- python: 3.5
env: TRAVIS_NODE_VERSION=9
env: TRAVIS_NODE_VERSION=10
- python: 3.6
env: TRAVIS_NODE_VERSION=9
env: TRAVIS_NODE_VERSION=10
- python: 3.7
env: TRAVIS_NODE_VERSION=10
dist: xenial
sudo: true
cache:
directories:
......@@ -45,8 +47,10 @@ install:
before_script:
- python --version
- node --version
- pip list
- node --version
- npm --version
script: make coverage
......
......@@ -3,6 +3,29 @@ Changelog
These are all the changes in Lektor since the first public release.
3.1.3
Release date 26th of January, 2019
- Release with universal build.
3.1.2
Release date 7th of September 2018
- Fix pagination and virtual pathing for alts
- Fixing deply from local server in Python 3
- Now passing server_info to publisher from local server, providing better
support for plugin provided publishers.
- Added a more full-featured example project.
- Adding Jinja2 `do` extension.
- Better new-plugin command.
- More tests.
- Added the ability to sort child pages in admin according to models.
- Better image handling and info detection for JPGs and SVGs
- Lektor can now be ran with `python -m lektor`
- New plugins now come with a more full featured setup.py
3.1.1
-----
......
......@@ -19,7 +19,7 @@ pex:
test-python:
@echo "---> running python tests"
py.test . --tb=short -v --cov=lektor
py.test . --tb=long -svv --cov=lektor
coverage-python: test-python
coverage xml
......
......@@ -3,7 +3,9 @@
[![Unix Build Status](https://api.travis-ci.org/lektor/lektor.svg?branch=master)](https://travis-ci.org/lektor/lektor)
[![Windows Build Status](https://ci.appveyor.com/api/projects/status/github/lektor/lektor?branch=master&svg=true)](https://ci.appveyor.com/project/lektor/lektor)
[![Code Coverage](https://codecov.io/gh/lektor/lektor/branch/master/graph/badge.svg)](https://codecov.io/gh/lektor/lektor)
[![PyPI version](https://badge.fury.io/py/Lektor.svg)](https://badge.fury.io/py/Lektor)
[![PyPI version](https://badge.fury.io/py/Lektor.svg)](https://pypi.org/project/Lektor/)
[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/Lektor.svg)](https://pypi.org/project/Lektor/)
<img alt="node:?" src="https://img.shields.io/badge/node-%3E=6-blue.svg"/>
[![Join the chat at https://gitter.im/lektor/lektor](https://badges.gitter.im/lektor/lektor.svg)](https://gitter.im/lektor/lektor?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
Lektor is a static website generator. It builds out an entire project
......@@ -16,7 +18,9 @@ To see how it works look at the ``example`` folder which contains a
very basic project to get started.
For a more complete website look at [lektor/lektor-website](https://github.com/lektor/lektor-website)
which contains the sourcecode for the official lektor website.
which contains the sourcecode for the official lektor website. We also have the example project at the
top level of this repository `example/` that is a lean example of the wide variety of the features
of Lektor.
## How do I use this?
......@@ -38,11 +42,11 @@ $ pip install --editable .
$ make build-js
$ make install-git-hooks
$ export LEKTOR_DEV=1
$ lektor quickstart --path example-project
$ cp -r example example-project
$ lektor --project example-project server
```
If you want to run the test suite instead:
If you want to run the test suite:
```
$ virtualenv venv
......
......@@ -3,6 +3,10 @@
matrix:
fast_finish: true
branches:
only:
- master
# Cache imagemagick
cache:
- C:\ProgramData\chocolatey\bin -> appveyor.yml
......@@ -12,28 +16,24 @@ cache:
environment:
matrix:
# Node 6
- PYTHON: "C:\\Python27"
NODE_JS_VERSION: "6"
- PYTHON: "C:\\Python35"
NODE_JS_VERSION: "6"
- PYTHON: "C:\\Python36"
- PYTHON: "C:\\Python37"
NODE_JS_VERSION: "6"
# Node 7 is End-of-Life
# Node 8
- PYTHON: "C:\\Python27"
NODE_JS_VERSION: "8"
- PYTHON: "C:\\Python35"
NODE_JS_VERSION: "8"
- PYTHON: "C:\\Python36"
- PYTHON: "C:\\Python37"
NODE_JS_VERSION: "8"
# Node 9
- PYTHON: "C:\\Python27"
- PYTHON: "C:\\Python37"
NODE_JS_VERSION: "9"
# Node 10 - Py 2.7, 3.5-3.7
- PYTHON: "C:\\Python27"
NODE_JS_VERSION: "10"
- PYTHON: "C:\\Python35"
NODE_JS_VERSION: "9"
NODE_JS_VERSION: "10"
- PYTHON: "C:\\Python36"
NODE_JS_VERSION: "9"
NODE_JS_VERSION: "10"
- PYTHON: "C:\\Python37"
NODE_JS_VERSION: "10"
install:
# some tests require imagemagick
......@@ -60,11 +60,13 @@ test_script:
# Run Python tests
- "%PYTHON%\\python.exe --version"
- "%PYTHON%\\python.exe -m pip list"
- "%PYTHON%\\Scripts\\pytest.exe . --tb=short -v --cov=lektor"
- "%PYTHON%\\Scripts\\pytest.exe . --tb=long -svv --cov=lektor"
# Run JS tests
- cd lektor\admin
- node --version
- npm --version
- npm list
- npm run lint
- npm test
# on_failure:
# - ps: $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))
[project]
name = Example
[alternatives.en]
name = English
primary = yes
locale = en_US
[alternatives.fr]
name = French
url_prefix = /fr/
locale = fr
[alternatives.de]
name = German
url_prefix = /de/
locale = de
[packages]
lektor-markdown-highlighter = 0.1
......@@ -22,7 +22,9 @@ header h1 {
color: #169bbd;
margin: 0;
font-weight: normal;
font-size: 42px;
font-size: 58px;
top: -11px;
position: relative;
}
header nav ul {
......@@ -36,6 +38,9 @@ header nav ul li {
margin: 0 8px 0 0;
padding: 0;
}
header .logo {
display: inline-block;
}
div.page {
background: #f1fbfe;
......
_model: page
---
title: 404: Not Found
---
_template: 404.html
---
body:
This is an [error page](https://www.getlektor.com/docs/guides/error-pages/). It is also a page that uses a [theme](https://www.getlektor.com/docs/themes/), the [lektor-theme-nix theme](https://github.com/rlaverde/lektor-theme-nix). The other pages on this site do not use this theme because they have templates / models that override the ones that exist in the theme.
Because this page uses a theme, it has an entirely different layout and style.
The above links work, and will get you back to the normal flow of this site.
title: About this Website
---
body:
This is a website that was made with the Lektor quickstart.
And it does not contain a lot of information.
body: This is a website that was initally made with the Lektor quickstart, and then modified by a human by edits to contain many quick examples of Lektor's various functionalities.
title: Blog Post 2
---
author: Joseph Nix
---
body: Blog Post 2 body markdown
---
pub_date: 2017-09-16
title: Blog Post 3
---
author: Joseph Nix
---
body: Blog Post 3 body markdown
---
pub_date: 2017-09-17
title: Blog Post 4
---
author: Joseph Nix
---
body: Blog Post 4 body markdown
---
pub_date: 2017-09-18
title: Blog Post 5
---
author: Joseph Nix
---
body: Blog Post 5 body markdown
---
pub_date: 2017-09-19
alt_note:
This is where a German translation of the homepage's body would go, or even completely different content. Alternatives' settings are set in the project file. This is a field that is not populated for the 'en' alt, but is for 'fr' and 'de'. The `body` field is only populated for the 'en' alt, and since that's the default, it's used again for the other alts, as you can see below. Every field can be rewritten for each alt.
---
title: Welcome to the German Example Site!
alt_note:
This is where a French translation of the homepage's body would go, or even completely different content. Alternatives' settings are set in the project file. This is a field that is not populated for the 'en' alt, but is for 'fr' and 'de'. The `body` field is only populated for the 'en' alt, and since that's the default, it's used again for the other alts, as you can see below. Every field can be rewritten for each alt.
---
title: Welcome to the French Example Site!
title: Welcome to Example!
title: Welcome to the Example Site!
---
body:
This is a basic demo website that shows how to use Lektor for a basic
website with some pages and a blog.
This is a basic demo website that shows how to use Lektor. Since this is a working example of a Lektor based site, you can dive into the code that has produced it to better learn and experiment. This example site contains examples of:
* [404 error page](/404.html)
* a blog
* blog posts
* navigation between blog posts
* pagination
* alternatives
* assets - asseturl for style.css and favicon.png
* basic page navigation
* [builtin field types](types/)
* images
* a favicon
* thumbnail on an image attachment
* pages
* [plugin use](plugin-use/)
* [project categories](projects/categories/)
* [themes](/404.html)
_model: page
---
title: Plugin Use
---
body:
Here the lektor-markdown-highlighter is being used for a very serious Python snippet.
```python
from sys import exit
def say_hi():
print("Hello World!") # Engage in conversation
def ignore_everything():
exit(0) # Successful exit
if being_looked_at is True:
say_hi()
else:
ignore_everything()
```
_model: project-categories
---
_slug: projects/categories
_model: projects
---
title: Projects
---
body:
......
name: Project A
---
date: 2017-09-13
---
description: Project A description
---
categories: category-1, category-2
name: Project B
---
categories: category-3, category-4, category-2
---
date: 2017-09-19
---
description: Project B description
name: Project C
---
date: 2017-09-18
---
description: Project C description
body: This page is an example of every built-in field type Lektor has.
---
title: Types
---
boolean1: yes
---
date: 2018-07-04
---
datetime: 2018-07-04 05:02:22 EST
---
checkboxes: choice1, choice3
---
float: 2.71828
---
floataddon: 3.14
---
int: 1729
---
intaddon: 137
---
flow:
#### text ####
text: Text from text only flow block.
#### text_and_html ####
text: Text from text_and_html flow block.
----
html: <i>html from text_and_html flow block.</i>
---
html:
<ul>
<li><i>ħ</i></li>
<li><i>G</i></li>
<li><i>c</i></li>
<li><i>k<sub>e</sub></i></li>
<li><i>k<sub>B</sub></i></li>
</ul>
---
markdown:
- kg
- m
- s
- A
- K
- mol
- cd
---
sort_key: 2
---
strings:
string1
string2
string3
---
text:
Here is some
sample text.
[block]
name = Text Block
button_label = Text
[fields.text]
label = Text
type = markdown
[block]
name = Text and HTML Block
button_label = Text+HTML
[fields.text]
label = Text
type = markdown
[fields.html]
label = HTML
type = html
[model]
name = Attachment
label = Attachment
[fields.description]
label = {{ site.get('types') }}
type = string
default = {{ this.body }}
\ No newline at end of file
......@@ -13,4 +13,4 @@ order_by = -pub_date, title
[pagination]
enabled = yes
per_page = 10
per_page = 3
......@@ -6,6 +6,10 @@ label = {{ this.title }}
label = Title
type = string
[fields.alt_note]
label = Alt Note
type = markdown
[fields.body]
label = Body
type = markdown
[model]
name = Project Categories
label = Project Categories
hidden = yes
protected = yes
[children]
model = project-category
order_by = name
[model]
name = Project Category
label = {{ this.name }}
hidden = yes
[children]
replaced_with = site.query('/projects').filter(F.categories.contains(this))
[fields.name]
label = Name
type = string
[model]
name = Project
label = {{ this.name }}
hidden = yes
[fields.name]
label = Name
type = string
[fields.date]
label = Date
type = date
[fields.description]
label = Description
type = markdown
[fields.categories]
label = Categories
type = checkboxes
source = site.query('/project-categories')
[model]
name = Projects
label = Projects
hidden = yes
protected = yes
[children]
model = project
order_by = -date, name
[model]
name = Field Types