Update Eureka

2020-10-21
2 min read

Update Eureka will introduce different ways to update Eureka.

Currently we can install Eureka in two ways: Git Submodules and Hugo Modules. Next you will learn how to update Eureka. It should be noted that you can only update in the same way as the installation.

Update with Git Submodules

If you have or are willing to install Go 1.12 and above in the current environment, you can migrate to Hugo Modules.

Use Git Submodules to update only in the project root directory:

cd themes/eureka
git checkout <eureka_version>
git pull

You can view the historical version of Eureka in Releases.

Update with Hugo Modules

When using Hugo Modules to install Eureka, you need Go 1.12 and above. It is recommended that all users who meet the dependency requirements use this method to install.

To use Hugo Modules to update to the latest version of Eureka, you only need to execute it in the project root directory:

hugo mod get -u

If you want to specify a specific version, you just need to execute:

hugo mod get wangchucheng.com/hugo-eureka@<eureka_version>

You can view the historical version of Eureka in Releases.

Migrate from Git Submodules to Hugo Modules

Because Hugo Modules is more convenient and faster to manage than Git Submodules, and Hugo Modules is Hugo’s recommended way to add themes. It is recommended that all users who have or are willing to install Go 1.12 and above in the current environment migrate to Hugo Modules.

Install Go

To use most of the functions of Hugo Modules, you need to have Go 1.12 and above. You can install it on Go official website.

Delete Git Submodules

To delete Git Submodules you only need to:

git submodule deinit -f -- themes/eureka
rm -rf .git/modules/themes/eureka
git rm -f themes/eureka

Initialize Hugo Modules

Initialization of Hugo Modules requires Go 1.12 and above. If you haven’t installed Go, please refer to Install Go.

Use the following command to initialize Hugo Modules:

hugo mod init <module_name>

Finally, comment theme: eureka in config/_default/config.yaml and uncomment theme: wangchucheng.com/hugo-eureka.

At this point you have completed the migration from Git Submodules to Hugo Modules.


Please Star Eureka if you like it! Star