Hugo Nuo is an responsive light & clean hugo theme for blogger. This theme features several page layout, like an about page for your portfolio, a links page for your friends’ blog, a tags page for your tags cloud, a works page is under development. This theme makes many third-party hugo shortcodes, including Codepen, JSFiddle, Video.js, Music 163 and Sheng Xiang, Asciinema.
$ cd themes
$ git clone https://github.com/laozhu/hugo-nuo
For more information read the official setup guide of Hugo.
After installing the hugo-nuo theme successfully it requires just a few more steps to get your site finally running.
The config file
Take a look inside the exampleSite folder of this theme. You’ll find a file called config.toml. To use it, copy the config.toml in the root folder of your Hugo site. Feel free to customize this theme as you like.
The hugo-nuo theme add home, works and tags page to initial site menu, you can add your own menu item here.
You can choose someone to display, the recommend number is 7 icons.
The hugo-nuo theme support Google, Bing, Baidu, Sogou, 360 webmaster’s meta verification tool, you can activate as required. The seotitle and description will show in search results and browser title.
seotitle = "Hugo Blog Title (SEO Version)"
description = "Hugo is one of the most popular open-source static site generators. With its amazing speed and flexibility, Hugo makes building websites fun again."
# Google Webmaster
googleSiteVerification = "google_site_verification_code"
# Bing Webmaster
msValidate = "bing_site_verification_code"
# Baidu Webmaster (China Only)
# baiduSiteVerification = "baidu_site_verification_code"
# Sogou Webmaster (China Only)
# sogouSiteVerification = "sogou_site_verification_code"
# 360 Webmaster (China Only)
# soSiteVerification = "360_site_verification_code"
The links page read data from data/link.yml file, now you can add friend’s links there. The format looks like:
title: chekun's blog
description: A full-stack PHP developer
title: Boof Wang
description: Another full-stack PHP developer
The links page need friend’s avatar, finally you should add friend’s avatar to content/media/links directory and link to avatar in the links.yml file.
The about page
Inside the folder of your Hugo site run:
$ hugo new about.md
$ vim content/about.md
Change the content of about.md, set page layout to about, If you want to add about page to menu, set menu to main and weight to 50.
Write something about you here.
Write your portfolio as a post here, if you want comments in about page, you should turn comments to true.
⚠️ Big Change
npm => yarn
rollup => webpack
SASS => PostCSS
In the new build system, I use webpack to generate dist files and a manifest.json file which lists all dist scripts and styles, then I use hugo data template to read the manifest.json content and insert them into the html layout. In this way I can use webpack chunkHash for browser cache and I don’t need to change the layout.
# Install all dependences
$ cd themes/hugo-nuo
# Development watch
$ yarn dev
# Build static files for production
$ yarn build
# Scripts lint and autofix
$ yarn eslint
$ yarn eslint:fix
# Styles lint and autofix
$ yarn stylelint
$ yarn stylelint:fix
# Minify images
$ yarn imagemin
$ yarn clean
I use ImageOptim to make images load faster, you should install this app before you run yarn imagemin script.
From Hugo 0.28, the default syntax hightlighter in Hugo is Chroma; it is built in Go and is really, really fast – and for the most important parts compatible with Pygments.
$ hugo gen chromastyles --style=monokai > ./src/styles/partials/syntax.css