Questions tagged [lektor]
a static content management system written in Python licensed under the BSD license.
56
questions
1
vote
1
answer
53
views
Using Github Actions with Lektor CMS
Basically i have a Lektor project, and i'm trying to to use Github Actions for deployment to Github Pages
But the publish always fail with this message fatal: could not read Username for 'https://...
0
votes
1
answer
30
views
How can I access attachment metadata within lektor templates?
I am following the lektor guide to set up a portfolio site. My goal is to include a caption below each image displayed using the projects.html and project.html templates.
My first thought was to use ...
1
vote
0
answers
27
views
Where to call `env.add_build_program()`?
I want to add posts generated by faking, to not have manually populate my Lektor blog during themes's development.
I found this piece of functionality which - though experimental - should do ...
0
votes
0
answers
21
views
How can I program a language selector only for Lektor?
I could successfully create de and en versions of a page, but how can I add a language selector? It also should be available on each page (master page) and just switch to the current page in the ...
0
votes
1
answer
30
views
lektor server does not start under freebsd
I have installed lektor via freebsd ports, there was no error. lektor quickstart also created my project but after I would like to start lektor server no matter which folder I am in or which flags do ...
0
votes
1
answer
28
views
Read the fields of the container of a collection
I have a container for example: students.{title, description, children=student} and student={title, ...}
# students.ini
[model]
name = Students
[fields.title]
label = Title
type = string
[fields....
0
votes
0
answers
106
views
Encoding mailto: fields with Lektor, email cloaking with Lektor
I want to "encode" mailto: fields on my web-page using Javascript to avoid SPAM. (This is also known as Email cloaking.)
I saw some implementation of this Idea here.
Now I'd like to add this ...
0
votes
1
answer
78
views
Is it possible to open Lektor admin interface in production/deployed mode?
I want to allow content creators access to admin page and let them create and edit blog posts. This as far as I know is currently only possible if Lektor is running in development mode - then one can ...
0
votes
1
answer
36
views
Lektor server doubles subfolder in url without obvious reason
I am trying to export an existing php-based dynamic webpage into a lektor project which up to now really worked well.
Unfortunately one problem is giving me a headache:
While my navigation works ...
2
votes
1
answer
27
views
flowblock is shown in Admin view but not contentpage
I'm not completely new to Lektor but its a few years ago that I worked with it the last time. Now I have the problem that the flowblock is shown in the admin view but not in the content view.
...
5
votes
1
answer
255
views
Lektor CMS : Can't get lektor-tags to work properly, The requested URL was not found on the server
I am trying to build a blog using lektor CMS, for that.. i needed a tags system, after searching i found a lektor plugin on lektor docs called lektor-tags
I followed every step on the docs, struggled ...
0
votes
1
answer
78
views
Render a Page object from a template
In a Lektor website, I'm facing the following problem:
I have a flowblock called facts with an according template called facts.html
in that template, I search for facts to display as follows: {% for ...
0
votes
1
answer
86
views
How to implement search and filter in lektor
Im trying to implement blog in lektor same like my wordpress site but i want search feature on my blog. What are ways to search and filter the content in lektor.
0
votes
1
answer
43
views
lektor live server not pushing the changes to the browser
Many other testing http server like some available for VScode, Atom, Hugo etcetera are "live" server. I mean that as soon as I save a file the change appears in the browser.
With Lektor I ...
0
votes
0
answers
116
views
Connecting Bootstrap search box with Python based search engine
I am attempting to integrate Elasticsearch as a search engine for my static website. I use the Python package "Lektor" as my static website generator. I have been able to automate indexing ...
0
votes
1
answer
90
views
Lektor flow blocks are not displayed
Following the Lektor flow documentation I created a simple block and included in the page model. However this 'text' block doesn't show in the webpage. There are no errors in the console.
Could ...
2
votes
2
answers
7k
views
ModuleNotFoundError: No module named 'markdown' when running lektor server
When running lektor server to deploy and see my website, it reports markdown is absent, while it is installed.
/usr/local/lib/lektor/lib/python3.7/site-packages/watchdog/utils/bricks.py:175: ...
1
vote
1
answer
283
views
Lektor installation fails on Linux
Lektor crashes on installation on Linux (Mint 19 and Raspbian-armv7l 2018-10) with a 'File not found error'
Python 2.7 and 3.5 are installed.
sudo apt-get install python-dev libssl-dev libffi-dev ...
0
votes
1
answer
76
views
Hide "publish" button from dev server
My site is meant to be published by the continuous integration hook in my git server. The continuous integration script runs lektor deploy.
As such, I need the publish settings in my project file, ...
0
votes
1
answer
106
views
Using alternative (translated) titles in dynamic menus in Lektor
I'm new to Lektor and I've been using this snippet in my layout to dynamically generate menus
{% for content in site.get('/').children %}
<li><a href="{{ content|url(alt=alt) }}">{{ ...
2
votes
1
answer
151
views
Show recent blog activity on main page
Using Lektor, trying to determine how to list the most recent three blogs by published date on the main landing (root) page. I'm feeling like I should be using a macro, but I don't understand how to ...
1
vote
0
answers
154
views
Running 'lektor server' under Pycharm Debugger?
I try to get started with Lektor CMS internals and would like to run it under the great Pycharm debugger. In particular I want to run
$ lektor server
I followed the steps
$ git clone https://...
1
vote
0
answers
67
views
How to avoid copying original (unscaled) attached images?
In my Lektor website I create thumbnails of images attached to a content and would like to avoid the original images being copied to the output directory as well. Is there any way I can copy only the ...
1
vote
1
answer
146
views
Lektor installation fails on Mac OSX
Installing Lektor using the curl command from getlektor.com appears to work and appropriate files are present in the /usr/local/bin/ directory after the process completes.
However, which lektor ...
0
votes
1
answer
139
views
lektor menu with links to child pages only, parents toggle submenu, without links
I need to generate a menu that lists all pages (like the sitemap sample) but if a page has childs it should become only a toggle for its submenu, not linking to any page. Only the innermost childs ...
0
votes
1
answer
202
views
internal links in Lektor's markdown blocks
I want to build a website, maybe similar to a movie database, where every page has, say, actors, director, year (it seems that Lektor can deal very well with such structured metadata), and I am ...
0
votes
2
answers
94
views
lektor checkboxes `[u'` ouput error?
my first attemp in lektor: I want to create my own Data Model for architectural works record.
I have a wierd ouput for checkboxes and lists like:
[u'corporate & commercial', u'interiors']
...
0
votes
1
answer
100
views
Lektor OS X desktop app install shell command fails when Anaconda is installed
Downloading, installing and running the desktop app works as expected. When I go to the Lektor menu and select "Install Shell Command" there is a popup notifying me that installing the shell command ...
2
votes
2
answers
373
views
changing the URL structure of lektor for blog posts to be in the parent directory
the problem:
we are porting a wordpress blog to lektor. The slugs in wordpress of the post are directly under the main domain e.g. www.mypage.com/my-blogpost-about-food/ not www.mypage.com/blog/my-...
2
votes
1
answer
277
views
support python 3 on installing script for lektor
I see that it has been merged already an year ago but the install.sh script still install with python 2.7 and all the docs still refers to python 2.7
I wonder what's the correct steps to have it ...
4
votes
0
answers
235
views
How to create a list of all pages of lektor project?
In a model I am using a field of the type select to let the user choose a link among all children of the root of my site:
[fields.link]
label = Link
type = select
source = site.get('/').children
...
0
votes
1
answer
243
views
Display different <div> depending on arrays length
I'm on my first JinJa2 project.
I want to display cars. A car can have one or more options.
If a car has one option, show that. If it has more, hide it for the moment.
Here's my code:
//...
{% set ...
0
votes
1
answer
390
views
How to deploy using "ghpages+https" lektor method on windows? Getting the dollowing error:
I've been relentlessly trying to solve the following problem while deploying a webpage for a friend to ghpages using lektor. Yet i'm always getting an error similar to:
λ lektor deploy production
...
3
votes
0
answers
238
views
webpack lektor bootstrap scss @import paths
I am attempting to use bootstrap with lektor.
Following the instructions found here, everything worked as expected. I then used npm to install jquery and bootstrap.
"Requiring" jquery and bootstrap ...
1
vote
1
answer
137
views
Localized / translated paths in Lektor
The Lektor docs clearly state:
If you have a page that exists in both German and English alternative then they will have the same path.
If you need localized paths, what would be the easiest / ...
0
votes
1
answer
131
views
`markdown.extensions.def_list` not rendering correctly
I tried inserting a definition list in my contents.lr file.
Tables are working fine but the definition lists are not handled correctly.
Example taken from https://pythonhosted.org/Markdown/...
2
votes
1
answer
508
views
How can I run Lektor within a Docker container?
I'm attempting to run lektor within a docker container and have hit a problem.
If I 'ADD' (or 'COPY') my source code folder within my Dockerfile, everything works perfectly but, of course, the ...
2
votes
2
answers
1k
views
How can I insert images in lektor markdown sections?
How can I insert an image in a markdown section in lektor. In particular, does the url filter work inside markdown, or who else to I reference the image location inside assets/static/?
1
vote
1
answer
106
views
Issue while running "lektor server" command on Windows
Python version: 2.7
Showing the following error on lektor server command:
Traceback (most recent call last):
File "/Users/item4/Projects/lektor/lektor/devserver.py", line 49, in build
builder....
0
votes
1
answer
174
views
Lektor command-line installation fails on OS X 10.11.6
I've just installed Lektor desktop app for OS X on two computers, and when I select "Install Shell Command", it prompts for admin credentials (my default user account is not admin in either case) and ...
1
vote
2
answers
441
views
Best way to include a contact form in Lektor?
I am using the CMS Lektor. I need to include a contact form.
What is the best method to include it?
3
votes
0
answers
145
views
Best practice to manage localized images with Lektor
We are creating a multilingual site with Lektor using Alternatives. Besides the localized content, we have few images containing some text which needs to be localized as well. Which would be the ...
4
votes
1
answer
560
views
Error when deploying Lektor site to Github Pages using Travis CI
I've got a Lektor site that I'm trying to deploy automatically in response to pull requests and commits, using the Travis CI trigger approach from the Lektor docs.
The Lektor configuration works ...
2
votes
0
answers
130
views
Lektor : Error When Saving a Record in Admin : sqlite3.OperationalError OperationalError: database is locked
I am randomly (my perception) getting the following error : "sqlite3.OperationalError OperationalError: database is locked" when I update a record in Lektor through the Admin interface. I have tried ...
5
votes
4
answers
427
views
How to show my posts in the first page and not in the "/blog" and maintaining other sub folders working like "/about" and "/projects"
I'm trying to use Lektor as my blog platform, but I am running into a few issues.
Following the guide I can make everything work. My problem begin when I try to make the blog the first page, without ...
0
votes
1
answer
124
views
Error while deploying a lektor project to hithub on windows dual python install
While trying to deploy to a github page i get the error below:
Project file
[project]
name = andresperezcera
[servers.production]
target = ghpages://andresperezcera/andresperezcera.github.io?cname=...
0
votes
1
answer
211
views
Lektor CMS how to get related objects of a model instead of plain list?
I am using Lektor CMS for my blog. I want to implement a categories functionality as said in docs. I have a blog-post model with categories field:
[fields.categories]
label = Категории
type = ...
1
vote
1
answer
817
views
Lektor Pagination - TemplateSyntaxError: Encountered unknown tag 'endblock'
Using Lektor, I have created a model book as a child of books model(analogous to blog-post & blog models).
/books/ page is generating correctly with pagination at bottom. When i goto 2nd page, it ...
2
votes
4
answers
440
views
Lektor: No Admin for flow fields
I can not figure out how to get the flow field working in admin,
I would like example shown at shown https://raw.githubusercontent.com/lektor/lektor-assets/master/screenshots/admin.png When I then ...
0
votes
2
answers
135
views
My language switcher does not work only from the blog page
I've written my language switcher as below.
It works from / or from /blog/<blog-post> but it does not work from the /blog page even if /en/blog is available.
<a href="{{ '.'|url(alt='jp') }}...