45 lines
796 B
Markdown
45 lines
796 B
Markdown
---
|
|
title: Installation
|
|
---
|
|
|
|
## Hugo module
|
|
|
|
`hugo mod init ${url}/ module name`
|
|
|
|
config.toml:
|
|
|
|
```toml
|
|
[module]
|
|
[[module.imports]]
|
|
path = 'git.sr.ht/~earnestma/nwt'
|
|
```
|
|
|
|
`hugo mod get git.sr.ht/~earnestma/nwt@{version}`
|
|
|
|
## Use a tarball
|
|
|
|
Grab a tagged version through `https://git.sr.ht/~earnestma/nwt/archive/${version}.tar.gz` and extract it: `themes/nwt`.
|
|
|
|
## Git subtree
|
|
|
|
```bash
|
|
# Add the remote
|
|
git remote add -f nwt https://git.sr.ht/~earnestma/nwt
|
|
|
|
# Add the subtree
|
|
git subtree add --prefix themes/nwt nwt ${version} --squash
|
|
|
|
# Updates
|
|
git subtree pull --prefix themes/nwt nwt ${version} --squash
|
|
```
|
|
|
|
## Git submodule
|
|
|
|
```bash
|
|
git submodule add https://git.sr.ht/~earnestma/nwt themes/nwt
|
|
cd themes/nwt
|
|
|
|
# checkout the latest tag
|
|
git checkout $(git tag --contains | tail -1)
|
|
```
|