7 ms·
The main problem for me is that the absolute majority of them target blogs and if you try to adapt them for a more complicated website you gonna dive very deep
by forlorn 10y ago
The main problem for me is that the absolute majority of them target blogs and if you try to adapt them for a more complicated website you gonna dive very deep inside the code or continue constant search. Now I look at hugo as it seems to be a more general-purpose tool that allows to play with structure and content types.
- the_other 10y agoAssemble.io served me well for a number of projects, commercial and private. https://github.com/assemble/assemble/ https://github.com/assemble/assemble/ I've not touched it in about 20 months, but when I was using it more often, I found the documentation a bit weak. Everything you'll need is there, but possibly not written in the way you'd hope.
- ZmFydA__ 10y agoI found Harp.js pretty good for a general purpose static site gen. It's basically just a nice pre-configured jade/ejs/sass/less/coffeescript/browserify package. As long as you follow the 'rules' in terms of project structure, it just works as both a server and a static renderer for the above. It can be as complex or simple as you like - you could use it for a blog even, you'd just need to write some of the logic yourself in your templates. I have used it personally for simple 2-3 page sites, where all I want to do is use some simple templates, compile some sass and bundle my scripts, without having to faff with config and build pipelines.
- raben_ 10y agoYou should try Lektor (https://www.getlektor.com/ https://www.getlektor.com/). It has a flexible data structure with little assumption about the final product.
- StavrosK 10y agoI used lektor for http://portfolio.stavros.io/ http://portfolio.stavros.io/ and it was very easy to make what I wanted. I kind of assumed Jekyll and everything else would be like that too, are they not?
- pietroalbini 10y agoSome of the most popular static generators, such as Jekyll, are explicitly designed for blog posts.
- StavrosK 10y agoAh, I didn't know that, thanks. Sounds like Lektor was a good choice for me, then.
- andersonmvd 10y agoFor more complicated sites I use Rails and a rake task to generate the html files, e.g., ```ruby namespace :app do desc "Generate static pages" task static: :environment do pages = { '/' => 'index.html' } app = ActionDispatch::Integration::Session.new(Rails.application) pages.each do |route, output| puts "Generating #{output}..." outpath = File.join ([Rails.root, 'public', output]) resp = app.get(route) if resp == 200 File.delete(outpath) if File.exists?(outpath) if app.response.body.empty? puts "[ no content ]" else encoded_body = app.response.body.encode( 'UTF-8', {:invalid => :replace, :undef => :replace, :replace => '?'} ) File.open(outpath, 'w') do |f| f.write(encoded_body) end end else puts "Error generating #{output}!" end end end end ```
- eli 10y agoThe Python equivalent is something like Flask-Frozen.
- im_dario 10y agoShameless plug: I created Zas [0] as a non-opinionated alternative to Hugo and Jekyll. It assumes nothing about your site. [0] https://github.com/imdario/zas https://github.com/imdario/zas
- lsaferite 10y agoPersonally, the biggest issues is the CMS backend part of the process. I'm fine writing content for an SSG, but the marketing department is not. What I really want is a fast, open, and simple CMS BE that has a publishing workflow where the output is a static site. I've yet to fine the perfect candidate. The ones that are close are SaaS platforms and that is unfortunately unacceptable. I'm perfectly ok paying for software, at least if I get the source. If anyone has some suggestions, I'm all ears. Edit: Just to add, I have multiple needs here that aren't enumerated, one of which is full translation support for the source content to support multi-linguale/multi-locale sites.
- michaelmior 10y agoIt doesn't support translation AFAICT, but I've been playing with DatoCMS[0] and I've been happy with it for my needs. I suppose you probably could build a translation workflow on top of their API if you were feeling ambitious. [0] http://datocms.com/ http://datocms.com/
- pietroalbini 10y agoIsn't https://www.getlektor.com https://www.getlektor.com what you're looking for?
- lsaferite 10y agoI think the flat-file part is a breaker for my current needs unfortunately. But, being OSS I could perhaps fix that, so I'll add it to my short-list of possible solutions.
- narrowrail 10y agoThis very website we are on uses a flat-file structure (w/ millions of users). I'm curious why this is such a deal breaker for your current needs?
- lsaferite 10y ago
- dustingetz 10y agoThis is all about to change, think of Github as a database, with a server side rendered page hooked up to it. There exist databases that work like git, and React/virtual dom does server-side rendering, so coming soon are frameworks that give you proper database apps, coded in javascript, that are CDN compatible. I've actually built this already but we haven't launched it publicly yet. If interested, you can give us your email at http://www.hypercrud.com http://www.hypercrud.com
- falcolas 10y agoFWIW, it's always possible to stand up a dynamic site, crawl it with `wget` in mirror mode, and get a static website as its output. So long as your URLs are relative, it should work a treat with any CMS.
- Kenji 10y agoNot wanting to dive deep inside the code but make a complicated website is like saying "I want to modify the engine of my car but I don't want to look under the hood a single time" Well, I guess that works if you have a VW Beetle ;)
- danneu 10y agoWell, hopefully an SSG is saving you time compared to just writing a quick crawler that saves each route of your local Express app into a deployable static folder. If you find yourself credentializing in the source of an SSG because it turns out you're doing something it doesn't support, then there's a point where it might've been faster to build as a dynamic site (more general tooling) with a static site build step. It's an easy place to find yourself since so many SSGs generalize around blogging.
- speleding 10y agoIf you want something that can do complex sites take a look at http://nanoc.ws http://nanoc.ws: we created a very large multi-domain site using it, in 9 languages. Our tool chain includes linters, spell checkers, multi stage deploy scripts, and capybara tests for the Javascript parts. Admittedly we've heavily customised nanoc with rake tasks and ruby scripts, but it lends itself well for that.