added cleanMode script and fixed github workflow
This commit is contained in:
parent
aa471f8846
commit
56959fd77a
6
.github/workflows/hugo.yml
vendored
6
.github/workflows/hugo.yml
vendored
@ -53,11 +53,7 @@ jobs:
|
||||
run: npm install
|
||||
|
||||
- name: Publish to GitHub Pages
|
||||
run: |
|
||||
cd exampleSite; \
|
||||
hugo --gc --minify --baseURL "${{ steps.pages.outputs.base_url }}/" || \
|
||||
hugo --themesDir ../.. --gc --minify --baseURL "${{ steps.pages.outputs.base_url }}/"
|
||||
echo "SITE BUILT SUCCESSFULLY! LIVE AT: ${{ steps.pages.outputs.base_url }}"
|
||||
run: npm run build
|
||||
|
||||
- name: Upload artifact
|
||||
uses: actions/upload-pages-artifact@v1
|
||||
|
@ -3,27 +3,27 @@ module hugoplate.netlify.app
|
||||
go 1.20
|
||||
|
||||
require (
|
||||
github.com/gethugothemes/hugo-modules/accordion v0.0.0-20230606070512-0887967dba40 // indirect
|
||||
github.com/gethugothemes/hugo-modules/adsense v0.0.0-20230606070512-0887967dba40 // indirect
|
||||
github.com/gethugothemes/hugo-modules/components/cookie-consent v0.0.0-20230606070512-0887967dba40 // indirect
|
||||
github.com/gethugothemes/hugo-modules/components/custom-script v0.0.0-20230606070512-0887967dba40 // indirect
|
||||
github.com/gethugothemes/hugo-modules/components/preloader v0.0.0-20230606070512-0887967dba40 // indirect
|
||||
github.com/gethugothemes/hugo-modules/components/render-link v0.0.0-20230606070512-0887967dba40 // indirect
|
||||
github.com/gethugothemes/hugo-modules/components/social-share v0.0.0-20230606070512-0887967dba40 // indirect
|
||||
github.com/gethugothemes/hugo-modules/gallery-slider v0.0.0-20230606070512-0887967dba40 // indirect
|
||||
github.com/gethugothemes/hugo-modules/gzip-caching v0.0.0-20230606070512-0887967dba40 // indirect
|
||||
github.com/gethugothemes/hugo-modules/icons/font-awesome v0.0.0-20230606070512-0887967dba40 // indirect
|
||||
github.com/gethugothemes/hugo-modules/images v0.0.0-20230606070512-0887967dba40 // indirect
|
||||
github.com/gethugothemes/hugo-modules/modal v0.0.0-20230606070512-0887967dba40 // indirect
|
||||
github.com/gethugothemes/hugo-modules/pwa v0.0.0-20230606070512-0887967dba40 // indirect
|
||||
github.com/gethugothemes/hugo-modules/search v0.0.0-20230606070512-0887967dba40 // indirect
|
||||
github.com/gethugothemes/hugo-modules/seo-tools/basic-seo v0.0.0-20230606070512-0887967dba40 // indirect
|
||||
github.com/gethugothemes/hugo-modules/seo-tools/google-tag-manager v0.0.0-20230606070512-0887967dba40 // indirect
|
||||
github.com/gethugothemes/hugo-modules/seo-tools/site-verifications v0.0.0-20230606070512-0887967dba40 // indirect
|
||||
github.com/gethugothemes/hugo-modules/shortcodes/button v0.0.0-20230606070512-0887967dba40 // indirect
|
||||
github.com/gethugothemes/hugo-modules/shortcodes/codepen v0.0.0-20230606070512-0887967dba40 // indirect
|
||||
github.com/gethugothemes/hugo-modules/shortcodes/notice v0.0.0-20230606070512-0887967dba40 // indirect
|
||||
github.com/gethugothemes/hugo-modules/tab v0.0.0-20230606070512-0887967dba40 // indirect
|
||||
github.com/gethugothemes/hugo-modules/table-of-contents v0.0.0-20230606070512-0887967dba40 // indirect
|
||||
github.com/gethugothemes/hugo-modules/videos v0.0.0-20230606070512-0887967dba40 // indirect
|
||||
github.com/gethugothemes/hugo-modules/accordion v0.0.0-20230618103508-54805e19264d // indirect
|
||||
github.com/gethugothemes/hugo-modules/adsense v0.0.0-20230618103508-54805e19264d // indirect
|
||||
github.com/gethugothemes/hugo-modules/components/cookie-consent v0.0.0-20230618103508-54805e19264d // indirect
|
||||
github.com/gethugothemes/hugo-modules/components/custom-script v0.0.0-20230618103508-54805e19264d // indirect
|
||||
github.com/gethugothemes/hugo-modules/components/preloader v0.0.0-20230618103508-54805e19264d // indirect
|
||||
github.com/gethugothemes/hugo-modules/components/render-link v0.0.0-20230618103508-54805e19264d // indirect
|
||||
github.com/gethugothemes/hugo-modules/components/social-share v0.0.0-20230618103508-54805e19264d // indirect
|
||||
github.com/gethugothemes/hugo-modules/gallery-slider v0.0.0-20230618103508-54805e19264d // indirect
|
||||
github.com/gethugothemes/hugo-modules/gzip-caching v0.0.0-20230618103508-54805e19264d // indirect
|
||||
github.com/gethugothemes/hugo-modules/icons/font-awesome v0.0.0-20230618103508-54805e19264d // indirect
|
||||
github.com/gethugothemes/hugo-modules/images v0.0.0-20230618103508-54805e19264d // indirect
|
||||
github.com/gethugothemes/hugo-modules/modal v0.0.0-20230618103508-54805e19264d // indirect
|
||||
github.com/gethugothemes/hugo-modules/pwa v0.0.0-20230618103508-54805e19264d // indirect
|
||||
github.com/gethugothemes/hugo-modules/search v0.0.0-20230618103508-54805e19264d // indirect
|
||||
github.com/gethugothemes/hugo-modules/seo-tools/basic-seo v0.0.0-20230618103508-54805e19264d // indirect
|
||||
github.com/gethugothemes/hugo-modules/seo-tools/google-tag-manager v0.0.0-20230618103508-54805e19264d // indirect
|
||||
github.com/gethugothemes/hugo-modules/seo-tools/site-verifications v0.0.0-20230618103508-54805e19264d // indirect
|
||||
github.com/gethugothemes/hugo-modules/shortcodes/button v0.0.0-20230618103508-54805e19264d // indirect
|
||||
github.com/gethugothemes/hugo-modules/shortcodes/codepen v0.0.0-20230618103508-54805e19264d // indirect
|
||||
github.com/gethugothemes/hugo-modules/shortcodes/notice v0.0.0-20230618103508-54805e19264d // indirect
|
||||
github.com/gethugothemes/hugo-modules/tab v0.0.0-20230618103508-54805e19264d // indirect
|
||||
github.com/gethugothemes/hugo-modules/table-of-contents v0.0.0-20230618103508-54805e19264d // indirect
|
||||
github.com/gethugothemes/hugo-modules/videos v0.0.0-20230618103508-54805e19264d // indirect
|
||||
)
|
||||
|
@ -8,7 +8,7 @@
|
||||
"dev": "cd exampleSite; hugo server || hugo server --themesDir ../..",
|
||||
"test": "cd exampleSite; hugo server --disableFastRender --navigateToChanged --templateMetrics --templateMetricsHints --buildDrafts --buildExpired --buildFuture --watch --forceSyncStatic -e production --minify || hugo server --themesDir ../.. --disableFastRender --navigateToChanged --templateMetrics --templateMetricsHints --buildDrafts --buildExpired --buildFuture --watch --forceSyncStatic -e production --minify",
|
||||
"build": "cd exampleSite; hugo --gc --minify --templateMetrics --templateMetricsHints --buildDrafts --buildExpired --buildFuture --forceSyncStatic || hugo --themesDir ../.. --gc --minify --templateMetrics --templateMetricsHints --buildDrafts --buildExpired --buildFuture --forceSyncStatic",
|
||||
"update-modules": "hugo mod clean && hugo mod get -u ./... && hugo mod tidy",
|
||||
"update-modules": "node ./scripts/cleanMod.js && hugo mod clean --all && hugo mod get -u ./... && hugo mod tidy",
|
||||
"format": "prettier -w .",
|
||||
"remove-darkmode": "node ./scripts/removeDarkmode.js && yarn format"
|
||||
},
|
||||
|
@ -1,14 +1,14 @@
|
||||
{
|
||||
"name": "hugoplate",
|
||||
"description": "hugo tailwindcss boilerplate",
|
||||
"version": "1.1.1",
|
||||
"version": "1.1.2",
|
||||
"license": "MIT",
|
||||
"author": "zeon.studio",
|
||||
"scripts": {
|
||||
"dev": "cd exampleSite; hugo server || hugo server --themesDir ../..",
|
||||
"test": "cd exampleSite; hugo server --disableFastRender --navigateToChanged --templateMetrics --templateMetricsHints --buildDrafts --buildExpired --buildFuture --watch --forceSyncStatic -e production --minify || hugo server --themesDir ../.. --disableFastRender --navigateToChanged --templateMetrics --templateMetricsHints --buildDrafts --buildExpired --buildFuture --watch --forceSyncStatic -e production --minify",
|
||||
"build": "cd exampleSite; hugo --gc --minify --templateMetrics --templateMetricsHints --buildDrafts --buildExpired --buildFuture --forceSyncStatic || hugo --themesDir ../.. --gc --minify --templateMetrics --templateMetricsHints --buildDrafts --buildExpired --buildFuture --forceSyncStatic",
|
||||
"update-modules": "hugo mod clean --all && hugo mod get -u ./... && hugo mod tidy",
|
||||
"update-modules": "node ./scripts/cleanMod.js && hugo mod clean --all && hugo mod get -u ./... && hugo mod tidy",
|
||||
"format": "prettier -w .",
|
||||
"remove-darkmode": "node ./scripts/removeDarkmode.js && yarn format"
|
||||
},
|
||||
|
14
scripts/cleanMod.js
Normal file
14
scripts/cleanMod.js
Normal file
@ -0,0 +1,14 @@
|
||||
const fs = require("fs");
|
||||
|
||||
const clearMode = (filePath) => {
|
||||
if (fs.existsSync(filePath)) {
|
||||
let fileContent = fs.readFileSync(filePath, "utf8");
|
||||
fileContent = fileContent.replace(/require\s*\([\s\S]*?\)/, "");
|
||||
fs.writeFileSync(filePath, fileContent, "utf8");
|
||||
} else {
|
||||
console.log("File does not exist.");
|
||||
}
|
||||
};
|
||||
|
||||
clearMode("go.mod");
|
||||
clearMode("exampleSite/go.mod");
|
Loading…
Reference in New Issue
Block a user