# Jekyll with Crystal

**URL:** <https://forum.crystal-lang.org/t/jekyll-with-crystal/1132>\
**Category:** Offtopic\
**Created:** [September 20, 2019, 2:55am UTC](https://forum.crystal-lang.org/t/jekyll-with-crystal/1132 "2019-09-20T02:55:38Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![jzakiya](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.crystal-lang.org/jzakiya/32/278_2.png) [@jzakiya](https://forum.crystal-lang.org/u/jzakiya)\
**Post date:** [September 20, 2019, 2:55am UTC](https://forum.crystal-lang.org/t/jekyll-with-crystal/1132/1 "2019-09-20T02:55:38Z")

</div>

I was playing around with Jekyll - [https://jekyllrb.com/](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/](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.

---

<div class="post-metadata">

**Author:** ![straight-shoota](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.crystal-lang.org/straight-shoota/32/36_2.png) [@straight-shoota](https://forum.crystal-lang.org/u/straight-shoota)\
**Post date:** [September 20, 2019, 5:21am UTC](https://forum.crystal-lang.org/t/jekyll-with-crystal/1132/2 "2019-09-20T05:21:05Z")

</div>

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](https://github.com/straight-shoota/criss)  
It’s nowhere near feature-complete, but already does a pretty good job for basic sites.

---

<div class="post-metadata">

**Author:** ![jzakiya](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.crystal-lang.org/jzakiya/32/278_2.png) [@jzakiya](https://forum.crystal-lang.org/u/jzakiya)\
**Post date:** [September 20, 2019, 2:11pm UTC](https://forum.crystal-lang.org/t/jekyll-with-crystal/1132/3 "2019-09-20T14:11:34Z")

</div>

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).

---

<div class="post-metadata">

**Author:** ![straight-shoota](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.crystal-lang.org/straight-shoota/32/36_2.png) [@straight-shoota](https://forum.crystal-lang.org/u/straight-shoota)\
**Post date:** [September 20, 2019, 3:09pm UTC](https://forum.crystal-lang.org/t/jekyll-with-crystal/1132/4 "2019-09-20T15:09:29Z")

</div>

Even without multithreading, it’s already much faster than Ruby. ;)

---

<div class="post-metadata">

**Author:** ![jzakiya](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.crystal-lang.org/jzakiya/32/278_2.png) [@jzakiya](https://forum.crystal-lang.org/u/jzakiya)\
**Post date:** [September 20, 2019, 3:17pm UTC](https://forum.crystal-lang.org/t/jekyll-with-crystal/1132/5 "2019-09-20T15:17:13Z")

</div>

The comparison I was making with Hugo, which is written in Go - [https://gohugo.io/](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.

> **[Hugo vs Jekyll: Benchmarked](https://forestry.io/blog/hugo-vs-jekyll-benchmark/)**
>
> We’ve also compared Jekyll & Hugo features across 6 dimensions. Learn More
> Hugo and Jekyll are the leading static site generators according to StaticGen.com, and both supported by our CMS. We’re often asked which tool performs better so we...

  

> **[Hugo vs. Jekyll: Comparing the leading static website generators](https://opensource.com/article/17/5/hugo-vs-jekyll)**
>
> Hugo vs. Jekyll: If you're building a new website, a static site generator may be the right platform for you.

---

<div class="post-metadata">

**Author:** ![asterite](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.crystal-lang.org/asterite/32/60_2.png) [@asterite](https://forum.crystal-lang.org/u/asterite)\
**Post date:** [September 20, 2019, 4:05pm UTC](https://forum.crystal-lang.org/t/jekyll-with-crystal/1132/6 "2019-09-20T16:05:34Z")

</div>

If it’s a static site generator, what does the “fastest” claim is about? Compiling the static site? Running it?

Because if it’s compiling it, and that requires crystal to compile something, I don’t think that’ll be faster than Go.

---

<div class="post-metadata">

**Author:** ![asterite](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.crystal-lang.org/asterite/32/60_2.png) [@asterite](https://forum.crystal-lang.org/u/asterite)\
**Post date:** [September 20, 2019, 4:07pm UTC](https://forum.crystal-lang.org/t/jekyll-with-crystal/1132/7 "2019-09-20T16:07:27Z")

</div>

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!).

---

<div class="post-metadata">

**Author:** ![jzakiya](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.crystal-lang.org/jzakiya/32/278_2.png) [@jzakiya](https://forum.crystal-lang.org/u/jzakiya)\
**Post date:** [September 20, 2019, 4:25pm UTC](https://forum.crystal-lang.org/t/jekyll-with-crystal/1132/8 "2019-09-20T16:25:26Z")

</div>

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.

> **[StaticGen | Top Open Source Static Site Generators](https://www.staticgen.com/)**
>
> StaticGen is a leaderboard of the top open source static site generators. Promoting a static approach to building websites.

---

<div class="post-metadata">

**Author:** ![bcardiff](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.crystal-lang.org/bcardiff/32/3_2.png) [@bcardiff](https://forum.crystal-lang.org/u/bcardiff)\
**Post date:** [September 20, 2019, 4:54pm UTC](https://forum.crystal-lang.org/t/jekyll-with-crystal/1132/9 "2019-09-20T16:54:03Z")

</div>

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](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.

Also, there were some static site generators done in the past: [https://github.com/trans/brite.cr](https://github.com/trans/brite.cr) is one.

---

<div class="post-metadata">

**Author:** ![jzakiya](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.crystal-lang.org/jzakiya/32/278_2.png) [@jzakiya](https://forum.crystal-lang.org/u/jzakiya)\
**Post date:** [September 20, 2019, 6:25pm UTC](https://forum.crystal-lang.org/t/jekyll-with-crystal/1132/10 "2019-09-20T18:25:43Z")

</div>

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!**

---

<div class="post-metadata">

**Author:** ![bcardiff](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.crystal-lang.org/bcardiff/32/3_2.png) [@bcardiff](https://forum.crystal-lang.org/u/bcardiff)\
**Post date:** [September 20, 2019, 6:30pm UTC](https://forum.crystal-lang.org/t/jekyll-with-crystal/1132/11 "2019-09-20T18:30:18Z")

</div>

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 🙂

---

<div class="post-metadata">

**Author:** ![jzakiya](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.crystal-lang.org/jzakiya/32/278_2.png) [@jzakiya](https://forum.crystal-lang.org/u/jzakiya)\
**Post date:** [September 20, 2019, 6:41pm UTC](https://forum.crystal-lang.org/t/jekyll-with-crystal/1132/12 "2019-09-20T18:41:31Z")

</div>

Yes, exactly.

Ruby took off because of Rails.

Elixir broke off from Ruby, and used Erlang to tackle websites tackling 100s of thousands of concurrent connections, for commerce sites.

Rust was begat by Mozilla to squash memory leaks in Firefox, and spread from there.

Swift was created by Apple to be a better Objective C to write IOS apps in.

There’s an origin story, or best use focus, for these languages (in the minds of programmers).

Crystal needs something comparable too.

---

<div class="post-metadata">

**Author:** ![girng\_github](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.crystal-lang.org/girng_github/32/571_2.png) [@girng\_github](https://forum.crystal-lang.org/u/girng_github)\
**Post date:** [September 20, 2019, 11:00pm UTC](https://forum.crystal-lang.org/t/jekyll-with-crystal/1132/13 "2019-09-20T23:00:08Z")

</div>

What is Jekyll? I visited their website but am still not sure what it is?

---

<div class="post-metadata">

**Author:** ![jgaskins](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.crystal-lang.org/jgaskins/32/2449_2.png) [@jgaskins](https://forum.crystal-lang.org/u/jgaskins)\
**Post date:** [September 21, 2019, 2:24am UTC](https://forum.crystal-lang.org/t/jekyll-with-crystal/1132/14 "2019-09-21T02:24:52Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![girng\_github](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.crystal-lang.org/girng_github/32/571_2.png) [@girng\_github](https://forum.crystal-lang.org/u/girng_github)\
**Post date:** [September 21, 2019, 4:33am UTC](https://forum.crystal-lang.org/t/jekyll-with-crystal/1132/15 "2019-09-21T04:33:39Z")

</div>

Interesting. What’s the difference between just using a blog template and editing the static html files?

---

<div class="post-metadata">

**Author:** ![jgaskins](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.crystal-lang.org/jgaskins/32/2449_2.png) [@jgaskins](https://forum.crystal-lang.org/u/jgaskins)\
**Post date:** [September 21, 2019, 4:36am UTC](https://forum.crystal-lang.org/t/jekyll-with-crystal/1132/16 "2019-09-21T04:36:03Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![jzakiya](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.crystal-lang.org/jzakiya/32/278_2.png) [@jzakiya](https://forum.crystal-lang.org/u/jzakiya)\
**Post date:** [September 22, 2019, 2:10pm UTC](https://forum.crystal-lang.org/t/jekyll-with-crystal/1132/17 "2019-09-22T14:10:23Z")

</div>

Free online Jekyll Conference, today Sunday, September 22, 2019.  
10am - 1:30pm PST (Pacific Time USA)

[https://jekyllconf.com/](https://jekyllconf.com/)

---

<div class="post-metadata">

**Author:** ![jzakiya](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.crystal-lang.org/jzakiya/32/278_2.png) [@jzakiya](https://forum.crystal-lang.org/u/jzakiya)\
**Post date:** [September 24, 2019, 6:11pm UTC](https://forum.crystal-lang.org/t/jekyll-with-crystal/1132/18 "2019-09-24T18:11:19Z")

</div>

Interesting response to my question in Jekyll forum - Is Crystal use on Jekyll roadmap?

> **[Is Crystal use on Jekyll roadmap?](https://talk.jekyllrb.com/t/is-crystal-use-on-jekyll-roadmap/3384/2)**
>
> As far as the Core Team is concerned, there won’t be a port to Crystal (or other faster languages) in the near future. However, the community is most welcome to experiment with the idea. One of Jekyll’s strong points is that it is extensible with...

---

<div class="post-metadata">

**Author:** ![bew](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.crystal-lang.org/bew/32/113_2.png) [@bew](https://forum.crystal-lang.org/u/bew)\
**Post date:** [September 24, 2019, 11:32pm UTC](https://forum.crystal-lang.org/t/jekyll-with-crystal/1132/19 "2019-09-24T23:32:05Z")

</div>

> 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.

Looks like a description of Crystal 😄 _almost_

---

<div class="post-metadata">

**Author:** ![asterite](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.crystal-lang.org/asterite/32/60_2.png) [@asterite](https://forum.crystal-lang.org/u/asterite)\
**Post date:** [September 24, 2019, 11:46pm UTC](https://forum.crystal-lang.org/t/jekyll-with-crystal/1132/20 "2019-09-24T23:46:28Z")

</div>

> [@bew](#):
>
> One of Jekyll’s strong points is that it is extensible with plugins written in Ruby

I don’t think Crystal supports any form of plugins…

[Next page](https://forum.crystal-lang.org/t/jekyll-with-crystal/1132.md?page=2)
