Skip to content

Commit 2078b01

Browse files
docs: specify hugo 150 (mongodb#4664)
1 parent 06b50af commit 2078b01

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

etc/docs/README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ necessary to backport a feature).
1414

1515
`build.ts` requires the following in addition to dependencies installed with `npm i`:
1616

17-
* Hugo static web generator `v0.30.2`
18-
* You can download the right version [here](https://github.com/gohugoio/hugo/releases/tag/v0.30.2)
17+
* Hugo static web generator `v0.150.0`
18+
* You can download the right version [here](https://github.com/gohugoio/hugo/releases/tag/v0.150.0)
1919
* ts-node
2020

2121
Note: `typedoc` is also a dependency but it is downloaded by the docs generation script automatically.
@@ -32,6 +32,8 @@ To generate API documentation for a new major or minor version:
3232

3333
`npm run build:docs -- --tag <version>`
3434

35+
`<version>` should be formatted MAJOR.MINOR (ex. `--tag=6.8`)
36+
3537
You can optionally specify the following options:
3638

3739
- `--yes` if set, this will silence any prompts in the script. useful for running in CI

etc/docs/build.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,6 @@ async function updateSiteTemplateForNewVersion(
6767

6868
await writeFile(RELEASES_TOML_FILE, stringify(tomlData as any));
6969
await writeFile(RELEASES_JSON_FILE, JSON.stringify(jsonVersions, null, 4));
70-
7170
// generate the site from the template
7271
await exec(`hugo -s template -d ../temp -b "/node-mongodb-native"`);
7372
}
@@ -80,6 +79,9 @@ async function main() {
8079
process.exit(1);
8180
}
8281

82+
const { stdout } = await exec('hugo version', { encoding: 'utf8' });
83+
if (!stdout.includes('0.150.0')) throw new Error('`hugo` version must be 0.150.0.');
84+
8385
chdir(__dirname);
8486

8587
const { tag, status, skipPrompts } = getCommandLineArguments();

0 commit comments

Comments
 (0)