Skip to content

Commit

Permalink
Update docu to reflect changes made in e444964.
Browse files Browse the repository at this point in the history
  • Loading branch information
deining committed Feb 6, 2022
1 parent 4026da1 commit 0c2cbf9
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 23 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@ 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.2.0-pre
hugo mod get github.com/google/docsy/module@v0.2.0-pre
hugo mod get github.com/google/docsy/dependencies@v0.2.0-pre
cat >> config.toml <<EOL
[module]
[[module.imports]]
path = "github.com/google/docsy"
[[module.imports]]
path = "github.com/google/docsy/module"
path = "github.com/google/docsy/dependencies"
EOL
hugo server
{{< /tab >}}
Expand All @@ -35,7 +35,7 @@ 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.2.0-pre
hugo mod get github.com/google/docsy/module@v0.2.0-pre
hugo mod get github.com/google/docsy/dependencies@v0.2.0-pre
(echo [module]^

[[module.imports]]^
Expand All @@ -44,7 +44,7 @@ path = "github.com/google/docsy"^

[[module.imports]]^

path = "github.com/google/docsy/module")>>config.toml
path = "github.com/google/docsy/dependencies")>>config.toml
hugo server
{{< /tab >}}
{{< /tabpane >}}
Expand Down Expand Up @@ -77,14 +77,14 @@ hugo mod init github.com/me/my-new-site

This will create two new files, `go.mod` for the module definitions and `go.sum` which holds the checksums for module verification.

Afterwards, declare the docsy theme module as a dependency for your site. Also declare the submodule `module` as a second dependency. The submodule will pull in both a workaround for a bug in Go's module management and the dependencies `bootstrap` and `Font-Awesome`.
Afterwards, declare the docsy theme module as a dependency for your site. Also declare the submodule `dependencies` as a second dependency. The submodule will pull in both a workaround for a bug in Go's module management and the dependencies `bootstrap` and `Font-Awesome`.

```
hugo mod get github.com/google/docsy@v0.2.0-pre
hugo mod get github.com/google/docsy/module@v0.2.0-pre
hugo mod get github.com/google/docsy/dependencies@v0.2.0-pre
```

These commands will add both the docsy theme module and the submodule to your definition file `go.mod`.
These commands will add both the `docsy` theme module and the `dependencies` submodule to your definition file `go.mod`.

### Add theme module configuration settings

Expand All @@ -102,7 +102,7 @@ Next, add the settings given in the code box below at the end of your site confi
path = "github.com/google/docsy"
disable = false
[[module.imports]]
path = "github.com/google/docsy/module"
path = "github.com/google/docsy/dependencies"
disable = false
{{< /tab >}}
{{< tab header="config.yaml" >}}
Expand All @@ -114,7 +114,7 @@ module:
- path: github.com/google/docsy
disable: false
imports:
- path: github.com/google/docsy/module
- path: github.com/google/docsy/dependencies
disable: false
{{< /tab >}}
{{< tab header="config.json" >}}
Expand All @@ -130,7 +130,7 @@ module:
"disable": false
},
{
"path": "github.com/google/docsy/module",
"path": "github.com/google/docsy/dependencies",
"disable": false
}
]
Expand Down
26 changes: 13 additions & 13 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 @@ At your command prompt, issue:
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.2.0-pre
hugo mod get github.com/google/docsy/module@v0.2.0-pre
hugo mod get github.com/google/docsy/dependencies@v0.2.0-pre
sed -i '/theme = \["docsy"\]/d' config.toml
cat >> config.toml <<EOL
[module]
Expand All @@ -30,7 +30,7 @@ hugo server
cd my-existing-site
hugo mod init github.com/me-at-github/my-existing-site
hugo mod get github.com/google/docsy@v0.2.0-pre
hugo mod get github.com/google/docsy/module@v0.2.0-pre
hugo mod get github.com/google/docsy/dependencies@v0.2.0-pre
findstr /v /c:"theme = [\"docsy\"]" config.toml > config.toml.temp
move /Y config.toml.temp config.toml
(echo [module]^
Expand Down Expand Up @@ -65,14 +65,14 @@ hugo mod init github.com/me/my-existing-site

This will create two new files, `go.mod` for the module definitions and `go.sum` which holds the checksums for module verification.

Afterwards, declare the docsy theme module as a dependency for your site. Also declare the submodule `module` as a second dependency. The submodule will pull in both a workaround for a bug in Go's module management and the dependencies `bootstrap` and `Font-Awesome`.
Afterwards, declare the docsy theme module as a dependency for your site. Also declare the submodule `dependencies` as a second dependency. The submodule will pull in both a workaround for a bug in Go's module management and the dependencies `bootstrap` and `Font-Awesome`.

```
hugo mod get github.com/google/docsy@v0.2.0-pre
hugo mod get github.com/google/docsy/module@v0.2.0-pre
hugo mod get github.com/google/docsy/dependencies@v0.2.0-pre
```

This will add the docsy theme module to your definition file `go.mod`.
These commands will add both the `docsy` theme module and the `dependencies` submodule to your definition file `go.mod`.

### Alter the docsy theme definition from local install to Hugo module

Expand All @@ -85,7 +85,7 @@ theme = ["docsy"]
Change this line to:

```
theme = ["github.com/google/docsy", "github.com/google/docsy/module"]
theme = ["github.com/google/docsy", "github.com/google/docsy/dependencies"]
```

Alternatively, you may this line altogether and replace it with the settings given in the code box below:
Expand All @@ -102,7 +102,7 @@ Alternatively, you may this line altogether and replace it with the settings giv
path = "github.com/google/docsy"
disable = false
[[module.imports]]
path = "github.com/google/docsy/module"
path = "github.com/google/docsy/dependencies"
disable = false
{{< /tab >}}
{{< tab header="config.yaml" >}}
Expand All @@ -114,7 +114,7 @@ module:
- path: github.com/google/docsy
disable: false
imports:
- path: github.com/google/docsy/module
- path: github.com/google/docsy/dependencies
disable: false
{{< /tab >}}
{{< tab header="config.json" >}}
Expand All @@ -130,7 +130,7 @@ module:
"disable": false
},
{
"path": "github.com/google/docsy/module",
"path": "github.com/google/docsy/dependencies",
"disable": false
}
]
Expand All @@ -151,9 +151,9 @@ To make sure that your configuration settings are correct, issue the command `hu
hugo mod graph
hugo: collected modules in 1092 ms
github.com/me/my-existing-site github.com/google/docsy@v0.2.0-pre
github.com/me/my-existing-site github.com/google/docsy/module@v0.2.0-pre
github.com/google/docsy/module@v0.2.0-pre github.com/twbs/bootstrap@v4.6.1+incompatible
github.com/google/docsy/module@v0.2.0-pre github.com/FortAwesome/Font-Awesome@v0.0.0-20210804190922-7d3d774145ac
github.com/me/my-existing-site github.com/google/docsy/dependencies@v0.2.0-pre
github.com/google/docsy/dependencies@v0.2.0-pre github.com/twbs/bootstrap@v4.6.1+incompatible
github.com/google/docsy/dependencies@v0.2.0-pre github.com/FortAwesome/Font-Awesome@v0.0.0-20210804190922-7d3d774145ac
```

Make sure that three lines with dependencies `docsy`, `bootstrap` and `Font-Awesome` are listed. If not, please double check your config settings.
Expand All @@ -166,7 +166,7 @@ hugo mod clean
hugo: collected modules in 995 ms
hugo: cleaned module cache for "github.com/FortAwesome/Font-Awesome"
hugo: cleaned module cache for "github.com/google/docsy"
hugo: cleaned module cache for "github.com/google/docsy/module"
hugo: cleaned module cache for "github.com/google/docsy/dependencies"
hugo: cleaned module cache for "github.com/twbs/bootstrap"
```
{{% /alert %}}
Expand Down

0 comments on commit 0c2cbf9

Please sign in to comment.