I was playing around with Jekyll - https://jekyllrb.com/ - to see if it would work with truffleruby, and started wondering if it could be used with Crystal. I suspect not, currently.
The other most popular static page generator is Hugo - https://gohugo.io/ - which is done in Go. Its claim to fame is fast site code rendering.
Jekyll could be Crystal’s Rails if it could make rendering Jekyll sites comparably as fast as Hugo.
Jekyll can’t run on Crystal, it’s a highly complex Ruby application.
But I’ve been working on a Jekyll-compatible static site generator written in Crystal: https://github.com/straight-shoota/criss
It’s nowhere near feature-complete, but already does a pretty good job for basic sites.
I think this would be a great community project for people to work on.
At minimum, we could start off mimicking the features and compatibility of Jekyll, to attract it users.
Once multi-threading is nailed down, it can be used to reduce the build times, and be faster than Hugo.
Though I’m not a web developer per se, I’d become involved in this project, to learn Crystal and web development better.
Again, this could be a something to give Crystal mindshare within the application world, since most people aren’t programmers but app users (including programmers).
The comparison I was making with Hugo, which is written in Go - https://gohugo.io/
It’s claim to fame is its blazing fast build times, which they use against Jekyll/Ruby.
I was making the point a Jekyll-like/Crystal combination would remove that claim.
Or is it a tool that compiles HTML/Markdown/etc. into static HTML, and that tool needs to be fast? If that’s the case then yes, it could end up being faster than Go but I think it will depend on the libraries too. For example markd is fast but I don’t know if it’s faster than existing markdown parsers written in Go (maybe!).
Yes, they both take the elements used to create the website and builds a final site html image that can be uploaded to a site and served.
Jekyll/Ruby now is currently the most popular because it’s easier to develop site (with plugins and gems) and github will host, for free, your Jekyll sites, if you develop it on their platform.
A Jekyll/Crystal doesn’t have to be absolutely faster than Hugo/Go, it just needs to (and will) be much faster than using Ruby. The more compatible it is to Jekyll/Ruby the more attractive and easier to use it will be to Jekyll/Ruby users.
Just as Rails created mindshare for Ruby (which some people still don’t know the difference between) a Jekyll-like/Crystal combination can do the same for Crystal.
And since web development is a significant commercial enterprise, this could attract more developers and $$ to Crystal.
Crystal needs at least one something it is widely seen to be useful for, and this seems a natural fit.
Here’s a list of most (all) known static site generators, and platform information.
Fast compile time of the site is primordial for success. In the technical aspect a good file system watcher I believe is still needed (and not something that loop every second on the directory). Maybe binding to https://github.com/Axosoft/nsfw could be a route.
Also the Markdown or whatever rendered is used. Dependency tracking and live reloading. Otherwise it will not temp someone outside Crystal land.
The community of a site generator built on X is not be the same as a community for X. Whatever X is.
The current decision on using Jekyll is not because of Ruby. But of course I would love to have a native and efficient alternative built on Crystal.
Didn’t know about Brite, but it appears to be dead/dormant (no activity in 3 years).
But, again, my main point is this (and I’m not trying to get into religious wars on the details of doing this or that) - a good, and easy to use and understand static site generator, could be Crystals Rails!
It’s about marketing Crystal by showing its usefulness than its technical superiority!
Since CLI are a good fit for Crystal, a static site generator should be a good fit. Yes, I agree there.
I personally found Hugo interesting because of that same thing you think a Crystal version should shine
It’s a static site builder. It generates static HTML files from your templates. You deploy only the static files so there’s no runtime needed. Super useful for blogs, marketing sites, and other sites that don’t need dynamic content.
If you edit the HTML yourself, you have to copy/paste any changes you make to the layout across every file. Also, the generators can also handle things like sitemaps, RSS feeds, blog index pages, etc.
One of Jekyll’s strong points is that it is extensible with plugins written in Ruby — a language with high readability and simpler learning curve — allowing users willing to add or enhance functionality to do so with minimal investment.