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 b6db0f61 authored by Iain R. Learmonth's avatar Iain R. Learmonth
Browse files

New upstream version 3.1.1

parents
# https://codecov.io/gh/lektor/lektor/
comment: false
coverage:
precision: 2
range:
- 70.0
- 100.0
round: down
status:
changes: false
patch: true
project: true
.DS_Store
*.pyc
*.egg-info
*.pex
.cache
build
dist
venv
lektor/admin/static/gen
example-project
coverage/
.coverage
coverage.xml
coverage.lcov
.nyc_output
node_modules
gui/build
gui/node_modules
gui/static/gen
language: python
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
env: TRAVIS_NODE_VERSION=9
- python: 3.5
env: TRAVIS_NODE_VERSION=9
- python: 3.6
env: TRAVIS_NODE_VERSION=9
cache:
directories:
- lektor/admin/node_modules
before_install:
- rm -rf ~/.nvm
- git clone https://github.com/creationix/nvm.git ~/.nvm
- (cd ~/.nvm && git checkout `git describe --abbrev=0 --tags`)
- source ~/.nvm/nvm.sh
- nvm install $TRAVIS_NODE_VERSION
install:
- travis_retry pip install --upgrade pytest
- travis_retry pip install --upgrade codecov
- travis_retry pip install --editable .[test]
- travis_retry make build-js
before_script:
- python --version
- node --version
- pip list
script: make coverage
after_success:
- codecov
notifications:
webhooks:
urls:
- https://webhooks.gitter.im/e/f0c538cdfc9883f81e34
Changelog
=========
These are all the changes in Lektor since the first public release.
3.1.1
-----
Release date 18th of April 2018
- Better Image dimension detection.
- Fix backwards compatibility with thumbnail generation.
- Adding safety check when runnning new build in non-empty dir since that could delete data.
- Adding command aliases.
3.1.0
-----
Release date 29th of January 2018.
- Adding ability to use Lektor Themes.
- Adding Markdown event hook between instantiating the Renderer and creating the Markdown Processor
- Improving tests for GitHub deployment.
- Added the ability to use IPython in the lektor dev shell if it's available.
- Added ability to publish from different filesystems.
- Adding new option to turn disable editing fields on alternatives.
- Added automated testing for Windows.
- Expanded automated testing environments to Python 2.7, 3.5, 3.6, & Node 6, 7, 8.
- Windows bugfixes.
- Improved exif image data.
- Improved date handling in admin.
- Make GitHub Pages branch detection case insensitive.
- Set sqlite isolation to autocommit.
- Fixed errors in the example project.
- Enabling pylint and standard.js.
- Improved image rotation.
- Now measuring tests and pull requests with code coverage.
- Thumbnails can now have a defined quality.
- Moved Windows cache to local appdata.
- README tweaks.
- Beter translations.
- Better file tracking in watcher.
- Upgraded many node dependencies.
- Upgraded from ES5 to ES6.
- Added mp4 attachment type.
- Bugfixes for Python 3.
3.0.1
-----
Released on 13th of June 2017.
- Bugfixes and improved Python 2 / 3 compatibility
3.0
---
Released on 15th of July 2016.
- Switch to newer mistune (markdown parser).
- Rename `--build-flags` to `--extra-flags`, allow the deploy command to also
accept extra flags.
2.4
---
Released on 7th of July 2016.
- Resolved an issue with unicode errors being caused by the
quickstart.
2.3
---
Released on 31st of May 2016
- Fixed an issue with `get_alts` not being available in the
template environment.
2.2
---
Released on 12th of April 2016
- Corrected an issue where certain translations would not make the
admin panel load.
2.1
---
Released on 12th of April 2016
- Fixed a code signing issue on OS X 10.10.3 and lower.
2.0
---
Released on 11th of April 2016
- Added `_discoverable` system field which controls if a page should show
up in `children`. The default is that a page is discoverable. Setting it
to `False` means in practical terms that someone needs to know the URL as
all collection operations will not return it.
- Added `for_page` function to pagination that returns the pagiantion for a
specific page.
- Make pagination next_page and prev_page be None on the edges.
- Allow plugins to provide publishers.
- Added `|markdown` filter.
- Added French translations.
- Unicode filenames as final build artifacts are now explicitly disallowed.
- Serve up a 404.html as an error page in the dev server.
- Improvements to the path normalization and alt handling. This should support
URL generation in more complex cases between alts now.
- Show a clearer error message when URL generation fails because a source
object is virtual (does not have a path).
- Empty text is now still valid markdown.
- Lektor clean now loads the plugins as well.
- Basic support for type customization.
- Fields that are absent in a content file from an alternative are now pulled
from the primary content file.
- Development server now resolves index.html for assets as well.
- Markdown processing now correctly adjusts links relative to where the
rendered output is rendered.
- Added Dutch translations.
- Added Record.get_siblings()
- Added various utilties: build_url, join_path, parse_path
- Added support for virtual paths and made pagination work with it.
- Added support for Query.distinct
- Add support for pagination url resolving on root URL.
- Server information can now also contain extra key/value pairs that
can be used by publishers to affect the processing.
- The thumbnails will now always have the correct width and height set
as an attribute.
- added datetime type
- added support for the process_image utility functions so that plugins
can use it directly.
- added support for included_assets and excluded_assets in the project file.
- added Spanish translations.
- added Japanese translations.
- added support for discovering existing alts of sources.
- added support for image cropping.
- added preliminary support for publishing on windows.
- 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.
- changed internal sqlite consistency mode to improve performance on HDDs.
- 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)
1.2.1
-----
Released on 3rd of February 2016
- Bugfix release primarily for OS X which fixes a code signing issue.
1.2
---
Released on 1st of February 2016
- Fixed an error that caused unicode characters in the project
name to be mishandled in the quickstart.
- Do not create empty folders when the quickstart skips over files.
- Empty values for the slug field now pull in the default.
- Corrected a bug in hashing in the FTP publisher that could cause
files to not upload correctly.
- Improved error message for when imagemagick cannot be found.
- Fixed scrolling in the admin for firefox and some other browsers.
- Fixed a problem with deleting large projects due to sqlite limitations.
- Fixed admin preview of root page in firefox.
- Changed FTPS data channel to use TLS.
1.1
---
Released on 27th of December 2015
- Fixed a bug where resolving URL paths outside of alts did not
fall back to asset resolving.
- verbose mode now correctly displays traceback of build failures.
- Fixed a bug that caused build failures not to be remembered.
- Fixed a bad EXIF attribute (longitude was misspelt)
- Use requests for URL fetching instead of urllib. This should fix
some SSL errors on some Python versions.
- Parent of page now correctly resolves to the right alt.
- Publish from a temporary folder on the same device which solves
problems on machines with `/tmp` on a different drive.
1.0
---
Released on 21st of December 2015
- Improved ghpages and rsync deployments.
- Implemented options for default URL styles.
- All artifacts now depend on the project file.
- Fixed an issue with renames from tempfile in the quickstart.
0.96
----
Initial test release. Release date 19th of December 2015
Copyright (c) 2015-2016 by the Armin Ronacher.
Some rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the following
disclaimer in the documentation and/or other materials provided
with the distribution.
* The names of the contributors may not be used to endorse or
promote products derived from this software without specific
prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
recursive-include lektor/quickstart-templates *
recursive-include lektor/translations *
recursive-include lektor/admin *
recursive-exclude lektor/admin/node_modules *
global-exclude *.py[cdo] __pycache__ *.so *.pyd .DS_Store
include LICENSE
include README.md
all: build-js
build-js:
@echo "---> building static files"
@cd lektor/admin; npm install .
@cd lektor/admin; npm run webpack
pex:
virtualenv pex-build-cache
pex-build-cache/bin/pip install --upgrade pip
pex-build-cache/bin/pip install pex requests wheel
pex-build-cache/bin/pip wheel -w pex-build-cache/wheelhouse .
pex-build-cache/bin/pex \
-v -o lektor.pex -e lektor.cli:cli \
-f pex-build-cache/wheelhouse \
--disable-cache \
--not-zip-safe Lektor
rm -rf pex-build-cache
test-python:
@echo "---> running python tests"
py.test . --tb=short -v --cov=lektor
coverage-python: test-python
coverage xml
test-js: build-js
@echo "---> running javascript tests"
@cd lektor/admin; npm run lint
@cd lektor/admin; npm test
coverage-js: test-js
@cd lektor/admin; npm run report-coverage
test: test-python test-js
coverage: coverage-python coverage-js
osx-dmg:
$(MAKE) -C gui osx-dmg
install-git-hooks:
ln -sT $(PWD)/bin/pre-commit .git/hooks/pre-commit
# Lektor
[![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)
[![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
from static files into many individual HTML pages and has a built-in
admin UI and minimal desktop app.
<img src="https://raw.githubusercontent.com/lektor/lektor-assets/master/screenshots/admin.png" width="100%">
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.
## How do I use this?
For installation instructions head to the official documentation:
* [Installation](https://www.getlektor.com/docs/installation/)
* [Quickstart](https://www.getlektor.com/docs/quickstart/)
## Want to develop on Lektor?
This gets you started:
```
$ git clone https://github.com/lektor/lektor
$ cd lektor
$ virtualenv venv
$ . venv/bin/activate
$ pip install --editable .
$ make build-js
$ make install-git-hooks
$ export LEKTOR_DEV=1
$ lektor quickstart --path example-project
$ lektor --project example-project server
```
If you want to run the test suite instead:
```
$ virtualenv venv
$ . venv/bin/activate
$ pip install --editable ".[test]"
$ make test
```
# https://ci.appveyor.com/project/lektor/lektor
matrix:
fast_finish: true
# Cache imagemagick
cache:
- C:\ProgramData\chocolatey\bin -> appveyor.yml
- C:\ProgramData\chocolatey\lib -> appveyor.yml
environment:
matrix:
# Node 6
- PYTHON: "C:\\Python27"
NODE_JS_VERSION: "6"
- PYTHON: "C:\\Python35"
NODE_JS_VERSION: "6"
- PYTHON: "C:\\Python36"
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"
NODE_JS_VERSION: "8"
# Node 9
- PYTHON: "C:\\Python27"
NODE_JS_VERSION: "9"
- PYTHON: "C:\\Python35"
NODE_JS_VERSION: "9"
- PYTHON: "C:\\Python36"
NODE_JS_VERSION: "9"
install:
# some tests require imagemagick
- choco install --timeout 600 imagemagick.tool || true
# Install lektor, dependencies and test package requirements
- "%PYTHON%\\python.exe -m pip install --upgrade pytest"
- "%PYTHON%\\python.exe -m pip install --upgrade codecov"
- "%PYTHON%\\python.exe -m pip install --editable .[test]"
# Get the latest stable version of Node.js
- ps: Install-Product node $env:NODE_JS_VERSION
# Install node modules
- cd lektor\admin
- npm install .
- npm run webpack
- cd ..
- cd ..
# Not a .NET project
build: false
test_script:
# Run Python tests
- "%PYTHON%\\python.exe --version"
- "%PYTHON%\\python.exe -m pip list"
- "%PYTHON%\\Scripts\\pytest.exe . --tb=short -v --cov=lektor"
# Run JS tests
- cd lektor\admin
- node --version
- npm --version
- npm list
- npm run lint
- npm test
#!/bin/bash
touched_js_admin_files=`git diff --cached --name-only | egrep '\.jsx?$' || true`
if [ -n "$touched_js_admin_files" ]; then
cd lektor/admin/ && npm run lint
fi
[project]
name = Example
body {
font-family: 'Verdana', sans-serif;
margin: 50px 25px;
}
a {
color: #2a99b6;
}
a:hover {
color: #33bbdf;
}
header, footer, div.page {
width: 760px;
margin: 0 auto;
background: #daeef3;
padding: 20px 30px;
}
header h1 {
color: #169bbd;
margin: 0;
font-weight: normal;
font-size: 42px;
}
header nav ul {
list-style: none;
margin: 0;
padding: 0;
}
header nav ul li {
display: inline;
margin: 0 8px 0 0;
padding: 0;
}
div.page {
background: #f1fbfe;
}
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.
_model: blog
---
title: Blog
title: Hello Website
---
pub_date: 2015-11-27
---
author: Armin Ronacher
---
body:
This is an example blog post. Not much here but that's not the point :)
title: Welcome to Example!
---
body:
This is a basic demo website that shows how to use Lektor for a basic
website with some pages and a blog.
title: Projects
---
body:
This is a list of the projects:
* Project 1
* Project 2
* Project 3
[model]
name = Blog Post
label = {{ this.title }}
hidden = yes
[fields.title]
label = Title
type = string
size = large
[fields.author]
label = Author
type = string
width = 1/2