Migrate to Hugo
Migrate my blog to Hugo.
Document: https://gohugo.io/documentation/
My favorite theme: Mainroad
Setup
# install
snap install hugo --channel=extended
# verify install
hugo version
# crate a new site
hugo new site my-blog
# add theme
git submodule add https://github.com/vimux/mainroad
# new post
hugo new posts/hello-world/index.md
# run hugo server
hugo server
# run hugo server with draft
hugo server -D
# publish
hugo
Customize the site
Theme configuration: https://github.com/Vimux/Mainroad#configuration
languageCode = 'en-us'
theme = "mainroad"
summaryLength = 30 # The length of text in words to show in a .Summary.
[Params]
post_meta = ["date"] # Order of post meta information
pager = true # Show pager navigation (prev/next links) at the bottom of pages if true
customCSS = ["css/mainroad.css"] # Include custom CSS files, customize the site which is not configurable.
[Params.logo]
title = "LcodeJ"
subtitle = "Yang's blog"
[Params.thumbnail]
visibility = ["list"] # Control thumbnail visibility
[Params.style.vars]
highlightColor = "grey" # Override highlight color
[Params.sidebar]
home = "right" # Configure layout for home page
list = "right" # Configure layout for list pages
single = false # Configure layout for single pages
widgets = ["recent", "taglist", "social"] # Enable widgets in given order
[Params.widgets]
recent_num = 5 # Set the number of articles in the "Recent articles" widget