Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • May 21 02:45

    github-actions[bot] on gh-pages

    Synchronized build (compare)

  • May 20 03:00

    github-actions[bot] on gh-pages

    Synchronized build (compare)

  • May 19 03:07

    github-actions[bot] on gh-pages

    Synchronized build (compare)

  • May 18 03:03

    github-actions[bot] on gh-pages

    Synchronized build (compare)

  • May 17 03:05

    github-actions[bot] on gh-pages

    Synchronized build (compare)

  • May 16 02:53

    github-actions[bot] on gh-pages

    Synchronized build (compare)

  • May 16 00:21
    frostming synchronize #1027
  • May 15 07:39
    relikd commented #1027
  • May 15 07:20
    xlotlu commented #1027
  • May 15 03:00

    github-actions[bot] on gh-pages

    Synchronized build (compare)

  • May 14 03:12

    github-actions[bot] on gh-pages

    Synchronized build (compare)

  • May 13 03:12

    github-actions[bot] on gh-pages

    Synchronized build (compare)

  • May 13 00:40
    amachefe commented #5
  • May 13 00:26
    connorcasner review_requested #2
  • May 13 00:26
    connorcasner opened #2
  • May 12 23:00

    connorcasner on blog-listing-page

    blog listing page with tags (compare)

  • May 12 14:54

    connorcasner on blog-listing-page

    blog listing page Merge branch 'master' into blog… (compare)

  • May 12 03:00

    github-actions[bot] on gh-pages

    Synchronized build (compare)

  • May 11 17:11

    connorcasner on blog-listing-page

    blog listing page (compare)

  • May 11 03:03

    github-actions[bot] on gh-pages

    Synchronized build (compare)

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.

kw0n
@kw0n:matrix.org
[m]
OK sorry, i can't help there, hopefully someone else is gonna read here who is better familiar with the system.
andreamoro
@andreamoro
No worries. I have attempted to run and attach to a process from a webserver perspective and there I was able to connect to the Firefox instance on the Ubuntu machine I'm working, but again couldn't attach to anything.
Here I guess it's mostly me missing the proper way on how to do it, as I have never debugged something in react/node.
Andrea
@andrearicci
Hi. what's new in 3.3.0? (Can't find online)
Andrea
@andrearicci
thnx
Spiv114
@Spiv114
hi everyone i'm having a problem with the deployment of my website, so the idea was that using rsync i can deploy from local to my git so that in this way i can give the project to my "client" and he can edit everything from the admin ui and push to the git repository, i generated an ssh key and added the key to my github account but when i try to do the deployment this happen
Debugging middleware caught exception in streamed response at a point where response headers were already sent.
Traceback (most recent call last):
  File "C:\Users\spiv1\AppData\Local\lektor-cli\lib\Lib\site-packages\lektor\admin\utils.py", line 19, in generate
    for event in chain(f(*args, **kwargs), (None,)):
  File "C:\Users\spiv1\AppData\Local\lektor-cli\lib\Lib\site-packages\lektor\admin\modules\api.py", line 337, in generator
    for event in event_iter:
  File "C:\Users\spiv1\AppData\Local\lektor-cli\lib\Lib\site-packages\lektor\publisher.py", line 213, in publish
    client = self.get_command(target_url, tempdir, credentials)
  File "C:\Users\spiv1\AppData\Local\lektor-cli\lib\Lib\site-packages\lektor\publisher.py", line 209, in get_command
    return Command(argline, env=env)
  File "C:\Users\spiv1\AppData\Local\lektor-cli\lib\Lib\site-packages\lektor\publisher.py", line 126, in __init__
    self._cmd = portable_popen(argline, **kwargs)
  File "C:\Users\spiv1\AppData\Local\lektor-cli\lib\Lib\site-packages\lektor\utils.py", line 495, in portable_popen
    raise RuntimeError('Could not locate executable "%s"' % cmd[0])
RuntimeError: Could not locate executable "rsync"
1 reply
Cleedee
@Cleedee
Lektor's blog is out of date. For example, it does not report on versions 3.3.0 and 3.3.1.
hughbagan
@hughbagan
Hi folks. Is it possible in Lektor to remove /blog from a blog post's slug? Eg: instead of site.com/blog/a-new-post/ it would be site.com/a-new-post/ . So... is it doable?
Jerome Charaoui
@jcharaoui
Hello, is it possible for templates to access extra_flags passed to lektor build ?
Homer S. (er/he/han)
@homer77:ismus.net
[m]
@dairiki: I see that the lektor-website isn't updated any longer? I contributed a plugin (lektor-citation) lately and e.g. lektor-google-search also doesn't appear in the list. But I yet didn't see an open issue on gh, only two closed reg. this topic. Are you allready aware of this?
photong
@photong
Can one use filter() on attachments? Some expressions work, such as this.attachments.limit(3), but this.attachments.filter(F.path.contains('slide')) returns nothing even if slide1.jpg is an attachment.
Andrea
@andrearicci
hi, I use foolowing code to generate a menu. How can I adapt it to use the slug instead of the folder name?
{% for page in [site.root] if page.record_label recursive %}
{#% for page in [site.root] recursive if page.record_label %#}
<li><a href="{{ page|url }}">{{ page.record_label }}</a>
{% if page.children %}
<ul class="menulist">{{ loop(page.children) }}</ul>
{% endif %}
</li>
{% endfor %}
2 replies
Cleedee
@Cleedee
Hi! I installed Lektor in Ubuntu 21.10 with command curl -sf https://www.getlektor.com/installer.py | python3 and the following error occurred:
Traceback (most recent call last):
  File "/home/torcato/.local/lib/lektor/lib/python3.9/site-packages/lektor/devserver.py", line 36, in build
    builder = Builder(
  File "/home/torcato/.local/lib/lektor/lib/python3.9/site-packages/lektor/builder.py", line 1073, in __init__
    con = self.connect_to_database()
  File "/home/torcato/.local/lib/lektor/lib/python3.9/site-packages/lektor/builder.py", line 1090, in connect_to_database
    con = sqlite3.connect(
sqlite3.OperationalError: unable to open database file
Russell Keith-Magee
@freakboy3742
What's the state of support of the master/main transition for the ghpages publication plugin? The docs page mentions master as the default branch for username.github.io repositories, but doesn't mention anything about repositories that have main as a default.
Ama M
@amachefe
Hello All, Is there anyone who has successfully used the Themes feature? I am finding it hard to get it working
1 reply
Ama M
@amachefe
@nixjdm @rlaverde I will like to help out with the themes. However, I am finding it hard to set it up on my system. Coming from wordpress cms, lektor is the closest to the ease of use
Homer S. (er/he/han)
@homer77:ismus.net
[m]

Maybe s.o. here has an idea what's going wrong here on my website I administer with lektor:
https://praxis-muensterland.de/news/
In the main section you can see a list of news, on the right there's a shorter list of the five newest news.
Everything worked fine until now. I could add a news which appeared (both localy and remotely) in both columns.

But as you can see today when I added one it only appears in the main section, the Aktuelles section doesn't show it. I cleaned the build and rebuild again. I checked and altered the layout.html which contains

<aside id="newsandads">                                                         
  <h1>Aktuelles</h1>                                                            
  {% set newsfeed = site.query('/news').limit(5) %}                             
  {% for news in newsfeed|sort(attribute="article_id",reverse=True)  %}         
  <article>                                                                     
<header>                                                                        
  <h1>{{ news.title }}</h1>                                                     
  <time datetime="{{ news.pub_date|datetimeformat('%Y-%m-%dT%H:%M:%S-00:00', lo\
cale="de_DE") }}" class="date" pubdate="pubdate">{{ news.pub_date|datetimeforma\
t('E, dd. MMMM yyyy - HH:mm', locale="de_DE") }}</time>                         
</header>                                                                       
<p>{{ news.body|string()|striptags()|truncate(150) }}                           
<span>(<a href="{{ '/news/'|url }}#{{ news.article_id }}" title="Den ganzen Art\
ikel lesen" class="full">weiter</a>)</span>                                     
</p>                                                                            
</article>                                                                      
  {% endfor %}                                                                  
</aside>

What am I missing out? I didn't change anything since the last time in March ....

1 reply
Homer S. (er/he/han)
@homer77:ismus.net
[m]

:point_up: Edit: Maybe s.o. here has an idea what's going wrong here on my website I administer with lektor:
redacted
In the main section you can see a list of news, on the right there's a shorter list of the five newest news.
Everything worked fine until now. I could add a news which appeared (both localy and remotely) in both columns.

But as you can see today when I added one it only appears in the main section, the Aktuelles section doesn't show it. I cleaned the build and rebuild again. I checked and altered the layout.html which contains

<aside id="newsandads">                                                         
  <h1>Aktuelles</h1>                                                            
  {% set newsfeed = site.query('/news').limit(5) %}                             
  {% for news in newsfeed|sort(attribute="article_id",reverse=True)  %}         
  <article>                                                                     
<header>                                                                        
  <h1>{{ news.title }}</h1>                                                     
  <time datetime="{{ news.pub_date|datetimeformat('%Y-%m-%dT%H:%M:%S-00:00', lo\
cale="de_DE") }}" class="date" pubdate="pubdate">{{ news.pub_date|datetimeforma\
t('E, dd. MMMM yyyy - HH:mm', locale="de_DE") }}</time>                         
</header>                                                                       
<p>{{ news.body|string()|striptags()|truncate(150) }}                           
<span>(<a href="{{ '/news/'|url }}#{{ news.article_id }}" title="Den ganzen Art\
ikel lesen" class="full">weiter</a>)</span>                                     
</p>                                                                            
</article>                                                                      
  {% endfor %}                                                                  
</aside>

What am I missing out? I didn't change anything since the last time in March ....

Lizard
@LordLizard
I'm not sure if this can help. Some times i made changes in the code but are not reflected when I refresh the page or rebuild lektor. But when i test the page ina private window it works fine. So clearing the web browser cache
... helped to show any code changes.