Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 01:26
    dairiki commented #641
  • 01:02
    dairiki commented #892
  • 00:49
    dairiki synchronize #886
  • 00:46
    dairiki synchronize #886
  • 00:28
    dairiki synchronize #886
  • 00:11
    dairiki synchronize #886
  • Mar 07 23:59
    dairiki synchronize #886
  • Mar 07 23:39
    Travis lektor/lektor-website (master) still failing (1743)
  • Mar 07 23:29
    dairiki synchronize #886
  • Mar 07 23:12
    dairiki synchronize #886
  • Mar 07 23:00
    dairiki synchronize #886
  • Mar 07 22:43
    dairiki synchronize #886
  • Mar 07 20:57
    dairiki commented #896
  • Mar 07 19:54
    dairiki commented #892
  • Mar 07 18:03
    dairiki commented #877
  • Mar 07 13:05
    webknjaz commented #877
  • Mar 07 10:17
    dwt commented #877
  • Mar 07 10:06
    dwt commented #877
  • Mar 07 10:04
    dwt synchronize #877
  • Mar 07 08:31
    yagebu closed #748
Дамјан Георгиевски
@gdamjan
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.
Sviatoslav Sydorenko
@webknjaz
Hello, I want to publish a static file in the root of the built site. I know that I can just have a post-step putting it there after the lektor run. But is there any lektor-native way to do it?
Nevermind, I need to learn to read: assets does that. https://www.getlektor.com/docs/project/structure/
Sviatoslav Sydorenko
@webknjaz
Does anybody know how to truncate blog posts? Jinja2 templates expose HTML-highlighted content that's already converted to markdown. So using {{ post.body | string | truncate(leeway=5) }} emits broken HTML (as in <p>...... w/o closing </p>)
1 reply
Fritz Feger
@fritzfeger
What is the easiest way to make the blog list appear on the start page?
Sviatoslav Sydorenko
@webknjaz
@fritzfeger this: webknjaz/.me@d10bb0f
Fritz Feger
@fritzfeger
@webknjaz brilliant. Thank you!
Monette
@Monette5
Hi, I am using Lektor in a site migration. I am having difficulty in creating a dropdown navigation menu for the site. I have been trying to extend the information in the docs but I can't get this to work. Has anyone managed a navigation dropdown?
Mountain/\Ash
@mountainash_twitter
@Monette5 Lektor outputs HTML, it's not responsible for the layout/design of it. There's many, many ways you can design your dropdown navigation. By having Lektor output HTML into a list (as documented here https://www.getlektor.com/docs/templates/navigation/ ) you can then use a combination of CSS (and optionally Javascript) to create a drop-down menu - there's hundreds of example here: https://codepen.io/search/pens?q=dropdown+navigation
Roberto Arista
@roberto-arista
Hey there!
I have a question concerning Alternatives. According to the docs, in order to create some alternative content, I need to duplicate the entire .lr file and this option worry me. Let’s say I want to add a Spanish translation to a website that has English as the main language. If I understood correctly the process, I need to duplicate the .lr files, add the language extension (fe: contents+es.lr) and change the content from English to Spanish. The issue I see with this process is that not everything needs to be translated, for example, images. Some images may have some text that needs to be translated into Spanish, but most of them do not. Is it possible to avoid duplication?
Is there a way to keep the alternative content inside the main .lr file? Any example of a lektor code base with alternatives to look into?
Thanks
Mountain/\Ash
@mountainash_twitter
@roberto-arista The image isn't "embedded" into the .lr file - so you can just reference the same image (it's just a link). May many pages of the site (and "alternatives" can reference the same image - it's not effected by the image)... if fact: lektor has a "problem" - all attachments (inc. images) will always be outputted to the "primary" alternative (so you will have /en/ in the URL to the image, even if it's a "ES" image).
3 replies
Monette
@Monette5
@mountainash_twitter Thank you very much for your advice. I had managed to get it working using a mix of bootstrap and Lektor navigation.
Mountain/\Ash
@mountainash_twitter
Is there a way to reduce Lektor Admin to not show both the "overlaid" and "primary" when using Alternatives? We have 3 languages, but by showing 4 Alternatives it's confusing for Content Producers and content is lost/out-of-sync as some times users update the Primary and sometimes the overlaid.
Mountain/\Ash
@mountainash_twitter
Or is there a way to keep the Lektor Admin preview on the "primary" instead of jumping to the "overlaid" each time a change is saved?
Monette
@Monette5
Is there a way to size an image using markdown - avoiding html?
Monette
@Monette5
I have been trying to utilise summernote as a plugin for the admin interface. I have created a plugin following the instructions in the lektor docs, however although I can append a summernote div to the admin UI I can't replace the textarea body with it or show the summernote controls. Theoretically summernote is really easy to initialise with some html and a script, so am I over-thinking this by going and writing a plugin for it?
Nycticorax
@Nycticorax
Hello! I have been using lektor for a couple of days and it feels just great! However, I am hitting kind of a ceiling with my lektor deploy ghpages workflow. With Gihub requiring soon ssh connections, and since I am using signed commits globally, I have to input a password three times to deploy with lektor (2x ssh for the branch then push + 1x gpg for signed commits). It's a bit of a hassle. Any idea or tips to help me lower the numbers?
Jonathan Vanasco
@jvanasco
Does anyone have a recommendation to accomplish this in Lektor:
I would like to display an "alert" box on certain pages. The content of the alert box would be a "Page" that is edited by the Lektor CMS.
My interim solution is hardcoding the alert into a function, and using a field to enable/disable the alert on each Page. I'd really like this to be something a non-tech person can update though.
Jurgen Geitner
@jurgenizer
I love Lektor and have used it for a number of sites. Feature request please: Could WebP images be added as a recognized image attachment file type to the Lektor core code, in the same way that .jpg .jpeg .gif .png are? (For automatic thumbnailing and other built-in Lektor features.)
Eric Ma
@ericmjl
@Nycticorax can I ask if you've considered using GitHub actions to deploy to github pages? If you've not considered it and haven't tried it before, I am happy to show you some workflows from my own website repo: https://github.com/ericmjl/website/blob/master/.github/workflows/build-website.yml
tallmtt
@tallmtt
I am new to using lektor and really like it! What is the easiest syntax to add image attachments in a page's content?
Omar5997
@Omar5997
Hellow everybody,
I want to ask if the windows installer is available for Lektor. I am still struggling with cmd!
tallmtt
@tallmtt
Nevermind my question. This works: <img src="imagename.jpg" alt="" class="">
Michael Vartanyan
@mvartanyan

I want to ask if the windows installer is available for Lektor. I am still struggling with cmd!

there is (was?) a possibility to install Lektor under Windows https://www.getlektor.com/docs/installation/#command-line-application but I wouldn't count on it as it is probably not tested nearly as well as the Linux version. Use the WSL.

Omar5997
@Omar5997
oh, thanks .. what is WSL?
Omar5997
@Omar5997
ok (windows subsystem for linux) .. it would work but it is still too much work to establish the environment and had to open it each time I'd like to manage my website content .. I really hope .. the windows installer is built so soon .. Lektor is quite a unique CMS choice
Uwe Kamper
@uwekamper

A coworker of mine is getting this error when trying to run "lektor build" on Windows 10:

OSError: [WinError 17] The system cannot move the file to a different disk drive: 'C:\Users\xxxxx\AppData\Local\Lektor\Cache\builds\5c6b4943d1e300e6f4a569e14f69f994\.__transe8mhexjg' -> 'C:\Users\xxxxx\AppData\Local\Lektor\Cache\builds\5c6b4943d1e300e6f4a569e14f69f994\index.html'

We also noticed that the directory that is mentioned in the error message does not exist. AFAIK it should be automatically created by Lektor, right?

I cannot reproduce the error on my local Windows 10 machine – for me everything just worked. Has anyone seen this kind of error before and can point me into any direction?

1 reply
Bharath
@Its_bharathp_twitter

hello, trying to implement the categories as per doc https://www.getlektor.com/docs/guides/categories/ but the checkbox does not work at all. it gives error as follows

multiWidgets.jsx:47 Uncaught TypeError: Cannot read property 'props' of undefined
    at onChangeHandler (multiWidgets.jsx:47)

Please help

1 reply
Uwe Kamper
@uwekamper

@Its_bharathp_twitter

My interim solution is hardcoding the alert into a function, and using a field to enable/disable the alert on each Page. I'd really like this to be something a non-tech person can update though.

I would do something like this: First create a template that renders the error message as a string only without any HTML around it. You then can create a separate page that only contains the alert message and assign the new template to this page.

You can change Javascript code that displays the alert message to load the message from the newly created page.

Ghost
@ghost~6036e6486da0373984631692
Hello! I faced the same issue as in lektor/lektor#641. Is it possible to bypass it somehow or just deploy it from under another OS?
5 replies
Monette
@Monette5
Hi - I have created a wysiwyg interface for our lektor project - would you be interested in seeing it and if so where would I make the suggestion?
Olivier D.
@odeckmyn
Hi team ! I've been playing with Lektor for quite a long time now. I'm the author of several plugin (including lektor-i18n). I'm facing a very strange issue since a few days I can't solve by myself.
10 replies
My site is rendering good, but only once. When I try to build it again, it's raising a very strange error.
Could anybody help me please ? I'm stuck :(
Thanx in advance !
Ben Widawsky
@widawsky_twitter
I'd really like to get the output of git describe in a layout. Is there an easy way to do that?
4 replies
Monette
@Monette5
I have created a plugin and would like to use some JavaScript for it, however I can't see how to map the JS file within the plugin. I have tried to define it in the plugin class definition but it is still not found. Can anyone point me in the right direction? Thanks in advance.
j-b-grenouille
@j-b-grenouille
hi
https://www.getlektor.com/docs/content/attachments/ as far as I anderstaend I havew to create the [attachment].[EXT].lr file bei Hand. So there is no possibility to have automated Metadata via Web-Admin UI
I was expectiong, if I have a default model at [Attachments] in the config file, this would be done outomatic, but it's not
also the .lr file needs to have a _model feald also if a defalt model is defined
did I miss something?
j-b-grenouille
@j-b-grenouille
I worked around using inotifywait on system base to create needet .lr files and also delte them, if the attachment ist deleted