Skip to content

heyeshuang/hugo-theme-tokiwa

Repository files navigation

Theme Tokiwa

Theme Tokiwa is a minimalistic blog theme. Tokiwa-iro is the main color tone and the name of this theme.

Built on the top of Jim Frenette's Hugo Starter Theme and Tailwind CSS. Inspired by Tailwind Toolbox - Minimalist-Blog.

This theme is especially optimized for Chinese characters, while works well with other languages.

Screenshot

1 2

A live demo is at https://heysh.xyz/hugo-theme-tokiwa/.

Install

Git submodule

Inside the folder of your Hugo site run:

$ git submodule add https://github.com/heyeshuang/hugo-theme-tokiwa.git themes/hugo-theme-tokiwa

Hugo module

Inside the folder of your Hugo site run:

$ hugo mod init https://github.com/<YOUR_NAME>/<THEME_NAME>
$ hugo mod get https://github.com/heyeshuang/hugo-theme-tokiwa

Then add to your hugo.toml:

[module]
[[module.imports]]
  path = "github.com/heyeshuang/hugo-theme-tokiwa"

available config params

disqusShortname = "YOURSHORTNAME"
googleAnalytics = "UA-1234567890" # or "G-xxxxxxxx" in Google Analytics v4, in hugo v0.82+

[params]
description = """
Tokiwa-iro is the theme color of this site.
"""
math = true # for introducing $KaTEX$
env = "production" # for Google Analytics and DISQUS.
useChineseFonts = true # for font Noto Serif etc.
bannerFont = "fonts/exampleFont" # custom your own font for the title.
postDateFormat = "2006-1-2" # override custom date format posts.

[menu]
# Shown in the side menu.
  [[menu.main]]
    name = "Posts"
    weight = 1
    identifier = "post"
    url = "/post/"
  [[menu.main]]
    name = "Tags"
    url = "/tags/"
    weight = 2

[social]
instagram="http://example.com/"
bilibili="http://example.com/"
weibo="http://example.com/"
zhihu="http://example.com/"
twitter="http://twitter.com/"
gitlab="http://gitlab.com/"
youtube="http://youtube.com/"
github="http://github.com/"

A complete config.toml example is in the exampleSite folder.

Dev this theme

Install node modules

cd blog/themes/hugo-theme-tokiwa

npm i

Unminified development build with sourcemaps

cd blog/themes/hugo-theme-tokiwa
    
npm run dev

Build for production with npm run build. CSS and JavaScript files will be output into the starter themes dist folder. e.g.,

cd blog/themes/hugo-theme-tokiwa
    
npm run build

Credit

Thanks.

LICENSE

MIT