Skip to content

Commit bf0fea9

Browse files
Document cloning submodules recursively
1 parent d1173fe commit bf0fea9

1 file changed

Lines changed: 20 additions & 0 deletions

File tree

‎doc/content/user_guide/getstarted.md‎

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ This theme is designed to be used as a Git submodule inside your site's source r
3737

3838
```sh
3939
git submodule add https://github.com/scientific-python/scientific-python-hugo-theme themes/scientific-python-hugo-theme
40+
git submodule update --init --recursive
4041
```
4142

4243
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
5556

5657
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.
5758

59+
## Update the theme
60+
61+
To move your site to a newer theme release, check out the tag inside the
62+
submodule and refresh its nested submodules:
63+
64+
```sh
65+
cd themes/scientific-python-hugo-theme
66+
git fetch --tags
67+
git checkout v0.23
68+
git submodule update --init --recursive
69+
cd ../..
70+
```
71+
72+
Then commit the updated submodule pointer. Anything that clones your site,
73+
such as a `Makefile` target or a CI workflow, should also fetch submodules
74+
recursively. For example, use `git clone --recurse-submodules`,
75+
`git submodule update --init --recursive`, or `submodules: recursive` with
76+
`actions/checkout`. Netlify already clones submodules recursively.
77+
5878
## Develop your site
5979

6080
Proceed to develop your site by adding content and custom resources like CSS or JavaScript.

0 commit comments

Comments
 (0)