ElmStatic with GitLab pages (and Netlify CMS)?

I’m new to Elm and Elmstatic but I’m excited to use them for a few projects. I’d like to be able to manage it with Netlify CMS and host it on GitLab pages.

Side note: The documentation for the former now lists Elmstatic after I created a merge request to do so! Hopefully that brings more attention to Elm and Elmstatic from Netlify CMS users :slightly_smiling_face:
* github netlify/netlify-cms/pull/2399

I filed a bug report for this, but I’m wondering if anyone has already gotten Elmstatic to build with the GitLab CI, and whether they could share a yml config file to do so!


Hey Kyra! :wave:

I’m Ryan and I commented on your Elmstatic thread a few days ago in the #elm-dev channel! Thanks again for sharing it with the community!

I’m currently building an architecture site with a friend, and I somehow convinced him that we should build the frontend using Elm, instead of JavaScript. Muahahaha :smiling_imp:

For us, it was also important for us to provide a solution like Netlify CMS so that our client could easily update content through a UI. For this project, we’re using Forestry, but it does the same thing. (I’ve used Netlfiy CMS on my last project, and they’re both great tools!)

Instead of using Elmstatic (which you taught me about a few days ago :sweat_smile:), I decided to use a slightly more popular static site generator called Hugo.

Hugo turns the markdown files into HTML and JSON API endpoints for me, and passes the content in as flags to the Elm application. Having the JSON API allows me to do client-side navigation and cool things like page transitions!

The site build is still in progress, so the repo is private for now. but if you’re interested in learning more, I’d be happy to walk you through how I set it up!

Just reach out on the Elm Slack :smile:

Long term, I’d like to share my experience with the rest of the Elm community. Maybe that’s a blog post or YouTube tutorial, but I want to wrap up the project first haha.

I figured your use case was more time sensitive so I should post here!

Here’s the stack I’m using:
Hosting: Netlify
Backend: Hugo
CMS: Forestry
Frontend: Elm

Have a great day!


I’d be interested in reading about your experience with this project.

1 Like

Also keen to follow this. Using Hugo as a backend, with Elm as a front-end is an interesting approach and not one I thought was possible (I need to learn more about Hugo though).
Does Elm produce some more robust html/css/JavaScript than Hugo does?

Can you point me to docs that show how to generate a static JSON API using Hugo (or am I misunderstanding? Also, by JSON API, is that the same as REST?).

I found this by searching “Elm” and “NetlifyCMS” in Google just now.

I want to produce minimal elm that will open up all the features of NetlifyCMS. What does Elmstatic add that Elm doesn’t on its own? I am guessing the ability to drop in a markdown file to a directory and have it rendered according to the rest of the App?

I am going to research Elmstatic more now (only just found out about it. If I get to my own questions before anyone else, I will include some answers as I understand them.

1 Like

Hey @dnk8n!

I created a JSON API endpoint by following this tutorial:

Hopefully, the project will be open source soon, and you can check out a real example then.


I struggled it out on my own, and the files needed are listed in the aforementioned ticket.

Digging a bit deeper into this, Netlify CMS is a bit coupled with their hosted services, although the necessary bits are the identity services which are thankfully Free Software. There are a couple of things that require hosting by someone, other than the website itself. I really wish there was a user-friendly (for non-coders) desktop app for editing markdown files and committing them to a git repository.

So I have to decide if it’s worth hosting the Git Gateway and GoTrue API microservice (or some other identity service) on my own and give that a shot.

Do you mean something like HokusCMS? That is coupled with Hugo though. But that kind of workflow I mean?

  • A desktop app that can start a local server (for preview)
  • manipulate the underlying files from a nice looking CMS
  • Handle how to commit (CI takes care of the rest for live deployment)

Yes, https://getpublii.com/ is another example!

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.