Skip to content

Commit

Permalink
Set docsy version in config as version
Browse files Browse the repository at this point in the history
  • Loading branch information
chalin committed Jul 29, 2022
1 parent 59df0c5 commit daeb7e1
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion userguide/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ archived_version = false
# The version number for the version of the docs represented in this doc set.
# Used in the "version-banner" partial to display a version number for the
# current doc set.
version = "0.0"
version = "0.4.0"

# A link to latest version of the docs. Used in the "version-banner" partial to
# point people to the main doc site.
Expand Down
14 changes: 7 additions & 7 deletions userguide/content/en/docs/Updating/Convert-site-to-module.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Run the following from the command line:
{{< tab header="Unix shell" lang="Bash" >}}
cd /path/to/my-existing-site
hugo mod init github.com/me-at-github/my-existing-site
hugo mod get github.com/google/docsy@v0.4.0
hugo mod get github.com/google/docsy@v{{% param "version" %}}
sed -i '/theme = \["docsy"\]/d' config.toml
cat >> config.toml <<EOL
[module]
Expand All @@ -30,7 +30,7 @@ hugo server
{{< tab header="Windows command line" lang="Batchfile" >}}
cd my-existing-site
hugo mod init github.com/me-at-github/my-existing-site
hugo mod get github.com/google/docsy@v0.4.0
hugo mod get github.com/google/docsy@v{{% param "version" %}}
findstr /v /c:"theme = [\"docsy\"]" config.toml > config.toml.temp
move /Y config.toml.temp config.toml
(echo [module]^
Expand Down Expand Up @@ -70,7 +70,7 @@ This creates two new files, `go.mod` for the module definitions and `go.sum` whi
Next declare the Docsy theme module as a dependency for your site.

```bash
hugo mod get github.com/google/docsy@v0.4.0
hugo mod get github.com/google/docsy@v{{% param "version" %}}
```

This command adds the `docsy` theme module to your definition file `go.mod`.
Expand Down Expand Up @@ -181,10 +181,10 @@ To make sure that your configuration settings are correct, run the command `hugo
```bash
hugo mod graph
hugo: collected modules in 1092 ms
github.com/me/my-existing-site github.com/google/docsy@v0.4.0
github.com/me/my-existing-site github.com/google/docsy/dependencies@v0.4.0
github.com/google/docsy/dependencies@v0.4.0 github.com/twbs/[email protected]+incompatible
github.com/google/docsy/dependencies@v0.4.0 github.com/FortAwesome/[email protected]
github.com/me/my-existing-site github.com/google/docsy@v{{% param "version" %}}
github.com/me/my-existing-site github.com/google/docsy/dependencies@v{{% param "version" %}}
github.com/google/docsy/dependencies@v{{% param "version" %}} github.com/twbs/[email protected]+incompatible
github.com/google/docsy/dependencies@v{{% param "version" %}} github.com/FortAwesome/[email protected]
```

Make sure that three lines with dependencies `docsy`, `bootstrap` and `Font-Awesome` are listed. If not, please double check your config settings.
Expand Down
4 changes: 2 additions & 2 deletions userguide/content/en/docs/Updating/Updating-hugo-module.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ Hugo automatically pulls in the latest theme version. That's it, your update is


{{% alert title="Tip" %}}
If you want to set your module to a certain version inside the docsy theme repo, simply specific the name of the tag representing this version (here: _v0.4.0_) when updating your theme:
If you want to set your module to a certain version inside the docsy theme repo, simply specific the name of the tag representing this version (here: _v{{% param "version" %}}_) when updating your theme:

```bash
hugo mod get -u github.com/google/docsy@v0.4.0
hugo mod get -u github.com/google/docsy@v{{% param "version" %}}
```

Instead of a version tag, you can also specify a commit hash inside the repo (here: _6c8a3afe_) when updating your theme:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ At your command prompt, run the following:
hugo new site my-new-site
cd my-new-site
hugo mod init github.com/me/my-new-site
hugo mod get github.com/google/docsy@v0.4.0
hugo mod get github.com/google/docsy@v{{% param "version" %}}
cat >> config.toml <<EOL
[module]
proxy = "direct"
Expand All @@ -36,7 +36,7 @@ hugo server
hugo new site my-new-site
cd my-new-site
hugo mod init github.com/me/my-new-site
hugo mod get github.com/google/docsy@v0.4.0
hugo mod get github.com/google/docsy@v{{% param "version" %}}
(echo [module]^

proxy = "direct"^
Expand Down Expand Up @@ -83,7 +83,7 @@ This creates two new files, `go.mod` for the module definitions and `go.sum` whi
Next declare the Docsy theme module as a dependency for your site.

```bash
hugo mod get github.com/google/docsy@v0.4.0
hugo mod get github.com/google/docsy@v{{% param "version" %}}
```

This command adds the `docsy` theme module to your definition file `go.mod`.
Expand Down

0 comments on commit daeb7e1

Please sign in to comment.