This is now my third attempt at migrating from Jekyll to Hugo. I’m writing this post before I finish the migration. Luckily, because this is my third attempt, I’m confident I will see it through to the end.
After following the Hugo quickstart guide, I imported my Jekyll posts
hugo import jekyll ../../my-blog/ . --force
enabled syntax highlighting
hugo gen chromastyles --style=monokai > syntax.css
and turned on the configurations for highlighting adding the following to my
codeFences = true
guessSyntax = true
hl_Lines = ""
lineNoStart = 1
lineNos = false
lineNumbersInTable = false
noClasses = true
style = "monokai"
tabWidth = 2
For backwards, compatibility, I also added aliases so that direct links to the old blog would continue to point to the same page in the new blog.
For example, for this post (/posts/2019-05-29-unix/), I added the following to the yaml frontmatter:
so that this link (/code/2019/05/29/unix.html) would work as well.
Adding aliases had to be done manually but I don’t have too many posts so it worked out okay.