You 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?
It'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.
> 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.
Would 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.
Interesting. 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
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?
> 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 :)
YAML is really quite complex. I like it in general but it's impossible to dump the data out without destroying the structure of the file (throw away comments, change whitespace, formatting style etc.)
My 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.
- Elegant design and implementation (I could do anything with WordPress and half a dozen plugins, but I fail to even find a bare-bones theme without kilobytes of code that I will never need; the whole ecosystem revolves around the novice user who understandably prefers "quick and dirty" over touching code)
I have been looking for a CMS that fulfills these exact criteria for quite some time. Lektor looks ideal for projects where the developer prepares a non-trivial page structure (think book listings, music albums, anything that goes beyond bold and italic), but the client should be able to edit content. Thank you, Armin!
Checkout SpudPress - Static WordPress hosting. All the same except you can use WordPress theming and Admin. If you know how to distinguish between static and dynamic. It's insanely useful
Harp actually is a static generator (didn't think it was, never used before).
And yes, Grav and Cockpit are self-hosted flat-file CMS, but now that you ask makes me confused. I was under the impression that Lektor was similar where you have a flat-file CMS and whenever a change is made, the static files are created.
My second guess is that this actually a CMS that exists locally and deploys static files when a change is made?
Lektor is a static site generator: it generates a "compiled" version of the site that is uploaded to a simple web server, without any server-side scripts running. If you want to edit something, you run it locally, make your changes, generate new files and copy those to the web server.
The key addition is that there is a nice UI for adding content in the system running locally, so it can be used by less technical users that might not feel comfortable with writing in text files with special tags/metadata, as traditional static generators require.
You're right, it's not a static site generator, but a (very fast) dynamic flat file CMS. I guess I got this mixed up because I found it while looking into static site generators.
Did you test this generator in production? If not, the verdict is not out yet on Lektor and remains to be seen how it will fare in production environments and on the battlefields.
I 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).
I 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.
That's the problem with Static Site Generators (SSG) in general. They're opinionated by nature and the learning curve could prove steep to process all the details of the configurations necessary to get the maximum mileage out of the framework but as you dig deeper and deeper, you realize that you'd be better off building your own framework that's fit to your objectives and use cases and improve and expand on that as you go along.
I disagree. The great thing about SSGs like Jekyll and Middleman is that they're very easy to build plugins for. Jekyll in particular is easy to learn, and easy to expand. I honestly can't imagine a bona fide programmer having that much difficulty picking up Jekyll.
If you did want to build a custom SSG, I think you're best bet is starting from Gulp, and building from there. At least then you can leverage the Gulp ecosystem instead of re-building everything yourself.
I'm building my own productivity software program using Rails for this reason. I want to see only what I want to see on that page, I want nobody else's ideas getting in the way. It has an intended audience of exactly one, and will in all likelihood never acquire another user.
I 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.
> 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?)
> 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.
I 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.)
I'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.
i 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).
Considering 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.)?
This 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
I 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.
Very 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://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 .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.
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.
(I went with .txt/.md/.textile to support multiple markup engines and make it easier for people to edit with literally anything)
> 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.
> 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.
> 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.
I 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.
Respectfully, 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?
Services such as the one you describe do exist, e.g. [Contentful](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. :)
This 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/
This 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!
I 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.
> 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 :)
A related idea on my mind lately is using Tumblr just as a backend CMS. Then pull the content via their API to display to end users on a separate site. For example, with a bot that automates publishing to a gh-pages branch.
The motivation is that their editing tools and app are so nice, but their presentation makes a site feel less professional. (Also because of the limited abilities to tweak CSS, use JS, and optimize performance can be a bit frustrating.)
I 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.
I 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.)
* Website: https://www.getlektor.com/
* Github: https://github.com/lektor/lektor
Would be really curious to hear how people like it :)