remove cusom hugo_stats decoder, fixed theme.json update auto reload
This commit is contained in:
parent
59eef62fde
commit
77bc7eef2d
2
.github/workflows/main.yml
vendored
2
.github/workflows/main.yml
vendored
@ -15,7 +15,7 @@ permissions:
|
||||
# Environment variables available to all jobs and steps in this workflow
|
||||
env:
|
||||
HUGO_ENV: production
|
||||
HUGO_VERSION: "0.115.4"
|
||||
HUGO_VERSION: "0.118.2"
|
||||
GO_VERSION: "1.20.5"
|
||||
NODE_VERSION: "18.15.0"
|
||||
TINA_CLIENT_ID: ${{ vars.TINA_CLIENT_ID }}
|
||||
|
1
.gitignore
vendored
1
.gitignore
vendored
@ -13,6 +13,5 @@ resources
|
||||
.hugo_build.lock
|
||||
jsconfig.json
|
||||
hugo_stats.json
|
||||
hugo_stats_decoded.json
|
||||
go.sum
|
||||
yarn.lock
|
@ -3,7 +3,7 @@ stages:
|
||||
|
||||
variables:
|
||||
HUGO_ENV: production
|
||||
HUGO_VERSION: "0.115.4"
|
||||
HUGO_VERSION: "0.118.2"
|
||||
GO_VERSION: "1.20.5"
|
||||
NODE_VERSION: "18.16.1"
|
||||
|
||||
|
@ -4,11 +4,11 @@ frontend:
|
||||
preBuild:
|
||||
commands:
|
||||
- yum install -y curl
|
||||
- curl -LO "https://github.com/gohugoio/hugo/releases/download/v0.115.4/hugo_extended_0.115.4_Linux-64bit.tar.gz"
|
||||
- tar -xvf hugo_extended_0.115.4_Linux-64bit.tar.gz
|
||||
- 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
|
||||
- mv hugo /usr/local/bin/
|
||||
- rm hugo_extended_0.115.4_Linux-64bit.tar.gz
|
||||
- echo "HUGO 0.115.4 INSTALLED"
|
||||
- rm hugo_extended_0.118.2_Linux-64bit.tar.gz
|
||||
- echo "HUGO 0.118.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
|
||||
|
@ -25,5 +25,4 @@ require (
|
||||
github.com/gethugothemes/hugo-modules/tab v0.0.0-20230823074046-d7ebb75df8b9 // indirect
|
||||
github.com/gethugothemes/hugo-modules/table-of-contents v0.0.0-20230823074046-d7ebb75df8b9 // indirect
|
||||
github.com/gethugothemes/hugo-modules/videos v0.0.0-20230823074046-d7ebb75df8b9 // indirect
|
||||
github.com/zeon-studio/hugoplate v0.0.0-20230820074946-34cb72d4ce47 // indirect
|
||||
)
|
||||
|
@ -55,6 +55,9 @@ target = 'js'
|
||||
source = 'assets/.*\.(css|scss|sass)'
|
||||
target = 'css'
|
||||
[[build.cachebusters]]
|
||||
source = 'data/.*\.(.*)$'
|
||||
target = 'css'
|
||||
[[build.cachebusters]]
|
||||
source = 'assets/.*\.(.*)$'
|
||||
target = '$1'
|
||||
|
||||
|
@ -3,25 +3,6 @@ const path = require("path");
|
||||
const themePath = path.join(__dirname, "data/theme.json");
|
||||
const themeRead = fs.readFileSync(themePath, "utf8");
|
||||
const theme = JSON.parse(themeRead);
|
||||
const hugoStatsPath = path.join(__dirname, "hugo_stats.json");
|
||||
const hugoStatsRead = fs.readFileSync(hugoStatsPath, "utf8");
|
||||
|
||||
// Function to decode Unicode escape sequences
|
||||
function decodeUnicode(json) {
|
||||
return JSON.parse(json, (key, value) => {
|
||||
if (typeof value === "string") {
|
||||
return value.replace(/\\u[\dA-Fa-f]{4}/g, (match) => {
|
||||
return String.fromCharCode(parseInt(match.slice(2), 16));
|
||||
});
|
||||
}
|
||||
return value;
|
||||
});
|
||||
}
|
||||
|
||||
fs.writeFileSync(
|
||||
"hugo_stats_decoded.json",
|
||||
JSON.stringify(decodeUnicode(hugoStatsRead), null, 2),
|
||||
);
|
||||
|
||||
let font_base = Number(theme.fonts.font_size.base.replace("px", ""));
|
||||
let font_scale = Number(theme.fonts.font_size.scale);
|
||||
@ -47,7 +28,7 @@ if (theme.fonts.font_family.secondary) {
|
||||
|
||||
/** @type {import('tailwindcss').Config} */
|
||||
module.exports = {
|
||||
content: ["./hugo_stats_decoded.json"],
|
||||
content: ["./hugo_stats.json"],
|
||||
safelist: [{ pattern: /^swiper-/ }],
|
||||
darkMode: "class",
|
||||
theme: {
|
||||
|
@ -3,5 +3,5 @@ publish = "public"
|
||||
command = "yarn project-setup; yarn build"
|
||||
|
||||
[build.environment]
|
||||
HUGO_VERSION = "0.115.4"
|
||||
HUGO_VERSION = "0.118.2"
|
||||
GO_VERSION = "1.20.5"
|
||||
|
@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "hugoplate",
|
||||
"description": "hugo tailwindcss boilerplate",
|
||||
"version": "1.7.5",
|
||||
"version": "1.7.6",
|
||||
"license": "MIT",
|
||||
"author": "zeon.studio",
|
||||
"scripts": {
|
||||
@ -22,11 +22,11 @@
|
||||
"@tailwindcss/forms": "^0.5.6",
|
||||
"@tailwindcss/typography": "^0.5.9",
|
||||
"autoprefixer": "^10.4.15",
|
||||
"postcss": "^8.4.28",
|
||||
"postcss": "^8.4.29",
|
||||
"postcss-cli": "^10.1.0",
|
||||
"prettier": "^3.0.2",
|
||||
"prettier": "^3.0.3",
|
||||
"prettier-plugin-go-template": "0.0.15",
|
||||
"prettier-plugin-tailwindcss": "^0.5.3",
|
||||
"prettier-plugin-tailwindcss": "^0.5.4",
|
||||
"tailwind-bootstrap-grid": "^5.0.1",
|
||||
"tailwindcss": "^3.3.3"
|
||||
}
|
||||
|
@ -9,8 +9,8 @@
|
||||
</h2>
|
||||
|
||||
<p align="center">
|
||||
<a href="https://github.com/gohugoio/hugo/releases/tag/v0.115.1" alt="Contributors">
|
||||
<img src="https://img.shields.io/static/v1?label=min-HUGO-version&message=0.115.1&color=f00&logo=hugo" />
|
||||
<a href="https://github.com/gohugoio/hugo/releases/tag/v0.118.2" alt="Contributors">
|
||||
<img src="https://img.shields.io/static/v1?label=min-HUGO-version&message=0.118.2&color=f00&logo=hugo" />
|
||||
</a>
|
||||
|
||||
<a href="https://github.com/zeon-studio/hugoplate/blob/main/LICENSE">
|
||||
|
@ -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://hugoplate.netlify.app/"
|
||||
min_version = "0.115.4"
|
||||
min_version = "0.118.2"
|
||||
|
||||
tags = [
|
||||
"blog",
|
||||
|
@ -3,7 +3,7 @@
|
||||
# default versions
|
||||
NODE_VERSION='18.16.1';
|
||||
GO_VERSION='1.20.5';
|
||||
HUGO_VERSION='0.115.4';
|
||||
HUGO_VERSION='0.118.2';
|
||||
|
||||
# install Node.js
|
||||
# echo "Installing Node.js $NODE_VERSION..."
|
||||
|
Loading…
Reference in New Issue
Block a user