22 ms·
Introducing Lektor – A Static File Content Management System For Python
- gamesbrainiac 11y agoArmin Ronacher just makes more and more awesome stuff. I think I'm going to ditch my pelican site, and go for Lektor.
- the_mitsuhiko 11y agoDirect links to project: * Website: https://www.getlektor.com/ https://www.getlektor.com/ * Github: https://github.com/lektor/lektor https://github.com/lektor/lektor Would be really curious to hear how people like it :)
- bliti 11y agoVery nice. I had been building the same thing after wanting something more than pelican and less than wordpress. This seems to fit perfectly. Is there a roadmap for contributing to the project? I failed to see one on github.
- the_mitsuhiko 11y ago> Is there a roadmap for contributing to the project? I failed to see one on github. Nope. Hoping to get some feedback to see what people need. It does what I need pretty much at the moment. Just figured i add some docs and share it as some sort of Christmas or whatever else you celebrate present.
- subnaught 11y agoWould you mind listing some specific features you're interested in? I ask because I've recently switched from WordPress to Pelican, and I'm quite happy, so far at least.
- detaro 11y agothe ini-file configuration seems a bit strange to me(esp since it seems to be ini-files that occasionally contain python code). Why did you go with them instead of making these python classes? To allow the GUI to edit parts of them as well?
- the_mitsuhiko 11y ago> the ini-file configuration seems a bit strange to me(esp since it seems to be ini-files that occasionally contain python code). Why did you go with them instead of making these python classes? To allow the GUI to edit parts of them as well? I grew to heavily dislike the idea of just executing random code to configure things. Impossible to expose to tools, even harder to reason about it. Note that these files do not contain python code at all. They just sometimes contain little Jinja templates. The idea is indeed that the GUI can eventually edit some of these things. It also is already used for `lektor plugins add` for instance which updates the project ini file. Lastly the reason ini over yaml is purely that this can preserve comments and doing the same for yaml is a lot more work i did not have time for :)
- detaro 11y agoThanks. Yes, the code-as-configuration thing is difficult, it invites people to do very strange things sometimes. [children] replaced_with = site.query('/projects').filter(F.categories.contains(this)) (from the categories example) looked a lot like embedded code to me ;)
- the_mitsuhiko 11y agoSince there is no SQL I'm using the expression language from the templates for queries :)
- deleted 11y ago[deleted]
- crdoconnor 11y ago>Lastly the reason ini over yaml is purely that this can preserve comments and doing the same for yaml is a lot more work i did not have time for :) Was that the only thing that bothered you about YAML/pyyaml or were there other things you'd like to see fixed?
- techdragon 11y agoIt's quite late for me so I've only had time to read the documentation, but so far I love what I see. I've had a goal of building the static site tool I've wanted to use for a long time now, name chosen and everything, but you may have built something nice enough I don't need to. If this is as nice yo use as the documentation leads me to believe it will be, I may just turn some of my existing exploratory code into plugins for this instead of building my own entire tool around them.
- freyr 11y agoYou need to make sure you have the following software installed on your computer: - Python 2.7 (not Python 3.x) I've read some of your remarks about Python 3, but it seemed like you were (at least begrudgingly) accepting the shift to Python 3. So why no forwards compatibility here? Any plans to support Python 3 in the future?
- the_mitsuhiko 11y agoI build this originally for myself and i don't use python 3. I'm happy to accept patches for python 3. I think it should not be hard.
- bootload 11y ago"I build this originally for myself and i don't use python 3" Great to see another useful bit of software created. Did you miss the opportunity to build it in Python3?
- eliben 11y agoLooks nice, Armin A question (that will surely become a FAQ) - how does this compare with Pelican? Is this a non-programmer-friendlier alternative to Pelican?
- the_mitsuhiko 11y agoIt is. But it also is a lot more flexible. It's more of a framework than a simple generator.
- eliben 11y agoInteresting. Being a framework and more flexible sounds like something that's more programmer oriented rather than more "common people" oriented. I'll check out how you managed to pull this off once I get some free time
- rdtsc 11y agoThis looks nice! Thanks for sharing it.
- hasenj 11y agoI always love your work, Armin. Definitely sounds like something I've been looking for for ages. Definitely will give it a try.
- pkd 11y agoI love Armin's work, especially Flask, but this seems like lot of other products out there. I have no incentive to switch to this from the generator I'm already using, and for non-techy people I think it's still a big jump in terms of just opening up a tumblr blog.
- NamPNQ 11y agoAs he said in blog, another framework is not enough easy use for non-tech user
- the_mitsuhiko 11y ago> for non-techy people I think it's still a big jump in terms of just opening up a tumblr blog True, but that's not the audience anyways. The idea is that if you (as a web developer) want to make a portfolio site for a customer you could use lektor instead of wordpress or something like this. I generally always prefer static website generators for my own work but I cannot give it to a non technical person to fill with content. That's what motivated it. But nobody needs to switch for anything. It's just another tool in the shed :)
- Torgo 11y agoWhat other static file CMS are you using?
- pkd 11y agoI don't use a static file "CMS", but I use my own generator[1] which I made because I wanted something really fast. If you want a flat file cms, then a Google search will throw a lot of them. Kirby is the most popular, IMO. But it's not FLOSS. PicoCMS ticks all those boxes though. [1] https://github.com/pawandubey/griffin https://github.com/pawandubey/griffin
- Torgo 11y agoI wanted a "full" CMS and a GUI, and it looks like finally I got one now. I hadn't seen another static generator that had a GUI of any kind (that seemed to be supported.)
- qwertyuiop924 11y agoI always love Armin's stuff. In quality, it's often near that oh-so-very-special spot that is reserved for Steve Yegge's best posts. Now I will simultaneously be lynched by both the people who think that Steve sucks, and the people who think that Steve's stuff is 1 million times better than anything Armin could ever post. Not to mention 500 other groups who I don't even know.
- auvrw 11y agonope, you're upvoted b/c i also appreciate source-level userfriendliness of pocoo projects
- Socketubs 11y agoNice stuff! (Again and again :)) What's about multi-language website? Tips? Advice?
- mxuribe 11y agoThis is great! I'm using pelican and while a very good tool, I was considering building out a desktop/local-front-end for it...But this is MUCH better than what I could build (with my current level of expertise)...i think i'll be using this, and seriously consider contributing! Kudos @mitsuhiko!
- krick 11y agoI found sculpin pretty much perfect, but having a built-in admin panel is a nice touch.
- dwightgunning 11y agoThis looks great! The native desktop app is a powerful way to drive adoption with non-technical people. Cactus was on the right track with that although I'm fairly sure the author, Koen Bok is now focussed on his company, Framer. Are there plans to build clients for other platforms? I guess the community can jump in at any time. Sidenote: do people know of native clients for the other major static site generators like Jekyll, Hugo, Middleman? Shameless plug: If you're looking for somewhere to host your static site, please check out my side project, http://www.knownly.net http://www.knownly.net
- wuster 11y agoI want to also vote up Cactus despite the lack of attention paid to it lately. IMO it's very well designed and deserves to be worked on by a wider community. It's open sourced via BSD 3 clause: https://github.com/koenbok/cactus https://github.com/koenbok/cactus I especially liked the "deploy to s3" feature, IMO the cheapest way to run a highly scalable static site today. Alternatively, a "deploy to GitHub page" would be neat as well. I would work on extending Cactus if it was a bigger problem personally, but so far what's released fits my needs already.
- davepeck 11y agoFrom the original post: > There is very little innovation in that space and that's a bit unfortunate I'll have to respectfully disagree with Armin here, but perhaps I map the terrain a little differently than he does. In addition to the half-dozen tools he names, which are more narrowly targeted at blog-like static sites, the broader space of asset pipelines and static generation is seeing a lot of innovation. I'd point to Gulp and Rails' latest as a sign that there's more work to do here. Even strictly in the Django world, there are a zillion asset-pipeline-like-apps; django-compressor and django-pipeline, the two most used, are quite different in their approach and philosophy. I'm excited by this proliferation of tools for generating static web content "offline" and expect to see far more in the future. Lektor looks like another interesting piece to the puzzle, particularly in its focus on end-users rather than programmers. (Anyone remember Movable Type? That's probably the first user-centric static site generator to gain widespread use?)
- the_mitsuhiko 11y ago> I'd point to Gulp and Rails' latest as a sign that there's more work to do here. If you want to throw them into the same category, then sure, there is different stuff happening. But Gulp is even further away from something non programmers can use.
- davepeck 11y agoI definitely do see gulp et. al. as belonging to the same category of tools, although they're much more general-purpose. I think that's where I map the terrain differently than you. I do so because I'm hopeful that future innovations there will find their way back to tools like Lektor, etc. (And completely agree on the programmer-centric nature of these tools.)
- vinceguidry 11y agoMy feeling is that every serious programmer will end up inventing tools like this simply because the overhead of incorporating other people's tools eventually starts to overtake the overhead of maintaining one's own system.
- wanda 11y agoYep. I dare say it's how many currently-popular products came into being.
- code4tee 11y ago:-)
- the_mitsuhiko 11y agoI think that's why we have so many static site generators. However programmers typically end up just making the static site generator which is why there was nothing like Lektor before (to the best of my knowledge at least).
- ngrilly 11y agoI remember that Blogger, in the beginning, used to work as a static site generator. You edited your posts in the user interface, and you could publish the result to a static hosting via FTP.
- escap 11y agohttps://web.archive.org/web/20020210134317/http://www.blogger.com/howto/newblog.pyra https://web.archive.org/web/20020210134317/http://www.blogge... it was shut down in 2010 http://blogger-ftp.blogspot.com/2010/01/deprecating-ftp.html http://blogger-ftp.blogspot.com/2010/01/deprecating-ftp.html
- ngrilly 11y agoI know it was shut down. But I think it's interesting to see how the wheel turned, again.
- Siecje 11y agoWhy did you call it Lektor?
- frakkingcylons 11y agoIt's German for editor. I'm gonna guess for the same reason that his WSGI library is called Werkzeug (tool).
- deleted 11y ago[deleted]
- ngrilly 11y agoConsidering that one of the project's main goals is to address the needs of non-programmers, do you plan to add an improved Markdown editor (with some syntax highlighting and maybe buttons for things like titles, bold, etc.)?
- the_mitsuhiko 11y agoAbsolutely. See also the open ticket here: https://github.com/lektor/lektor/issues/7 https://github.com/lektor/lektor/issues/7
- ngrilly 11y agoArmin, are you not afraid that having to install Lektor locally could be a serious obstacle for "people that have no understanding of programming"?
- voltagex_ 11y agoI wonder how hard it'd be to bundle up into a single executable that the user could run. I know I've been battling with Python -> exe tools ever since I started using Python, though.
- the_mitsuhiko 11y agoThere is a bundled cersion for osx with a ui. Just didn't have the time to do it for windows and linux.
- johnchristopher 11y agoDoes it support some kind of live preview mode (like with HarpJS) ?
- the_mitsuhiko 11y agoDepends on what you mean by live. If you hit the save button the page renders immediately and you can see it. It rebuilds as files change.
- gotchange 11y agoI'm really suffering from an acute case of Analysis Paralysis when it comes to Static Site Generators. The offerings on the market are overwhelming and you don't know which one to pick, do you go with an incumbent or mainstream like Jekyll with a huge selection of functionality at your disposal or go for the underdog and minimal one offering just the basics or just build your own framework and adapt to the evolving needs of your projects over its lifetime. If you're thinking that the scene of MVC JavaScript frameworks resembles more of the good ol' days of the Wild Wild West, wait to see how things are currently like on the SSG front.
- copperx 11y agoI'm in the same situation. I think I'm going to go with Pandoc + make and escape SSGs altogether.
- princeb 11y agoi had this problem a week ago- ended up building an ultra-low-frills low-dependency one in an afternoon just a few weeks ago. Seems silly - i am pretty sure with sufficient time investment i am better off learning how to use popular frameworks (because learning how to use frameworks will make me better at learning how to use frameworks).
- rcarmo 11y agoVery neat. Static site generators are hard to get right (I've been hacking away at a hybrid solution at http://sushy.no-bolso.com http://sushy.no-bolso.com / http://blog.carmo.io http://blog.carmo.io - same engine, different themes). I do have two questions, though. Why the new file extension (.lr) and the field separator? Jekyll's front matter format is easier for most people - and my engine uses a plain newline to separate front matter from text, and supports multiple file extensions to make it easier for desktop editors.
- the_mitsuhiko 11y agoThe .lr format is easy to explain: it conforms to data models and is easy to parse and generate. Frontmatter does not fit into these requiements. I tried it quite a bit but it makes everything more complex. Not worth it.
- rcarmo 11y agoWell (and this is only an opinion) having to separate each field makes it harder to edit manually, and a new file extension will be a hassle for non-technical users who want to use their favorite editor. (I went with .txt/.md/.textile to support multiple markup engines and make it easier for people to edit with literally anything)
- the_mitsuhiko 11y ago> Well (and this is only an opinion) having to separate each field makes it harder to edit manually, and a new file extension will be a hassle for non-technical users who want to use their favorite editor. A non technical user would use the admin interface. Obviously a custom file extension is not particularly nice but there is really not that much one can do around that. Renaming the file to `.md` will not magically make things better because the contents are just wrong and the Markdown format just does not do what Lektor needs.
- currysausage 11y ago> Why the new file extension (.lr) and the field separator? This made me chuckle. Many comments seem to fall into two categories: 1) How is it different from SSG_X? 2) Why is it different from SSG_X? (Both are valid questions, no doubt.) The flexibility in content structure is what makes Lektor a more framework-like CMS. The possible complexity can't really be represented with newlines. For example, my "Abstract" field might be several paragraphs long.
- mars 11y agoi like http://www.mkdocs.org http://www.mkdocs.org, it's also python based.
- Michael_L 11y agoOut of topic: When the next version of Flask will be released? Does Flask has a roadmap or it is "abandonware"?
- ganduG 11y agohttps://www.reddit.com/r/Python/comments/3xi6o9/whats_the_future_of_flask/ https://www.reddit.com/r/Python/comments/3xi6o9/whats_the_fu...
- programminggeek 11y agoThis looks really interesting. I always love seeing new static site builders. Each one is a bit different, which is cool. I'm working on making hosting for static sites easier. My static hosting service is still in beta, but we have a sign up form if people are interested. http://www.statichosting.co/ http://www.statichosting.co/
- hatchoo 11y agoThanks for the link Brian. The "Get In Line For The Beta" button does not work for me (it does not do anything).
- jeffwidman 11y ago> Lektor belongs to a separate org and the project does not use any resources only I have access to (other than the domain name and the server travis-CI deploys to). Really appreciate you starting it out this way from the getgo. > Because I run so many Open Source projects and maintenance of all of them turns out to be tricky I figured I do this better this time around. Looking forward to seeing Flask & Flask-SQLAlchemy moved to a dedicated Flask org on github. Ideally with another person or two having Pypi creds for pushing releases.
- cdnsteve 11y agoRespectfully, I don't think this puts this project outside the scope of any other static site generators as listed. In my view a content only API would be more disruptive. A smart content API as a service could be used for any project. Give it a beautiful interface for authors and focus on the writing experience. Maybe this is Mediums potential new market/ platform. What if you could grab and query your content with a smart api with graphql? No updates, servers, etc. Any new project I used, I grab my content from this saas and use whatever tech/framework I want. Why aren't more devs looking at this as an option going forward?
- jsdalton 11y agoServices such as the one you describe do exist, e.g. [Contentful](https://www.contentful.com/ https://www.contentful.com/). I've used it on a few projects and it's pretty awesome. The only thing it's missing from your description is graphql. :)
- lifeisstillgood 11y agoHmm - gonna have to steal this for a project in new year. This comment is more a bookmark than any contribution to society
- amai 11y agoUrubu (A micro CMS for static websites, with a focus on good navigation practices.) might be an alternative: http://urubu.jandecaluwe.com/ http://urubu.jandecaluwe.com/