Using jekyll

1 minute read

Static site generation for your blogs using github or gitlab.

Jekyll is mainly a static site generator.

A good overview of static site generators can be found here:

https://davidwalsh.name/introduction-static-site-generators

Jekyll home page:

https://jekyllrb.com

Set up

  gem install bundler jekyll

  jekyll new my-awesome-site

  cd my-awesome-site

  bundle exec jekyll serve


You should be able see it serving up on http://localhost:4000

Blogging with github pages.

http://jmcglone.com/guides/github-pages/

Port your site to jekyll using one the various migration tools

http://import.jekyllrb.com

This has a defined structure and to change themes all you need to do is follow the structure.

Github pages

If you create a github project called {username}.github.io, then the site will be served on http://{username}.github.io

https://help.github.com/articles/about-github-pages-and-jekyll/

Themes

You can handcraft the themes from various offerings, or get them set directly in github settings page.

https://help.github.com/articles/adding-a-jekyll-theme-to-your-github-pages-site-with-the-jekyll-theme-chooser/

Custom Domain

Change the setting in github:

https://help.github.com/articles/adding-or-removing-a-custom-domain-for-your-github-pages-site/

And then point your domain to {username}.github.io (CNAME, ANAME)

For blog.blah you need to set the apex domain configuration:

https://help.github.com/articles/setting-up-an-apex-domain/

Pages

https://jekyllrb.com/docs/pages/

Drafts

Use of branching for drafts.

http://qrohlf.com/posts/jekyll-drafts-workflow

or

jekyll serve or jekyll build with the –drafts switch

Ghost

https://github.com/eloyesp/jekyll_ghost_importer

Comments

https://eduardoboucas.com/blog/2016/08/10/staticman.html

https://eduardoboucas.com/blog/2015/05/11/rethinking-the-commenting-system-for-my-jekyll-site.html

https://mademistakes.com/articles/jekyll-static-comments/

https://tosbourn.com/generating-comments-on-static-sites-with-staticman/

Host staticman yourself:

https://www.flyinggrizzly.net/2017/12/setting-up-staticman-server/

Using staticmanlab as a collaborator

Then invite like so: https://staticman3.herokuapp.com/v3/connect/github/lightphos/lightphos.github.io

More details here about gitlab and staticman:

https://mmistakes.github.io/minimal-mistakes/docs/configuration/#configure-staticman

https://vincenttam.gitlab.io/post/2018-09-16-staticman-powered-gitlab-pages/1/

Using Gitlab instead

https://www.youtube.com/watch?v=TWqh9MtT4Bg

Alternatives

Hugo

https://gohugo.io

Comments

Leave a comment

Your email address will not be published. Required fields are marked *

Loading...