From 06d5ed3046769f1678c26db1f3db3ba2a270d958 Mon Sep 17 00:00:00 2001 From: Patrice Chalin Date: Thu, 16 May 2024 17:12:23 -0400 Subject: [PATCH] [infra] Hugo config clean up and NPM script adjustments (#4498) --- hugo.yaml | 2 +- package.json | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/hugo.yaml b/hugo.yaml index b09c98601110..ae380fea4566 100644 --- a/hugo.yaml +++ b/hugo.yaml @@ -201,7 +201,7 @@ services: # The following is a placeholder (fake) ID useful for local test builds. The # real ID is set in the Netlify config. For details, see # https://github.com/open-telemetry/opentelemetry.io/issues/1626. - id: UA-00000000-0 # TODO: switch to G-0000000000 once we get confirmation that it's ok to do so + id: G-0000000000 security: funcs: # cspell:disable-line diff --git a/package.json b/package.json index 5d5bf845d2b0..3cc7630b1e0f 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,7 @@ ], "scripts": { "__check:links": "make --keep-going check-links", - "_build": "hugo --cleanDestinationDir -e dev -DFE --baseURL \"${DEPLOY_PRIME_URL:-http://localhost}\"", + "_build": "npm run _hugo -- -e dev -DFE --baseURL \"${DEPLOY_PRIME_URL:-http://localhost}\"", "_check:format:any": "npx prettier --check --ignore-path ''", "_check:format": "npx prettier --check .", "_check:links--md": "npx markdown-link-check --config .markdown-link-check.json *.md", @@ -20,6 +20,7 @@ "_get:no": "echo SKIPPING get operation", "_get:submodule:non-lang": "npm run _get:submodule -- content-modules/opentelemetry-specification themes/docsy", "_get:submodule": "set -x && git submodule update --init ${DEPTH:- --depth 1}", + "_hugo": "hugo --cleanDestinationDir", "_list:check:*": "npm run --loglevel=warn | grep -Ee '^\\s*check:[^:]+$'", "_list:fix:*": "npm run --loglevel=warn | grep -Ee '^\\s*fix:[^:]+$' | grep -v 'fix:all'", "_ls-bad-filenames": "find assets content static -name '*_*' ! -name '_*'", @@ -32,7 +33,7 @@ "_sync": "./scripts/sync-submodules.pl", "all": "bash -c 'x=0; for c in \"$@\"; do npm run $c || x=$((x+1)); done; ((!x)) || (echo \"ERROR: some scripts failed!\" && exit 1)' -", "build:preview": "set -x && npm run _build -- --minify", - "build:production": "hugo --cleanDestinationDir --minify", + "build:production": "npm run _hugo --minify", "build": "npm run _build", "cd:public": "cd public &&", "check:filenames": "test -z \"$(npm run -s _ls-bad-filenames)\" || npm run -s _filename-error",