From bf0fea98d0954edc3aa4b2d0e613d283ccab559e Mon Sep 17 00:00:00 2001 From: Agriya Khetarpal <74401230+agriyakhetarpal@users.noreply.github.com> Date: Sat, 12 Sep 2026 00:14:23 +0530 Subject: [PATCH] Document cloning submodules recursively --- doc/content/user_guide/getstarted.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/doc/content/user_guide/getstarted.md b/doc/content/user_guide/getstarted.md index 272b2c49..3d399276 100644 --- a/doc/content/user_guide/getstarted.md +++ b/doc/content/user_guide/getstarted.md @@ -37,6 +37,7 @@ This theme is designed to be used as a Git submodule inside your site's source r ```sh git submodule add https://github.com/scientific-python/scientific-python-hugo-theme themes/scientific-python-hugo-theme + git submodule update --init --recursive ``` 3. Copy the theme's example site as a template: @@ -55,6 +56,25 @@ This theme is designed to be used as a Git submodule inside your site's source r Load that URL in your browser. If you see the theme's documentation page, the site compiled successfully and you can customize it with your own content. +## Update the theme + +To move your site to a newer theme release, check out the tag inside the +submodule and refresh its nested submodules: + +```sh +cd themes/scientific-python-hugo-theme +git fetch --tags +git checkout v0.23 +git submodule update --init --recursive +cd ../.. +``` + +Then commit the updated submodule pointer. Anything that clones your site, +such as a `Makefile` target or a CI workflow, should also fetch submodules +recursively. For example, use `git clone --recurse-submodules`, +`git submodule update --init --recursive`, or `submodules: recursive` with +`actions/checkout`. Netlify already clones submodules recursively. + ## Develop your site Proceed to develop your site by adding content and custom resources like CSS or JavaScript.