aboutsummaryrefslogtreecommitdiff
path: root/content/posts/2021-10-16-jekyll-to-hugo.md
blob: f3ff8390c39f2abf31c43d38183055dd376c6bf5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
---
slug: jekyll-to-hugo
title: "Jekyll to Hugo"
date: "2021-10-16T07:51:29-04:00"
draft: false
---
I took some time this weekend to do the following:

1. Migrate this site from [Jekyll][] to [Hugo][].
2. Create a new site theme.
3. Update the [About][] page.
4. Add a new [Articles][] section.

The [Articles][] section will allow me to write longer articles without
polluting the main blog.

### Hugo Migration

Pros:

* Significantly faster.  [Jekyll][] sometimes tool 30 seconds to
  regenerate this site, and [Hugo][] does it in less than a second.
* Single static binary.  Much easier to install.
* Built-in [SASS/SCSS][sass] support.
* [HTML][], [CSS][], and [JavaScript][js] [minification][].  In
  particular, HTML minification is content-aware so it doesn't strip
  significant whitespace in `<pre>` or `<code>` blocks.  View the
  source of this page to see what I mean).
* [Go template][html-template] support.
* [Jekyll][] importer that works reasonably well (but see below).

Cons:

* The default [Markdown][] parser is limited and not based on
  [GitHub][]-flavored [Markdown][].
* Because of the previous item, many of the literal `<img>` elements in
  my imported [Jekyll][] content had to be fixed by hand.
* Occasionally baffling template search order.
* Default RSS feed entry contents are truncated and stripped of HTML.

### Theme Rewrite

Changes in the new theme:

* Clean rewrite based on [Bulma v0.9.3][bulma].
* Icons from [Feather Icons][feathericons].
* Consistent font sizes.
* Improved layout.  In particular, I removed the sidebar and improved
  the page header.

[jekyll]: https://jekyllrb.com/ "Jekyll static site generator"
[hugo]: https://gohugo.io/ "Hugo static site generator"
[bulma]: https://bulma.io/ "Bulma CSS framework"
[sass]: https://sass-lang.com/ "Syntactically Awesome Style Sheets"
[css]: https://en.wikipedia.org/wiki/CSS "Cascading Style Sheets"
[html]: https://en.wikipedia.org/wiki/HTML "HyperText Markup Language"
[js]: https://en.wikipedia.org/wiki/JavaScript "JavaScript programming language"
[minification]: https://en.wikipedia.org/wiki/Minification_(programming) "Remove all unnecessary characters from source code to reduce it's size"
[go]: https://golang.org/ "Go programming language."
[html-template]: https://pkg.go.dev/html/template "Go html/template"
[feathericons]: https://github.com/feathericons/feather "beautiful open source icons"
[about]: /about "About page"
[articles]: /articles "Articles section"
[markdown]: https://en.wikipedia.org/wiki/Markdown "Markdown markup language"
[github]: https://github.com/ "GitHub"