Skip to content


Folders and files

Last commit message
Last commit date

Latest commit



35 Commits

Repository files navigation


A simple hugo theme suitable for bilingual personal blogs. It is a copy of my personal website.

Example site

example site appearance


Shoulders of the giants

Hugo-ht is heavily built on others' amazing work:

Besides, Daijiang Li's personal website helped me a lot.

Blog tutorial

If you read Chinese, consult the website-building tutorial I created.


Navigate to the root of your hugo project and run:

cd themes
git clone
mkdir hugo-ht-new
cp -r hugo-ht/* hugo-ht-new
rm -rf hugo-ht
mv hugo-ht-new hugo-ht
cd .. 


Or you can add hugo-ht as a submodule:

git submodule add themes/hugo-ht
cp -r themes/hugo-ht/exampleSite/* .
cp -r themes/hugo-ht/archetypes . 

The difference between the two methods is that if you add it as a submodule, the hugo-ht theme you use is connected to this repository. The benefit is that you can keep it updated, but there is a caveat: if you make lots of changes to the styles based on your personal preferences, these changes might be lost.

Simply git clone is recommended if:

  • You pretty satisfied with the current version of hugo-ht; and/or

  • You are going to make changes according to your personal taste; and/or

  • You are not familiar with Git and do not know how to update the submodule.

To update the submodule, run the following codes at the root directory of your hugo project:

cd themes/hugo-ht
git checkout main && git pull
cd ..
git add hugo-ht
git commit -m "updating submodule to latest"
cd ..

The above codes came from paularmstrong.


Editing config.toml

  • Edit baseURL

  • Edit USERNAME AND REPONAME associated with github

  • edit Your Name

Language mode

If you want to use a single language in the menu. Make sure there are folders within the content folder. Let's say you have about and posts.

  1. Edit thems/hugo-ht/layouts/partials/nav.html

Change the codes between <ul class = "nav-links"> and </ul> to:

{{ $currentPage := . }}
{{ $section := replaceRE "^/([^/]+)/.*" "$1" .Permalink }}
{{ range (default .Site.Menus.main (index .Site.Menus $section)) }}
<li><a href="{{ .URL | relURL }}">{{ .Name }}</a></li>
{{ end }}

The above codes came from Daijiang Li's blog.

  1. Edit config.toml

Delete all the codes with [[menu.en]] and [[]]. Add codes like:

    name = "Home"
    url = "/"
    weight = 1
    name = "About"
    url = "/about/"
    weight = 2
    name = "Posts"
    url = "/posts/"
    weight = 3

Then uncomment # singleLang = true.


In config.toml, please make sure blogDirNmae matches the name used in menu:


Codes are available under the MIT License.


hugo-ht: a hugo "theme" that powers my personal website.







No releases published