From 0ca07cdc1dfd1ab3594d9f29fcb6658d79b95b74 Mon Sep 17 00:00:00 2001 From: Somrat <58769763+tfsomrat@users.noreply.github.com> Date: Sat, 9 Mar 2024 13:38:53 +0600 Subject: [PATCH] update package json and scripts --- .github/workflows/main.yml | 4 ++-- .gitlab-ci.yml | 4 ++-- README.md | 4 ++-- exampleSite/config/_default/module.toml | 4 ++-- netlify.toml | 6 +++--- package.json | 14 +++++++------- scripts/projectSetup.js | 5 +---- scripts/themeSetup.js | 5 +---- vercel-build.sh | 4 ++-- 9 files changed, 22 insertions(+), 28 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 8332edc..5d16917 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -15,8 +15,8 @@ permissions: # Environment variables available to all jobs and steps in this workflow env: HUGO_ENV: production - HUGO_VERSION: "0.115.1" - GO_VERSION: "1.20.5" + HUGO_VERSION: "0.123.8" + GO_VERSION: "1.22.0" NODE_VERSION: "18.15.0" TINA_CLIENT_ID: ${{ vars.TINA_CLIENT_ID }} TINA_TOKEN: ${{ vars.TINA_TOKEN }} diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 56041e8..a3179d3 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -3,8 +3,8 @@ stages: variables: HUGO_ENV: production - HUGO_VERSION: "0.115.1" - GO_VERSION: "1.20.5" + HUGO_VERSION: "0.123.8" + GO_VERSION: "1.22.0" NODE_VERSION: "18.16.1" cache: diff --git a/README.md b/README.md index 224f2d7..21d7b63 100644 --- a/README.md +++ b/README.md @@ -5,8 +5,8 @@
- - + + diff --git a/exampleSite/config/_default/module.toml b/exampleSite/config/_default/module.toml index ab3997c..f608b3b 100644 --- a/exampleSite/config/_default/module.toml +++ b/exampleSite/config/_default/module.toml @@ -1,6 +1,6 @@ [hugoVersion] extended = true -min = "0.115.1" +min = "0.123.8" [[imports]] path = "github.com/gohugoio/hugo-mod-bootstrap-scss/v5" @@ -102,4 +102,4 @@ path = "github.com/gethugothemes/hugo-modules/gzip-caching" path = "github.com/gethugothemes/hugo-modules/adsense" [[imports]] -path = "github.com/gethugothemes/hugo-modules/videos" \ No newline at end of file +path = "github.com/gethugothemes/hugo-modules/videos" diff --git a/netlify.toml b/netlify.toml index dc08d4f..c9ecb90 100755 --- a/netlify.toml +++ b/netlify.toml @@ -3,6 +3,6 @@ publish = "public" command = "yarn project-setup && yarn build" [build.environment] -HUGO_VERSION = "0.115.1" -GO_VERSION = "1.20.5" -HUGO_BASEURL = "/" \ No newline at end of file +HUGO_VERSION = "0.123.8" +GO_VERSION = "1.22.0" +HUGO_BASEURL = "/" diff --git a/package.json b/package.json index c32157c..a60e34d 100644 --- a/package.json +++ b/package.json @@ -1,15 +1,15 @@ { "name": "dot-hugo", - "version": "2.6.0", - "license": "UNLICENSED", + "version": "3.0.0", + "license": "MIT", "author": "gethugothemes", "scripts": { "dev": "hugo server", - "build": "hugo --gc --minify --templateMetrics --templateMetricsHints --buildDrafts --buildExpired --buildFuture --forceSyncStatic", - "test": "hugo server --disableFastRender --navigateToChanged --templateMetrics --templateMetricsHints --buildDrafts --buildExpired --buildFuture --watch --forceSyncStatic -e production --minify", - "dev:example": "cd exampleSite; hugo server --themesDir ../..", - "build:example": "cd exampleSite; hugo --themesDir ../.. --gc --minify --templateMetrics --templateMetricsHints --buildDrafts --buildExpired --buildFuture --forceSyncStatic", - "test:example": "cd exampleSite; hugo server --themesDir ../.. --disableFastRender --navigateToChanged --templateMetrics --templateMetricsHints --buildDrafts --buildExpired --buildFuture --watch --forceSyncStatic -e production --minify", + "build": "hugo --gc --minify --templateMetrics --templateMetricsHints --forceSyncStatic", + "preview": "hugo server --disableFastRender --navigateToChanged --templateMetrics --templateMetricsHints --watch --forceSyncStatic -e production --minify", + "dev:example": "cd exampleSite; hugo server", + "build:example": "cd exampleSite; hugo --gc --minify --templateMetrics --templateMetricsHints --forceSyncStatic", + "preview:example": "cd exampleSite; hugo server --disableFastRender --navigateToChanged --templateMetrics --templateMetricsHints --watch --forceSyncStatic -e production --minify", "update-modules": "node ./scripts/clearModules.js && hugo mod clean --all && hugo mod get -u ./... && hugo mod tidy", "project-setup": "node ./scripts/projectSetup.js", "theme-setup": "node ./scripts/themeSetup.js", diff --git a/scripts/projectSetup.js b/scripts/projectSetup.js index 4585fc9..16de15f 100644 --- a/scripts/projectSetup.js +++ b/scripts/projectSetup.js @@ -2,10 +2,7 @@ const fs = require("fs"); const path = require("path"); const getFolderName = (rootfolder) => { - const configPath = path.join( - rootfolder, - "exampleSite/config/_default/hugo.toml" - ); + const configPath = path.join(rootfolder, "exampleSite/hugo.toml"); const getConfig = fs.readFileSync(configPath, "utf8"); const match = getConfig.match(/theme\s*=\s*\[?"([^"\]]+)"\]?/); let selectedTheme = null; diff --git a/scripts/themeSetup.js b/scripts/themeSetup.js index a2f1d5e..17ea9e2 100644 --- a/scripts/themeSetup.js +++ b/scripts/themeSetup.js @@ -14,10 +14,7 @@ const deleteFolder = (folderPath) => { }; const getFolderName = (rootfolder) => { - const configPath = path.join( - rootfolder, - "exampleSite/config/_default/hugo.toml" - ); + const configPath = path.join(rootfolder, "exampleSite/hugo.toml"); const getConfig = fs.readFileSync(configPath, "utf8"); const match = getConfig.match(/theme\s*=\s*\[?"([^"\]]+)"\]?/); let selectedTheme = null; diff --git a/vercel-build.sh b/vercel-build.sh index c9c4055..eb753cc 100755 --- a/vercel-build.sh +++ b/vercel-build.sh @@ -2,8 +2,8 @@ # default versions NODE_VERSION='18.16.1'; -GO_VERSION='1.20.5'; -HUGO_VERSION='0.115.1'; +GO_VERSION='1.22.0'; +HUGO_VERSION='0.123.8'; # install Node.js # echo "Installing Node.js $NODE_VERSION..."