diff --git a/package.json b/package.json index 96a3d3dca1..3a1a498f8c 100644 --- a/package.json +++ b/package.json @@ -79,7 +79,7 @@ "docs-compile": "npm run docs-build", "docs-vnu": "node build/vnu-jar.mjs", "docs-lint": "npm run docs-vnu", - "docs-serve": "hugo server --port 9001 --disableFastRender --printUnusedTemplates", + "docs-serve": "hugo server --port 9001 --disableFastRender --noHTTPCache --renderToMemory --printPathWarnings --printUnusedTemplates", "docs-serve-only": "npx sirv-cli _site --port 9001", "lockfile-lint": "lockfile-lint --allowed-hosts npm --allowed-schemes https: --empty-hostname false --type npm --path package-lock.json", "update-deps": "ncu -u -x globby,jasmine,karma-browserstack-launcher,karma-rollup-preprocessor && echo Manually update site/assets/js/vendor", diff --git a/site/layouts/_default/examples.html b/site/layouts/_default/examples.html index 82e57c1b57..19aad368d6 100644 --- a/site/layouts/_default/examples.html +++ b/site/layouts/_default/examples.html @@ -14,7 +14,7 @@ {{- end }} - {{- $colorModeJS := printf "/docs/%s/assets/js/color-modes.js" $.Site.Params.docs_version -}} + {{- $colorModeJS := urls.JoinPath "/docs" $.Site.Params.docs_version "assets/js/color-modes.js" -}} {{ partial "stylesheet" . }} diff --git a/site/layouts/partials/docs-sidebar.html b/site/layouts/partials/docs-sidebar.html index e7b5576874..891a47306a 100644 --- a/site/layouts/partials/docs-sidebar.html +++ b/site/layouts/partials/docs-sidebar.html @@ -28,7 +28,7 @@ {{- range $doc := $group.pages -}} {{- $doc_slug := $doc.title | urlize -}} {{- $is_active := and $is_active_group (eq $page_slug $doc_slug) -}} - {{- $href := printf "/docs/%s/%s/%s/" $.Site.Params.docs_version $group_slug $doc_slug }} + {{- $href := urls.JoinPath "/docs" $.Site.Params.docs_version $group_slug $doc_slug "/" }}