diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index c10c7fe..05469cc 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -15,7 +15,7 @@ permissions: # Environment variables available to all jobs and steps in this workflow env: HUGO_ENV: production - HUGO_VERSION: "0.118.2" + HUGO_VERSION: "0.121.2" GO_VERSION: "1.20.5" NODE_VERSION: "18.15.0" TINA_CLIENT_ID: ${{ vars.TINA_CLIENT_ID }} diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 047204d..fb785dc 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -3,7 +3,7 @@ stages: variables: HUGO_ENV: production - HUGO_VERSION: "0.118.2" + HUGO_VERSION: "0.121.2" GO_VERSION: "1.20.5" NODE_VERSION: "18.16.1" diff --git a/amplify.yml b/amplify.yml index 67b79ec..76d375a 100644 --- a/amplify.yml +++ b/amplify.yml @@ -4,11 +4,11 @@ frontend: preBuild: commands: - yum install -y curl - - curl -LO "https://github.com/gohugoio/hugo/releases/download/v0.118.2/hugo_extended_0.118.2_Linux-64bit.tar.gz" - - tar -xvf hugo_extended_0.118.2_Linux-64bit.tar.gz + - curl -LO "https://github.com/gohugoio/hugo/releases/download/v0.121.2/hugo_extended_0.121.2_Linux-64bit.tar.gz" + - tar -xvf hugo_extended_0.121.2_Linux-64bit.tar.gz - mv hugo /usr/local/bin/ - - rm hugo_extended_0.118.2_Linux-64bit.tar.gz - - echo "HUGO 0.118.2 INSTALLED" + - rm hugo_extended_0.121.2_Linux-64bit.tar.gz + - echo "HUGO 0.121.2 INSTALLED" - curl -LO "https://dl.google.com/go/go1.20.5.linux-amd64.tar.gz" - tar -C /usr/local -xzf go1.20.5.linux-amd64.tar.gz - export PATH=$PATH:/usr/local/go/bin diff --git a/exampleSite/go.mod b/exampleSite/go.mod index 358e8ac..1fa5a9c 100644 --- a/exampleSite/go.mod +++ b/exampleSite/go.mod @@ -25,5 +25,5 @@ require ( github.com/gethugothemes/hugo-modules/tab v0.0.0-20231227015948-b2308653c9e2 // indirect github.com/gethugothemes/hugo-modules/table-of-contents v0.0.0-20231227015948-b2308653c9e2 // indirect github.com/gethugothemes/hugo-modules/videos v0.0.0-20231227015948-b2308653c9e2 // indirect - github.com/zeon-studio/hugoplate v0.0.0-20231231021647-f2f9095d1de4 // indirect + github.com/zeon-studio/hugoplate v0.0.0-20240101043423-aa00fbb34355 // indirect ) diff --git a/exampleSite/hugo.toml b/exampleSite/hugo.toml index c67c9f5..3ae0d56 100755 --- a/exampleSite/hugo.toml +++ b/exampleSite/hugo.toml @@ -11,16 +11,20 @@ timeZone = "America/New_York" paginate = 2 # see https://gohugo.io/extras/pagination/ # post excerpt summaryLength = 10 # see https://gohugo.io/content-management/excerpts/ -# google analytics -googleAnalytics = "G-MEASUREMENT_ID" # see https://gohugo.io/templates/internal/#configure-google-analytics -# disqus short name -disqusShortname = "themefisher-template" # we use disqus to show comments in blog posts . To install disqus please follow this tutorial https://portfolio.peter-baumgartner.net/2017/09/10/how-to-install-disqus-on-hugo/ # disable language disableLanguages = [ ] # example: ["fr"] for disable french language. see https://gohugo.io/content-management/multilingual/ hasCJKLanguage = false # If hasCJKLanguage true, auto-detect Chinese/Japanese/Korean Languages in the content. see: https://gohugo.io/getting-started/configuration/#hascjklanguage +########################### Services ############################# +[services] +[services.googleAnalytics] +ID = 'G-MEASUREMENT_ID' # see https://gohugo.io/templates/internal/#configure-google-analytics + +[services.disqus] +shortname = 'themefisher-template' # we use disqus to show comments in blog posts . To install disqus please follow this tutorial https://portfolio.peter-baumgartner.net/2017/09/10/how-to-install-disqus-on-hugo/ + ########################## Permalinks ############################ [permalinks.page] "pages" = "/:slugorfilename/" diff --git a/layouts/blog/single.html b/layouts/blog/single.html index fd44621..31f83a8 100644 --- a/layouts/blog/single.html +++ b/layouts/blog/single.html @@ -62,7 +62,7 @@ - {{ if site.DisqusShortname }} + {{ if site.Config.Services.Disqus.Shortname }}
{{ template "_internal/disqus.html" . }}
diff --git a/netlify.toml b/netlify.toml index d659856..2418850 100755 --- a/netlify.toml +++ b/netlify.toml @@ -3,5 +3,5 @@ publish = "public" command = "yarn project-setup; yarn build" [build.environment] -HUGO_VERSION = "0.118.2" +HUGO_VERSION = "0.121.2" GO_VERSION = "1.20.5" diff --git a/package.json b/package.json index 91a98f9..8bee238 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "hugoplate", "description": "hugo tailwindcss boilerplate", - "version": "1.10.3", + "version": "1.11.0", "license": "MIT", "author": "zeon.studio", "scripts": { @@ -22,12 +22,12 @@ "@tailwindcss/forms": "^0.5.7", "@tailwindcss/typography": "^0.5.10", "autoprefixer": "^10.4.16", - "postcss": "^8.4.32", + "postcss": "^8.4.33", "postcss-cli": "^11.0.0", "prettier": "^3.1.1", "prettier-plugin-go-template": "0.0.15", - "prettier-plugin-tailwindcss": "^0.5.10", + "prettier-plugin-tailwindcss": "^0.5.11", "tailwind-bootstrap-grid": "^5.1.0", - "tailwindcss": "^3.4.0" + "tailwindcss": "^3.4.1" } } diff --git a/readme.md b/readme.md index 6072648..ac2b73e 100755 --- a/readme.md +++ b/readme.md @@ -9,8 +9,8 @@

- - + + @@ -149,6 +149,16 @@ You can change the social links from the `data/social.json` file. Add your socia We have added some custom scripts to make your life easier. You can use these scripts to help you with your development. +### 👉 Update Theme + +If you want to update the theme, then you can use the following command. It will update the theme to the latest version. + +```bash +npm run update-theme +``` + +> **Note:** This command will work after running `project-setup` script. + ### 👉 Update Modules We have added a lot of modules to this template. You can update all the modules using the following command. diff --git a/scripts/themeUpdate.js b/scripts/themeUpdate.js new file mode 100644 index 0000000..742cd20 --- /dev/null +++ b/scripts/themeUpdate.js @@ -0,0 +1,19 @@ +const { exec } = require("child_process"); + +const repositoryUrl = "https://github.com/zeon-studio/hugoplate"; +const localDirectory = "./themes/hugoplate"; +const foldersToFetch = ["assets", "layouts"]; +const foldersToSkip = ["exampleSite"]; + +const fetchFolder = (folder) => { + exec( + `curl -L ${repositoryUrl}/tarball/main | tar -xz --strip-components=1 --directory=${localDirectory} --exclude=$(curl -sL ${repositoryUrl}/tarball/main | tar -tz | grep -E "/(${foldersToSkip.join( + "|", + )})/") */${folder}`, + ); +}; + +// Fetch each specified folder +foldersToFetch.forEach((folder) => { + fetchFolder(folder); +}); diff --git a/theme.toml b/theme.toml index 992283e..0a68031 100644 --- a/theme.toml +++ b/theme.toml @@ -4,7 +4,7 @@ licenselink = "https://github.com/zeon-studio/hugoplate/blob/main/LICENSE" description = "Hugoplate is a free starter template built with Hugo, and TailwindCSS, providing everything you need to jumpstart your Hugo project and save valuable time." homepage = "https://github.com/zeon-studio/hugoplate" demosite = "https://zeon.studio/preview?project=hugoplate" -min_version = "0.118.2" +min_version = "0.121.2" tags = [ "blog", diff --git a/vercel-build.sh b/vercel-build.sh index 17138f0..f00c616 100755 --- a/vercel-build.sh +++ b/vercel-build.sh @@ -3,7 +3,7 @@ # default versions NODE_VERSION='18.16.1'; GO_VERSION='1.20.5'; -HUGO_VERSION='0.118.2'; +HUGO_VERSION='0.121.2'; # install Node.js # echo "Installing Node.js $NODE_VERSION..."