Building a website powered by Hugo and LoveIt
Installing Hugo and LoveIt
Follow the official documentation. Note that required version of Hugo is relatively high.
Changing Fonts
While Unicode defines CJK Unified Ideographs, actually, the forms of Japanese Kanji are slightly different from those of the Chinese characters. So we need to change fonts to render Japanese Kanji in a proper way.
We can override the variables defined in LoveIt via config/css/_override.scss
.
By overriding global-font-family
, we can use fonts for Japanese letters.
|
|
Note that !default
does not work here.
!default
affects only when the variable is not defined or defined as null.
Since we are overriding the variable, of course it is already defined as a non-null value.
Adding Social Icons
LoveIt supports social icons. We can find supported SNS at [social]
table in the site-configuration section of the official document.
We can also add an icon that is not supported.
themes/LoveIt/assets/data/social.yml
defines all the supported social icons.
By adding [params.social.XXX]
to the config.toml
in the same structure as the yaml file, we can add social icons.
It seems that it supports fontawesome and simpleicons.
Define params.social.XXX.icon.class
when we use fontawesome.
|
|
Define params.social.XXX.icon.simpleicons
when we use simpleicons.
|
|
Adding GitHub Star/Fork/Watch buttons
First, we can obtain buttons here -> https://buttons.github.io/.
To put raw HTML content to markdown, we need to add a shortcode. The following post is helpful.
After adding the rawhtml
shortcode introduced in the above post, we can put raw HTML content.
A shortcode that generates buttons may come in handy.
Hosting on GitHub Pages
Follow the official document.