update hugo config services and added theme-update script

This commit is contained in:
somrat sorkar 2024-01-08 11:42:36 +06:00
parent aa00fbb343
commit c0d75b264b
12 changed files with 54 additions and 21 deletions

View File

@ -15,7 +15,7 @@ permissions:
# Environment variables available to all jobs and steps in this workflow # Environment variables available to all jobs and steps in this workflow
env: env:
HUGO_ENV: production HUGO_ENV: production
HUGO_VERSION: "0.118.2" HUGO_VERSION: "0.121.2"
GO_VERSION: "1.20.5" GO_VERSION: "1.20.5"
NODE_VERSION: "18.15.0" NODE_VERSION: "18.15.0"
TINA_CLIENT_ID: ${{ vars.TINA_CLIENT_ID }} TINA_CLIENT_ID: ${{ vars.TINA_CLIENT_ID }}

View File

@ -3,7 +3,7 @@ stages:
variables: variables:
HUGO_ENV: production HUGO_ENV: production
HUGO_VERSION: "0.118.2" HUGO_VERSION: "0.121.2"
GO_VERSION: "1.20.5" GO_VERSION: "1.20.5"
NODE_VERSION: "18.16.1" NODE_VERSION: "18.16.1"

View File

@ -4,11 +4,11 @@ frontend:
preBuild: preBuild:
commands: commands:
- yum install -y curl - 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" - 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.118.2_Linux-64bit.tar.gz - tar -xvf hugo_extended_0.121.2_Linux-64bit.tar.gz
- mv hugo /usr/local/bin/ - mv hugo /usr/local/bin/
- rm hugo_extended_0.118.2_Linux-64bit.tar.gz - rm hugo_extended_0.121.2_Linux-64bit.tar.gz
- echo "HUGO 0.118.2 INSTALLED" - echo "HUGO 0.121.2 INSTALLED"
- curl -LO "https://dl.google.com/go/go1.20.5.linux-amd64.tar.gz" - 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 - tar -C /usr/local -xzf go1.20.5.linux-amd64.tar.gz
- export PATH=$PATH:/usr/local/go/bin - export PATH=$PATH:/usr/local/go/bin

View File

@ -25,5 +25,5 @@ require (
github.com/gethugothemes/hugo-modules/tab v0.0.0-20231227015948-b2308653c9e2 // indirect 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/table-of-contents v0.0.0-20231227015948-b2308653c9e2 // indirect
github.com/gethugothemes/hugo-modules/videos 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
) )

View File

@ -11,16 +11,20 @@ timeZone = "America/New_York"
paginate = 2 # see https://gohugo.io/extras/pagination/ paginate = 2 # see https://gohugo.io/extras/pagination/
# post excerpt # post excerpt
summaryLength = 10 # see https://gohugo.io/content-management/excerpts/ 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 # disable language
disableLanguages = [ disableLanguages = [
] # example: ["fr"] for disable french language. see https://gohugo.io/content-management/multilingual/ ] # 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 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 ############################
[permalinks.page] [permalinks.page]
"pages" = "/:slugorfilename/" "pages" = "/:slugorfilename/"

View File

@ -62,7 +62,7 @@
</div> </div>
</div> </div>
<!-- comments --> <!-- comments -->
{{ if site.DisqusShortname }} {{ if site.Config.Services.Disqus.Shortname }}
<div class="mt-20"> <div class="mt-20">
{{ template "_internal/disqus.html" . }} {{ template "_internal/disqus.html" . }}
</div> </div>

View File

@ -3,5 +3,5 @@ publish = "public"
command = "yarn project-setup; yarn build" command = "yarn project-setup; yarn build"
[build.environment] [build.environment]
HUGO_VERSION = "0.118.2" HUGO_VERSION = "0.121.2"
GO_VERSION = "1.20.5" GO_VERSION = "1.20.5"

View File

@ -1,7 +1,7 @@
{ {
"name": "hugoplate", "name": "hugoplate",
"description": "hugo tailwindcss boilerplate", "description": "hugo tailwindcss boilerplate",
"version": "1.10.3", "version": "1.11.0",
"license": "MIT", "license": "MIT",
"author": "zeon.studio", "author": "zeon.studio",
"scripts": { "scripts": {
@ -22,12 +22,12 @@
"@tailwindcss/forms": "^0.5.7", "@tailwindcss/forms": "^0.5.7",
"@tailwindcss/typography": "^0.5.10", "@tailwindcss/typography": "^0.5.10",
"autoprefixer": "^10.4.16", "autoprefixer": "^10.4.16",
"postcss": "^8.4.32", "postcss": "^8.4.33",
"postcss-cli": "^11.0.0", "postcss-cli": "^11.0.0",
"prettier": "^3.1.1", "prettier": "^3.1.1",
"prettier-plugin-go-template": "0.0.15", "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", "tailwind-bootstrap-grid": "^5.1.0",
"tailwindcss": "^3.4.0" "tailwindcss": "^3.4.1"
} }
} }

View File

@ -9,8 +9,8 @@
</h2> </h2>
<p align="center"> <p align="center">
<a href="https://github.com/gohugoio/hugo/releases/tag/v0.118.2" alt="Contributors"> <a href="https://github.com/gohugoio/hugo/releases/tag/v0.121.2" alt="Contributors">
<img src="https://img.shields.io/static/v1?label=min-HUGO-version&message=0.118.2&color=f00&logo=hugo" /> <img src="https://img.shields.io/static/v1?label=min-HUGO-version&message=0.121.2&color=f00&logo=hugo" />
</a> </a>
<a href="https://github.com/zeon-studio/hugoplate/blob/main/LICENSE"> <a href="https://github.com/zeon-studio/hugoplate/blob/main/LICENSE">
@ -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. 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 ### 👉 Update Modules
We have added a lot of modules to this template. You can update all the modules using the following command. We have added a lot of modules to this template. You can update all the modules using the following command.

19
scripts/themeUpdate.js Normal file
View File

@ -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);
});

View File

@ -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." 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" homepage = "https://github.com/zeon-studio/hugoplate"
demosite = "https://zeon.studio/preview?project=hugoplate" demosite = "https://zeon.studio/preview?project=hugoplate"
min_version = "0.118.2" min_version = "0.121.2"
tags = [ tags = [
"blog", "blog",

View File

@ -3,7 +3,7 @@
# default versions # default versions
NODE_VERSION='18.16.1'; NODE_VERSION='18.16.1';
GO_VERSION='1.20.5'; GO_VERSION='1.20.5';
HUGO_VERSION='0.118.2'; HUGO_VERSION='0.121.2';
# install Node.js # install Node.js
# echo "Installing Node.js $NODE_VERSION..." # echo "Installing Node.js $NODE_VERSION..."