Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
Ionuț Ciocîrlan
@xlotlu
@georgkaser I think that wasn't released yet, use master if you can
@nixjdm why wasn't that released? :P by now we could've ended the deprecation period altogether :)
Georg Kaser
@georgkaser
Another question: In my case using database with json files is very annoying. I am not able to use simple json files following the documentation:
{
    "fruit": "Apple",
    "size": "Large",
    "color": "Red"
}
Is it my fault?
the output is something like this:
(u'fruit', OrderedDict([(u'array', [u'elem0', u'elem1', u'elem2'])])) (u'size', u'Large') (u'color', u'Red')
If it's working (what I think it will) is it possible to put some multilevel data into the file and render something like a multilevel unordered list?
Georg Kaser
@georgkaser
sorry, the json code was this:
{
    "fruit": {
        "array": [
            "elem0",
            "elem1",
            "elem2"
        ]
    },
    "size": "Large",
    "color": "Red"
}
For me the output looks correct, I think my programming skills in python are too bad (I am PHP Developer). Is there an example how to loop through this data?
Georg Kaser
@georgkaser
Got it! Thanks to the jinja documentation.
Mountain/\Ash
@mountainash
Whats the reason for not moving /static/ assets to the build before building the HTML pages? On a big site with many pages running 'sever' will mean that many pages are "unusable" (CSS & JS requests 404) until the entire site has finished building.
m-lib
@m-lib
Hello there, I've configured a deploy server with rsync in .lektorproject file, but when I do the deploy the removed directories and files from my local machine are note removed from the remote server. I've tryed to add --delete parameter at the end of target option in my .lektorporject file, but I am getting "rsync: on remote machine: --delete/: unknown option" error message. Is there a way to remove those directories and files from remote server with the rsync deploy configuration on .lektorproject? Thanks.
m-lib
@m-lib
I've just realized that there is no --delete option on publisher.py. Without this parameter, rsync will not delete anything that was removed from source on the destination directory. Is there any reason to Lektor do not include the --delete parameter on the behavior of rsync deploy?
Ionuț Ciocîrlan
@xlotlu
@m-lib submit an issue?
m-lib
@m-lib
Here it are: lektor/lektor#705
Thanks :-)
Folyd
@Folyd
Hi, does anyone have any successful Github workflow experience in deploying Lektor project to Github pages? I have no idea why my Github workflow not working :(
m-lib
@m-lib

Hello there @Folyd

Looking in your github action logs I found this. I am not familiar with github workflow, but my guess is that your lektor deploy with ghpages+https is trying to autenticate to your github account to push but it's failling due to missing credentials. In Lektor Travis Deploy you can configure it in some different ways. Maybe you can create a personal access tolken and use it in a similar way this github push action uses it. Otherwise, let's see what other users with more experience can tell us. Hope it helps :-)

Folyd
@Folyd
@m-lib Thanks.
Oliver Bestwalter
@obestwalter
Hi, I just integrated jupyter notebooks on my personal website and thought I could pull out the code as a plugin. If there is interest, I could publish it. The approach is to run and render the notebook as part of the build process, writing the result to contents.lr. Don't know if it makes sense, but works well enough for me at the moment: https://github.com/obestwalter/lektor-jupyter-preprocess
Ionuț Ciocîrlan
@xlotlu
@runfalk, @goanpeca any idea what's up with these crazy failures https://travis-ci.org/lektor/lektor/jobs/594857283#L915 ?
they're the same on appveyor, any python3 version. all recent prs suffer from it.
Ionuț Ciocîrlan
@xlotlu
@obestwalter just nitpicking, _BLACKIFY should be lower case, since it's a function. (I'd also call it gratuitous use of partial since it's only used once ... :) ) . I see you're outputting markdown straight into contents.lr, isn't this just a re-implementation of nbconvert --execute?
Oliver Bestwalter
@obestwalter
@xlotlu _BLACKIFY just looks cooler ;) - it is also called every time when the actual blackify function is calling it which wraps it to not crash on non-python input.
It's not a re-implementation but a very thin wrapper that does the massaging (e.g. autoformatting, using fenced code blocks for the output with extra info which kind of output it is). I wouldn't know how I could get nbconvert --execute to do this without wrapping ExecutePreprocessor if there is something that does it without me having to write that code, let me know, then I throw it away :)
I wrote about it on my website here, if you are interested in the background a bit more: https://oliver.bestwalter.de/articles/website-meta/
Oliver Bestwalter
@obestwalter
I am vaguely aware that you can also modify the html output of nbconvert by using different jinja templates and I might start doing that at some point if the markown step is not cutting it anymore, but this way it seemed easier for what I want.
Ionuț Ciocîrlan
@xlotlu

using fenced code blocks for the output with extra info

@obestwalter oh, that's pretty. that could grow into something that takes e.g. matplotlib inline output and makes a lektor attachment out of it.
i'm not aware of another way, you're definitely more familiar than me with nbconvert's internals. i did read your post. :)

Oliver Bestwalter
@obestwalter
@xlotlu thanks for having a look! That's good to hear - it could have been that I just completely missed the simple(TM) way to do it :D I already have a few ideas how to make that a bit nicer by using IPYthon internals to display the different types correctly (in stylable HTML then). AFAICT it's all about stringing together the already existing internals doing all this in a slightly different way.
Creating attachments instead of dumping it all into contents.lr seems actually an excellent idea ...
Needs more work then on the templating side, but also provides more flexibility.
cchdx
@cchdx

Hallo. Ich habe mir Kategorien eingerichtet. Ich habe diese Anleitung verwendet (https://www.getlektor.com/docs/guides/categories/). Leider habe ich nun aus irgendeinem Grund das Problem, dass die Unterseiten beim Build jetzt nicht mehr generiert werden.
Was könnte der Fehler sein? Mit 'lektor server' ist alles gut. Dort wird alles angezeigt...

Hi. I have set up categories. I have used this tutorial (https://www.getlektor.com/docs/guides/categories/). Unfortunately, for some reason I have the problem that the subpages are no longer generated during the build.
What could be the mistake? Everything is good with 'lector server'. Everything is displayed there ...

cchdx
@cchdx
__
@cucullus.mortum_gitlab
Hello! Is there are any functionality in lektor for using an arbitrary file as content?
I have many static pages but one dynamic and it it would be nice to instruct lektor to copy my script during deploy as index.py instead of interpreting contents.lr.
David Ferguson
@davidferguson
You can have static content under /assets and it will just get copied during the build process.
This is mostly used for js/CSS/images, but having html pages would work fine too.
Chilipflanzen
@Chilipflanzen_twitter
Hello, everybody.
I would like to list the date of the last change of a page in the Sitemap.xml. If possible without having to enter the date manually in the admin interface.
Can someone give me an idea how I can best solve this in the Lektor CMS?
David Ferguson
@davidferguson
Lektor content files are just files, so you could probably use the mtime attributes on them. You can get the file path in a plugin, and from there get the mtime. It's a bit clunky, but would probably work
Fabio Oliveira
@Fab0liveira_twitter
Hi everyone! I'm working with lektor since a week. I'm using a plugin called lektor-tags and a would like to make a search with multiple tags.
Anyone who could help me please?
David Ferguson
@davidferguson
For that to work, Lektor will need to build a page for every tag combination possible, which could be quite a lot.
If that's okay with you, then I can probably help point you in the right direction
Fabio Oliveira
@Fab0liveira_twitter
Seriously? There is no way to make that work with url params?
Gonzalo Peña-Castellanos
@goanpeca
Well lektor should is static there is no server processing requests, just serving pages so any url params would need to be processed with JS
Fabio Oliveira
@Fab0liveira_twitter
Ok, so the most efficient way is to do it in the backend using url params
Well, I have another question. I have a pagination who works but I would like to show every number page existing
html_img_icons_location-pin.svg
Oops, sorry
Screenshot from 2019-12-03 17-59-12.png
Thats what I meant
I want this pagination to show every number of pages