Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

We've been using it in production for months, and it's as great as it was the first day. I've also made a static blog with the Gitlab runner, and my experience has been similarly positive.


Do either of you mind linking to your static blogs or an article discussing your process here? I've only ever used a wordpress install for blogging but have been thinking about just building a static blog from scratch.


Building a static blog from scratch is just writing HTML files for your posts, and then linking them them to a list of pages, placing it at the top. The classic example of this is JWZ's "gruntle," or jwzrants, which actually predates the term blog. You can find it at https://www.jwz.org/gruntle/.

However, most of us prefer to generate such things from templates and markup files. The most popular system for doing this, by far, is Jekyll (https://jekyllrb.com/), probably because Github recommends it. Metalsmith (http://www.metalsmith.io/) and Wintersmith (http://wintersmith.io/), while not as popular, are certainly options if you're a JS fan, and don't mind cutting code to write your configurations, and have some very nice features for customization. However, if you're coming from Wordpress, I'd reccomend Lektor (https://www.getlektor.com/). It's Python based, well documented, and uses a simple file tree to build the website like all other options discussed. However, it also provides a simple admin panel, which can be used to write your posts, manage your posts, and publish the generated site to your server.

As for distributing a static site, you just have to stick it onto some kind of hosting. S3, Apache, Github pages, whatever. Once again, Lektor can do this via the admin panel. For the rest of the generators, you're on your own: you'll have to write the scripts yourself, but this is fairly trivial.


Here's mine: https://connorshea.gitlab.io, repo here: https://gitlab.com/connorshea/connorshea.gitlab.io

Danger recently moved their site over (https://gitlab.com/danger-systems/danger.systems, https://danger.systems/) if you want another example.

We have a bunch of working example sites in a bunch of different static site generators at the "pages" group: https://gitlab.com/groups/pages

Jekyll, Middleman, Pelican, Metalsmith, Octopress, Nanoc, etc. etc. All working examples. We also have gitlab-ci.yml templates if you create the YML file via the web editor, so for many of these you can get a simple site deploying pretty quick.

And if you want a bit more guidance we have a series of blog posts on static sites & GitLab Pages: https://about.gitlab.com/2016/06/03/ssg-overview-gitlab-page...

Personally I'd recommend Jekyll, but it really depends on what languages you're comfortable in :)

(Shout-out to Marcia, Axil, Kamilt, and others for helping build out Pages and these examples over the last while, really awesome resources!)



Thanks for commenting Connor!


I use a simple bash script[1] to paste together html headers and markdown files processed by python-markdown.

The resulting .html is pushed with the source to the github repo. This setup, while not very sexy, doesn't even need a CI.

[1] http://toastedcornflakes.github.io/generate.sh


Mine is just a half-finished Lektor site here:

http://portfolio.stavros.io

Not much to see, but it was pretty straightforward to make, you just write the templates.


Not exactly what you asked, but you might want to see StaticGen[1], a big list of resources for static site generation.

[1] http://www.staticgen.com




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: