Note: This tutorial assumes that you use Hugo for the first time . Hugo is one of the most popular open-source static site generators. You can check the Hugo Official Docs for more help.
1. Quick Install Hugo
Download the appropriate version for your platform from Hugo Releases. Once downloaded, the binary can be run from anywhere. Ideally, you should install it somewhere in your PATH for easy use. /usr/local/bin is the most probable location.
2. Quick Create a New Site
hugo new site myBlog
The above will create a new Hugo site in a folder named myBlog.
3. Quick Use Hugo-Theme-Jane
Clone this repository into themes folder:
git clone https://github.com/xianmin/hugo-theme-jane.git --depth=1 themes/jane
This directory contains an example config file and the content for the demo.
It serves as an example setup for your documentation.
Copy the config.toml in the root directory of your website. Overwrite the existing config file if necessary.
Single Post Configuration
Front Matter : Hugo allows you to add front matter in yaml, toml, or json to your content files.
title: "An Example Post"
tags: ["tag-1", "tag-2", "tag-3"]
# You can close(false) or open(true) something for this content.
# P.S. comment can only be closed
# You can also define another contentCopyright
contentCopyright: '<a rel="license noopener" href="https://creativecommons.org/licenses/by-nc-nd/4.0/" target="_blank">CC BY-NC-ND 4.0</a>'
Multilingual (Language) Support
Hugo-Theme-Jane supports the creation of websites with multiple languages side by side.
You should define the available languages in a languages section in your site configuration.
Translations are collected from the i18n/ folder.
To use the translations:
# use Chinese translation
defaultContentLanguage = "zh-cn" # Default language to use (if you setup multilingual support)
languageCode = "zh-cn"