Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Oct 27 23:56
    Travis lektor/lektor-website (master) passed (1603)
  • Oct 26 23:30
    Travis lektor/lektor-website (master) passed (1602)
  • Oct 25 22:30
    Travis lektor/lektor-website (master) passed (1601)
  • Oct 25 16:27
    yagebu synchronize #824
  • Oct 25 16:10
    yagebu synchronize #824
  • Oct 25 16:05
    yagebu synchronize #819
  • Oct 25 15:49
    yagebu synchronize #819
  • Oct 25 14:57
    yagebu synchronize #819
  • Oct 25 14:41
    yagebu synchronize #819
  • Oct 25 14:40
    yagebu synchronize #824
  • Oct 25 14:40

    yagebu on master

    temporary workaround for proble… Merge pull request #826 from ya… (compare)

  • Oct 25 14:40
    yagebu closed #826
  • Oct 25 14:30
    yagebu opened #826
  • Oct 24 22:27
    Travis lektor/lektor-website (master) passed (1600)
  • Oct 23 23:12
    Travis lektor/lektor-website (master) passed (1599)
  • Oct 23 15:03
    yagebu commented #819
  • Oct 23 14:54
    yagebu synchronize #819
  • Oct 23 14:29
    nixjdm commented #819
  • Oct 23 14:27
    runfalk closed #693
  • Oct 23 14:27
    runfalk commented #693
Ionuț Ciocîrlan
@xlotlu

Sorry for all the messages, but one more thing. I am on Lektor version 3.1.3, where thumbnail() is supposed to have a mode parameter, but it does not.

@bhallaY the method signature has changed in master, and somehow the updated docs were published but there was no release. Try to use master instead of release, there were lots of bugfixes to thumbnail generation too.

Any news about next release?

@andrearicci sorry, no news. The dev team are bikeshedding the release. It's so - very - close, yet it's been that very close for months now. It could happen tomorrow or in a few more months...

Ionuț Ciocîrlan
@xlotlu

Hello,
Is it possible to generate multiple pages from a single "content". I have SQLite database with a list of people. I want to generate one html page for each of them

@ikus060_gitlab what you're looking for is a plugin that provides a VirtualSourceObject.

If you can code, check out this project: https://github.com/lektor/lektor-tags/blob/master/lektor_tags.py -- see also how you need a BuildProgram and look for the line doing self.env.add_build_program.

@ikus060_gitlab if you make a plugin of your own maybe you'll take the time and create something configurable -- e.g. to be able to configure the db, the query, the template, what the slug is etc. That would be some very awesome addition.
Ionuț Ciocîrlan
@xlotlu

Anyone have suggestions to achieve Table of Content (similar to https://www.sphinx-doc.org/en/1.5/markup/toctree.html) and next/previous at end of each page with Lektor?

@arky for the next / previous links you have get_siblings(), see https://www.getlektor.com/docs/api/db/record/

@arky for the ToC, if you want to list the current record's siblings just iterate over this.parent.children.

If you want something recursive instead, do something along the lines of https://www.getlektor.com/docs/templates/navigation/#recursive-tree-navigation

silocoder
@silocoder
Does lektor have live reload?
Arky
@arky
Thanks @xlotlu I'll give it a shot. I think Table of Contents or Sidebar navigation could be part of the core lektor and can be easily used.
Ionuț Ciocîrlan
@xlotlu
@arky well, lektor is a framework, it doesn't come with opinionated recipes. That's the theme creators' job, if you create a theme sporting these make it public maybe?
if on the other hand it doesn't provide the API to make such things possible, than that's a problem. but in this case it does.
@silocoder unfortunately not. there's an open issue for it: lektor/lektor#453
Ionuț Ciocîrlan
@xlotlu

Can anyone give me tips on how to debug templates.

@arky search for "debug" here https://jinja.palletsprojects.com/en/2.11.x/templates/

Ionuț Ciocîrlan
@xlotlu

if I wanted to use the

lektor clean
lektor minify
lektor deploy s3

commands from python code how would i do that?

@daniel-butler start by chasing code in the entry functions under https://github.com/lektor/lektor/blob/master/lektor/cli.py
If you feel the commands API could be improved to be used directly from python do create an issue. Maybe even a pull request. :)

I'm pretty curious what your use-case is though.

P.S.: I don't know what provides "minify". A plugin maybe?

Is it possible for plugins to register their own URLs in the dev-server's Flask app?

@uwekamper nope. There's this open issue: lektor/lektor#665, it would be nice if you added your use-case to it.

Ama M
@amachefe
Is there a way to convert WordPress template/themes into Lektor templates? Any idea how i can migrate a wordpress site into Lektor themes?
Ionuț Ciocîrlan
@xlotlu
@amachefe no, there's absolutely no way except for understanding lektor as a framework, the theme's html / templates, and porting it manually.
Jon Koenig
@jonmkoenig
Hello, I noticed that after building a Lektor site the <a> tags don't actually seem to direct you to the other pages within content, am I looking at this wrong or have I missed a step?
Sergi
@sponsfreixes
After creating a new project with lektor quickstart, I created a new model and layout (home.ini and home.html). I added _model: home to the root contents.lr, but something is not right. On the admin UI it's still showing the fields of the default model (page.ini). I checked the docs and how the other pages created by the quickstart are set, and I can't see what I am doing wrong. Any tips?
Sergi
@sponsfreixes
nvm, figured it out... I had typed ___ instead of --- as separator on the contents file...
Ionuț Ciocîrlan
@xlotlu
@jonmkoenig you probably did something wrong in the template. Use the url filter: <a href="{{ record|url }}">, or {{ '/hardcoded/path' | url }}
That is, if it's a template issue. If you want to link from content to content in markdown, you'll have to link manually, either using relative or absolute path.
Markus
@derdritte
Hi everyone, I wanted to try to upgrade to 3.2.0 today and I found out after some fiddling that the thumbnail-generation now no longer works via a plugin but is part of lektor. I have a config for that thumbnail generation which essentially pre-generates thumbnails for me to use in content rather than templates. I looked in the documentation but I didn't find any reference to that, is it still possible to blindly generate thumbnails for certain widths/heights?
Ionuț Ciocîrlan
@xlotlu
Thumbnail generation has been part of lektor for a long time in this template-driven form, 3.2 just brought some upgrades
Markus
@derdritte
@xlotlu That is the plugin I was refering to before, unfortunately there appears to be a compatability issue between lektor 3.2.0 and lektor-thumbnail-generator 0.4.0. The issue appears to be that "computed_height" was removed in favour of "compute_dimensions" in lektor (the former of which the plugin in the current version relies upon). Should I create a new issue in the repo for the plugin? The fix should be relatively simple assuming there are no more breaking changes.
Markus
@derdritte
The change can be done in two lines (import and one function call to be edited). While the call has changed further this API-change was already anticipated, but an already merged change was reverted in the last commit (on the plugin) which also introduced an enforced Gaussian blur which is a choice that doesn't really make sense to me.
Markus
@derdritte
I also noticed refreshing the build via the admin-ui only marks the tree as dirty and does not actually trigger a rebuild on it's own.
Markus
@derdritte
Sorry for spamming the channel, I have created a pull-request with the plugin that would solve my personal issues: skorokithakis/lektor-thumbnail-generator#3
Stavros Korokithakis
@skorokithakis
@derdritte I've replied, thanks!
Ionuț Ciocîrlan
@xlotlu

I also noticed refreshing the build via the admin-ui only marks the tree as dirty and does not actually trigger a rebuild on it's own.

@derdritte report a bug?

Markus
@derdritte
@xlotlu I guess I will.
Hanny Goodwin
@hannylicious
Has anyone tried or used a headless CMS like ghost to create the content, then used Lektor to create the static pages from it?
Ionuț Ciocîrlan
@xlotlu
@hannylicious I don't see how that could happen. Lektor comes with its own data backend: the filesystem structure under the content folder. Its core design never considered an external data source.
You could of course write a plugin that generates pages from an external API, using lektor's "virtual source objects" (they're documented, it's the mechanism e.g. lektor-tags uses to publish tag pages). But it's just some very custom code plus duct tape, it wouldn't take advantage of lektor's models.
Ionuț Ciocîrlan
@xlotlu
@hannylicious if you have a clear vision of how this would work, do submit an issue. It would be an interesting direction for lektor to take indeed.
Jorn Vanloofsvelt
@JVanloofsvelt
Hello guys, where and in which repository can I find 'installer.py'?
Jorn Vanloofsvelt
@JVanloofsvelt
@nixjdm Hello Joseph, I created an issue regarding the installer.py. I believe I fixed it, you will find a gist linked in the comments of this issue: lektor/lektor#808
Jorn Vanloofsvelt
@JVanloofsvelt
I found the installer.py file in the lektor-website repository, I made a pull-request there.
Jorn Vanloofsvelt
@JVanloofsvelt
Jorn Vanloofsvelt
@JVanloofsvelt
@goanpeca Hello Gonzalo, do you want to take a look at my pull-request?
Eric Ma
@ericmjl
Hey everybody! I'm using the checkboxes type in a model (let's call it the case_studies model). The field that uses checkboxes is the fields.authors field. I'd like to populate it from another model's entries, i.e. the teammates that have been created. Is this possible? Or might I be thinking a bit too far-fetched here? (No worries if it isn't supported, I just was thinking of minimizing duplication, so we could use one source of truth for "who can author a case study".)
Clint Johnson
@clintmjpy_gitlab
Hello friends, if any one has any resources regarding a Flask / Lektor integration please let me know.
Diogo Duarte
@dduarte-odoogap
@clintmjpy_gitlab i guess that integrating with Flask will be easy, Lektor is just static publishing so just reserve a main route for Flask on NGINX (e.g. "/dynamic"), this way you will be able to use ajax on your static pages
Ghost
@ghost~5f6e0e25d73408ce4fefe628

Hi everyone, I have an issue using the "markdown" type in model. The markdown is rendered outside its parent in the template.
model:

...
text: Lorem ipsum dolor sit amet
...

template:

<p class="card-description">
    {{ this.text }}
</p>

rendered html:

<p class="card-description">
</p>
<p>Lorem ipsum dolor sit amet</p>
<p></p>

Do someone know what can cause this problem?

Дамјан Георгиевски
@gdamjan
is there any documentation how exactly to write the "query" in [pagination] items = … ? I basically want only content that has pub_date to be in the list
I've tried items = "this.children.filter(F.pub_date)" but the list is empty then
Andrea
@andrearicci
Hi, the local server doesn't update the webpage when I save a content, or CSS. I have to reach the browser window and hit refresh. Isn't the server a pushing the changes to the browser?
evilangel-ru
@evilangel-ru

Hello, guys. Could you help me with this issue. I need to put a link to specific version of css file. For example:

<script src="./assets/js/paper-kit.min.js?v=2.3.1" type="text/javascript"></script>

But if I use asseturl filter like that

<script src="{{ '/static/js/plugins/paper-kit.min.js?v=2.3.1'|asseturl}}" type="text/javascript"></script>

there is an empty link in a result page.
How I can solve this?

Mountain/\Ash
@mountainash_twitter
@andrearicci Out of the box there's no server push (to the browser) on change (that I've seen). But there maybe a plugin that does this. Report back if you find one - as I'd also be interested.
@evilangel-ru as it's a static server the version (v) query isn't doing anything functional. You can drop it from the URI and just call paper-kit with {{ '/static/js/plugins/paper-kit.min.js'|asseturl}} and ensure the actual content of the paper-kit.min.js file in your project are from v2.3.1.