I’m new to Hugo, I’m sorry if I miss something.
In “Get Started ->Quick Start -> Step3 :add a theme”:
cd quickstart;\
git init;\
git submodule add URL_TO_THEME themes/ananke;
But in “Themes ->Install and Use Themes -> Install a Single Theme”:
cd theme
git clone URL_TO_THEME
I’m confused about the difference between the two methods.
The main difference between the sets of commands is that the first command makes the theme a submodule whereas the second command clones (think downloads) the theme.
Submodules link your site and the theme’s repository. The submodule becomes a dependency to your project, so when you push to a remote git repository (e.g. GitHub) the theme’s files aren’t in your repository, rather a link to the theme’s repository is. According to the documentation if you’re using Netlify to host your site, you need to use submodules with themes.
1 Like