Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 02:11
    eldjoko opened #332
  • Jan 23 06:36

    dairiki on master

    Run CI tests on Windows on pyth… (compare)

  • Jan 22 23:52
    dairiki synchronize #987
  • Jan 22 23:16
    dairiki synchronize #987
  • Jan 22 22:54

    dairiki on master

    Update CHANGES [skip ci] (compare)

  • Jan 22 22:46

    dairiki on master

    Tests for lektor.markdown Fix overzealous html-escaping i… Merge pull request #989 from da… (compare)

  • Jan 22 22:46
    dairiki closed #989
  • Jan 22 22:44

    dairiki on master

    Move pylint configuration to py… Cleanup pylint config Set max-… Merge pull request #991 from da… (compare)

  • Jan 22 22:44
    dairiki closed #991
  • Jan 22 22:32
    dairiki opened #991
  • Jan 22 22:08

    dairiki on master

    Fix coverage reporting for tox … Move converage config to pyproj… Merge pull request #990 from da… (compare)

  • Jan 22 22:08
    dairiki closed #990
  • Jan 22 21:35
    dairiki opened #990
  • Jan 22 21:22
    dairiki opened #989
  • Jan 21 02:13

    dairiki on master

    Fix buglet in dependency tracki… (compare)

  • Jan 20 18:15
    dairiki edited #958
  • Jan 20 02:58
    dairiki ready_for_review #987
  • Jan 20 02:36
    dairiki synchronize #987
  • Jan 19 23:59
    dairiki synchronize #987
  • Jan 19 22:50
    dairiki ready_for_review #958
minkiu
@minkiu:matrix.org
[m]

Hey there, I am trying to create a plugin for lektor; I have content (page), which has a custom field vimeo_id and I would like to access that while on the Plugin, the idea is: if the content does not have an attachment (provided thumbnail) use BeautifulSoup to grab the thumbnail from the vimeo website.

I can't seem to reach the fields, I am introspecting context['this'] but can't seem to find them; and I am doing it on on_process_template_context any hints on the right direction?

minkiu
@minkiu:matrix.org
[m]
Oh I see, so the info I need is in context['this']._data is accessing _data the correct way about this?
minkiu
@minkiu:matrix.org
[m]
Another question, can Attachments be created on the fly? So in my previous example, I want to download the vimeo thumbnail, and ideally create an Attachment out of it and store it in the content folder.
sandeshveerani4
@sandeshveerani4
ImportError: cannot import name 'ContextVar' from 'werkzeug.local' any fix ?
Jonathan Vanasco
@jvanasco
I doubt this exists, but does anyone know of a lektor plugin that will support password-protected directories? e.g. something that would allow me to check a box and it creates an htaccess/htpasswd file.
sandeshveerani4
@sandeshveerani4
Why doesn't lektor support theming like Wordpress ?
syx-pravin
@syx-pravin
@tariquesani could you help me, I am trying to use Lektorify, I installed it in Wordpress, gave my lektor content folder path and created new post but it's not creating anything in the blog directory.
Could anyone help me how to use Lektorify with Wordpress?
syx-pravin
@syx-pravin
I think this group is slient, no one is responding
Philippe Muller
@pmuller
Is the project dead?
Michael Vartanyan
@mvartanyan
it's not, just this chat is not too active
Hanny Goodwin
@hannylicious
Yeah, this group is pretty quiet. IRC is the same. I was curious regarding IRC, any plans to move off of freenode given the big exodus from them?
SrijanSriv
@SrijanSriv
Hey!
Im trying to use lektor on my windows pc and Im fairly new to everything honestly. The lektor version is 3.2.0 and python version is 2.7.18 . Are they mismatched? I just installed both these as well as a git repo which Im fairly sure is up to date but Im facing some problems, and it points to the python 27 scripts in the Trackback. Oh btw I also need gettext for this project, version 0.19.8.1 is currently where Im at.
Im also on a Cygwin Terminal. Thanks!
Fábio Oliveira
@F0liveira
@Srijan-Sriv use Python 3 instead.
SrijanSriv
@SrijanSriv
surprisingly i get lesser errors with python2, i was using python3 earlier. anyways, im gonna switch to something more ubuntu-er and try again. thanks!
Hanny Goodwin
@hannylicious
@Srijan-Sriv Python 3 is the way to go. I use Ubuntu as well. For any/all python work, Python3 should be considered "the standard" as Python 2 is no longer supported.
SrijanSriv
@SrijanSriv
sure! Im gonna fix things accordingly. Thanks for the nudge.
Jerome Charaoui
@jcharaoui
hello! I'm creating a blog using the default 'blog' template, but I would like the blog post index to appear on the front page, is that possible without moving all the post content from 'content/blog/' into 'content/' ?
ideally I would like the blog posts to have their own directory on the filesystem, as there will be other types of pages like 'content/event/*'
Jerome Charaoui
@jcharaoui
I think I found out how to do it
add "_slug: /" to "content/blog/contents.lr"
and "model: _blog" to "content/contents.lr"
Jerome Charaoui
@jcharaoui
however now "lektor serve" is full of 404's :s
Jerome Charaoui
@jcharaoui
the bug is quite similar to : lektor/lektor#16
Daniel Aubert
@DanielAubertKGB_twitter
HI I am hoping someone can help me with replacing an installation on Windows 10. Any help is much appreciated.
I am running (new-object net.webclient).DownloadString('https://www.getlektor.com/installer.py') | python
I get the following and am not sure how to resolve it
Welcome to Lektor
This script will install Lektor on your computer.
Installing at:
C:\Users\danie\AppData\Local\lektor-cli
Continue? [Yn] Y
Installing virtual environment...
Downloading virtualenv: Traceback (most recent call last):
File "<stdin>", line 393, in <module>
File "<stdin>", line 382, in install
File "<stdin>", line 367, in windows_install
File "<stdin>", line 224, in install_lektor
File "<stdin>", line 205, in create_virtualenv
File "<stdin>", line 200, in use_zipapp
File "<stdin>", line 162, in enter
File "<stdin>", line 155, in fetch
AttributeError: 'FetchTemp' object has no attribute 'Progress'
SrijanSriv
@SrijanSriv
hey again! Im on an Ubuntu os this time around. I was just trying to install lektor using the command curl -sf https://www.getlektor.com/installer.py | sudo python3 and it gives me an error about how the werkzeug it installs is too old for the flask(required >2.0 but is 0.16). I cannot do anything with lektor and i suspect this is the problem. I tried installing werkzeug by pip but to no avail. Any help would be great and thanks!
Andres Perez
@andresperezcera
@SrijanSriv I'd recommend installing using pipx
SrijanSriv
@SrijanSriv
@andresperezcera thanks for the suggestion. However, I believe they merged a pr that solved this issue a few weeks ago, essentially fixing the version mismatch.
Animesh Bulusu
@Animesh_Bulusu_twitter
Hello! Installing on Windows 10 with python 3.10 does not work at the moment. Raised an issue here: lektor/lektor#943
Tried pipx as well. Looks like something changed in the imports in python 3.10
Jerome Charaoui
@jcharaoui
Hello, I see that Lektor uses mistune to parse markdown, but I can't find any reference to figure out exactly what syntax can be used with it. Any ideas?
Short of going through the mistune source code ...
Gilberto Pereira Sassi
@gilberto-sassi
I just installed lektor, and made my first website!
This is simple, beautiful and fantastic: just what I needed...
Thank you guys
Aleksey Ozimkov
@aozimkov

Hi there! I checked all themes here https://github.com/lektor/lektor-themes but no one contins some flowblocks example.

Could someone to share good flowblocks usage example? I am looking for create text and image blocks at least. Text is creating well with documentation. But i dont understand how to create imge flowblock for add images to page body content. Thank you for any advices!

Aleksey Ozimkov
@aozimkov

I added templates/blocks/image.html with example from documentation:

{% set img = record.attachments.images.get ( this.image ) %}
{% if img %}
< div class = "thumbnail-block" >
< img src = " {{ img.thumbnail ( 480 ) | url }} " alt = " " >
</ div >
{% endif %}

And I added flyblocks/image.html with
[block]
name = Image Block
button_label = Image

[field.image]
label = Add image
type = image

But inside admin I can add Image block but can not attach or choose attached file in this block.

I am trying to make post body flowblock for creating posts with structure like this:

  • text
  • img
  • text
  • img
    etc.
2 replies
I thinak that the problem is in my mistake with flowblock model definition but I dont understand how can I make it right
Aleksey Ozimkov
@aozimkov

If I use text type in the flowblock item type model all works well:

[block]
name = Image Block
button_label = Image

[fields.image]
type = text
label = Choose image

But If so than I need to input filename in text-field. Is it any solution that I can choose file from attached (or make attach dialog inside Image flow block)

Ricardo Brandao
@programonauta_gitlab

Hi, I'm starting to use lektor to create a multi-language static site.
I'm using alternatives successfully, but now I'm stuck in how to translate the messages on templates.

I tried to use something like {% if locale == 'pt_BR' %}, but I found out that it doesn't work.

Where can I find any documentation about this? And also the variables that I can use to improve the templates?

Ricardo Brandao
@programonauta_gitlab
@SrijanSriv I use Debian, and I installed Lektor using apt install. I think it could be useful for you too.
Fábio Oliveira
@F0liveira
Hi @programonauta_gitlab. I don't know if it might help you but if you want to retrieve the value from a key of your config file you need to do something like this {{ config.PROJECT.email}}.
1 reply
Ricardo Brandao
@programonauta_gitlab

Hi @F0liveira, thank you for input. But suppose a way to do what I want is to know what language the user selected. As I could see, Lektor insert the language string (pt_BR, for instance) in the URL, like that: http://localhost:5000/pt_BR/blog/, so if is possible get this "pt_BR" could be a solution.

BTW, where can I find a list of keys, system variables that I can read and process on templates.

Fábio Oliveira
@F0liveira
Yes it is possible to only get a relative path. Have a look on this documentation: https://www.getlektor.com/docs/api/db/obj/url-to/
kw0n
@kw0n:matrix.org
[m]
Hi there, a more, general question: I wonder how active the lektor project is and how many active developers are working on it. I love the concept and am interested in getting a better grip on it but am also a bit hesitant since I'm not sure if there's a risk of it being abandoned. The website seems to have rather old posts and while some plugins etc seem to get regular updates I'm not sure how many people are actually involved and if these decide to move on if the project would survive.
If someone has insight on that I'd much appreciate it.
andreamoro
@andreamoro

Hello there, I'm willing to start using Lekort.

There are some areas that doesn't totally fit what I need, and I'd love to contribute to the overall project if I can find the solution. But at present, I'm struggling into understand what's the best approach even to debug the project. I can see self referenced project that doesn't let the project being run in debug mode from IDE like Visual Studio Code.

Do you have any idea on how to progress with that?

kw0n
@kw0n:matrix.org
[m]
Hi andreamoro, unfortunately this channel seems not that active. I also love the concept of lektor and would like to get deeper into it but it seems the community around it is still a bit slim.
andreamoro
@andreamoro
@kw0n:matrix.org I can see some of the people (authors??) mentioned on the GitHub space here. Though, you might be right as there is not a real traction.
Have you @kw0n:matrix.org managed to run in the debug mode, by any chance?
kw0n
@kw0n:matrix.org
[m]
No sorry, just startet playing with it myself and trying to get a proper grip on the template system.
What errors do you experience?
andreamoro
@andreamoro

@w0n:matrix.org if I attempt to run on the main.py file, I get an attempted relative import with no known parent package error. If I do setup as "Run as module" specifying lektor as module, with the following configuration file, I can make it start, but then any breakpoint is ignored:

    {
        "name": "Python: Lektor",
        "type": "python",
        "request": "launch",
        "cwd": "${workspaceFolder}/website",
        "module": "lektor",
        "args": [
            "server"
        ]
    }

So to add for instance a new functionality, or even a key into the configuration file (which is what I'm after now), it's not that straight forward as I can't test.