A static site generator using Crystal

Hello!

Today has been my first day using Crystal. I’ve installed it on Ubuntu and had a lot of fun learning the first steps in your website. I really loved the code showing strawberries in the Beatles members list. I still have a long way to go, lots to learn, but, I would like to know if it is very hard to make a static site using crystal…

Jamstack has a list with hundred of static site generators:

https://jamstack.org/generators/

Unfortunately, I didn’t find the Crystal language among them…

I am really curious about website creation using crystal and site generator… could you send me a link where I could read more about this, please?

Thank you,

Alexandre.

Well I think static site generators are already a very common thing and you can get very many different flavours. And in general, it typically doesn’t matter that much what language the generator is written in. Having one in Crystal doesn’t immediately add some benefit over others written in Ruby, Python, JavaScript, Go etc.

That being said, I actually started one as an experiment: GitHub - straight-shoota/criss: Instantaneous static site site generator and server in Crystal
It’s mostly a PoC and hasn’t gotten much updates lately. But it’s able to build a couple websites as a drop-in replecement for Jekyll. It works pretty well, and it was fun to write it.
But again, I think it’s not that much valuable to have another SSG just to have one written in Crystal. That’s why it’s incomplete :man_shrugging:

1 Like

Hello Johannes!

Thank you for your comment, and the link. I will install it and build a website to see how it looks like.

I’ve built a static site generator using swift (tool: publish) but it does not have a paginator. I think it would be useful to have a blog with paginator…

Alexandre.

Hi again!

I tryed to build the site, but the command returned an error…

I took a screenshot and will upload it within this post.

(My system is Ubuntu Linux 20.4)

Was built using older Crystal version and hasn’t been updated to 1.x. If your goal is to find a static site generator in Crystal, just because its Crystal, don’t think you’ll have much luck. Are plenty of pretty robust options already out there.

1 Like

Hello Blacksmoke.

Thank you for your message.
Ok, I will give up.
Maybe I find another solution that fits what I am looking for…

As others have said, I don’t think there is anything specific to Crystal that would be for or against a static site generator.

In fact, it seems like the perfect project for you to start learning Crystal!

For what it’s worth, I’m planning on adding static site generation to my own Crystal project soon. The more the merrier!

3 Likes

I agree. The most important thing you can do to learn is to create things! Doesn’t matter if that thing already exists.

2 Likes

The two static website generators that I know are:

Of cause Hugo is faster, but it might be interesting to see if you can port Jekyll to Crystal and compare it to Hugo.

1 Like

I’m not going to create a static site anymore, but I want to keep learning the language.
I just bought an ebook from kobo.com called “Crystal Programming” and I am enjoying it very much!

1 Like