Skip to content

Commit

Permalink
docs, conversion to module: adaption
Browse files Browse the repository at this point in the history
  • Loading branch information
deining committed Nov 16, 2023
1 parent 9a2b6e5 commit 836db85
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 26 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ This page describes the prerequisites for building a site that uses Docsy as a H

## Install Hugo

You need a [recent **extended** version](https://github.com/gohugoio/hugo/releases) (we recommend version 0.73.0 or later) of [Hugo](https://gohugo.io/) to do local builds and previews of sites (like this one) that use Docsy. If you install from the release page, make sure to get the `extended` Hugo version, which supports [SCSS](https://sass-lang.com/documentation/file.SCSS_FOR_SASS_USERS.html); you may need to scroll down the list of releases to see it.
You need a [recent **extended** version](https://github.com/gohugoio/hugo/releases) (version 0.110.0 or later) of [Hugo](https://gohugo.io/) to do local builds and previews of sites (like this one) that use Docsy. If you install from the release page, make sure to get the `extended` Hugo version, which supports [SCSS](https://sass-lang.com/documentation/file.SCSS_FOR_SASS_USERS.html); you may need to scroll down the list of releases to see it.

For comprehensive Hugo documentation, see [gohugo.io](https://gohugo.io).

Expand All @@ -24,7 +24,7 @@ If you've already installed Hugo, check your version:
hugo version
```

If the result is `v0.73` or earlier, or if you don't see `Extended`, you'll need to install the latest version. You can see a complete list of Linux installation options in [Install Hugo](https://gohugo.io/getting-started/installing/#linux). The following shows you how to install Hugo from the release page:
If the result is `v0.109.0` or earlier, or if you don't see `Extended`, you'll need to install the latest version. You can see a complete list of Linux installation options in [Install Hugo](https://gohugo.io/getting-started/installing/#linux). The following shows you how to install Hugo from the release page:

1. Go to the [Hugo releases](https://github.com/gohugoio/hugo/releases) page.
2. In the most recent release, scroll down until you find a list of
Expand Down Expand Up @@ -70,7 +70,7 @@ Hugo's commands for module management require that the Go programming language i
```console
$ go version
go version go1.20.5
go version go1.21.4
```
Ensure that you are using version 1.12 or higher.
Expand All @@ -84,7 +84,7 @@ Hugo's commands for module management require that the `git` client is installed

```console
$ git version
git version 2.41.0
git version 2.42.1
```

If no `git` client is installed on your system yet, go to the [Git website](https://git-scm.com/), download the installer for your system architecture and execute it. Afterwards, check for a successful installation.
Expand Down Expand Up @@ -138,11 +138,11 @@ You can check your current Node.js version by running `node -v`. If you need to
```bash
# Using Ubuntu
curl -fsSL https://deb.nodesource.com/setup_18.x | sudo -E bash -
curl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash -
sudo apt-get install -y nodejs
# Using Debian, as root
curl -fsSL https://deb.nodesource.com/setup_18.x | bash -
curl -fsSL https://deb.nodesource.com/setup_20.x | bash -
apt-get install -y nodejs
```
Expand All @@ -152,10 +152,10 @@ You can check your current Node.js version by running `node -v`. If you need to
```bash
# As root
curl -fsSL https://rpm.nodesource.com/setup_18.x | bash -
curl -fsSL https://rpm.nodesource.com/setup_20.x | bash -
# No root privileges
curl -fsSL https://rpm.nodesource.com/setup_18.x | sudo bash -
curl -fsSL https://rpm.nodesource.com/setup_20.x | sudo bash -
```
Expand Down
23 changes: 5 additions & 18 deletions userguide/content/en/docs/updating/convert-site-to-module.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@ cat >> hugo.toml <<EOL
proxy = "direct"
[[module.imports]]
path = "github.com/google/docsy"
[[module.imports]]
path = "github.com/google/docsy/dependencies"
EOL
hugo server
{{< /tab >}}
Expand All @@ -39,11 +37,7 @@ proxy = "direct"^

[[module.imports]]^

path = "github.com/google/docsy"^

[[module.imports]]^

path = "github.com/google/docsy/dependencies")>>hugo.toml
path = "github.com/google/docsy")>>hugo.toml
hugo server
{{< /tab >}}
{{< /tabpane >}}
Expand Down Expand Up @@ -97,17 +91,15 @@ Change this line to:
{{< tabpane >}}
{{< tab header="Configuration file:" disabled=true />}}
{{< tab header="hugo.toml" lang="toml" >}}
theme = ["github.com/google/docsy", "github.com/google/docsy/dependencies"]
theme = ["github.com/google/docsy"]
{{< /tab >}}
{{< tab header="config.yaml" lang="yaml" >}}
theme:
- github.com/google/docsy
- github.com/google/docsy/dependencies
{{< /tab >}}
{{< tab header="hugo.json" lang="json" >}}
"theme": [
"github.com/google/docsy",
"github.com/google/docsy/dependencies"
"github.com/google/docsy"
]
{{< /tab >}}
{{< /tabpane >}}
Expand All @@ -127,9 +119,6 @@ Alternatively, you can omit this line altogether and replace it with the setting
[[module.imports]]
path = "github.com/google/docsy"
disable = false
[[module.imports]]
path = "github.com/google/docsy/dependencies"
disable = false
{{< /tab >}}
{{< tab header="hugo.yaml" lang="yaml" >}}
module:
Expand Down Expand Up @@ -186,9 +175,8 @@ To make sure that your configuration settings are correct, run the command `hugo
hugo mod graph
hugo: collected modules in 1092 ms
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]
github.com/google/docsy@v{{% param "version" %}} github.com/twbs/[email protected]+incompatible
github.com/google/docsy@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 All @@ -201,7 +189,6 @@ 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/dependencies"
hugo: cleaned module cache for "github.com/twbs/bootstrap"
```
{{% /alert %}}
Expand Down

0 comments on commit 836db85

Please sign in to comment.