diff --git a/assets/scss/components.scss b/assets/scss/components.scss index 9e3aac8..92e5b34 100755 --- a/assets/scss/components.scss +++ b/assets/scss/components.scss @@ -12,7 +12,7 @@ main { // container .container { - @apply mx-auto 2xl:max-w-[1320px] px-4; + @apply mx-auto px-4 2xl:max-w-[1320px]; } // form style diff --git a/exampleSite/config/_default/config.toml b/exampleSite/config/_default/hugo.toml similarity index 75% rename from exampleSite/config/_default/config.toml rename to exampleSite/config/_default/hugo.toml index 4a0eccc..33a4daf 100755 --- a/exampleSite/config/_default/config.toml +++ b/exampleSite/config/_default/hugo.toml @@ -1,15 +1,15 @@ ######################## default configuration #################### baseURL = "https://hugoplate.netlify.app/" title = "Hugoplate" -theme = ["hugoplate"] +theme = "hugoplate" # Default time zone for time stamps; use any valid tz database name: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones#List -timeZone = "UTC" +timeZone = "America/New_York" # post pagination -paginate = "2" # see https://gohugo.io/extras/pagination/ +paginate = 2 # see https://gohugo.io/extras/pagination/ # post excerpt -summaryLength = "10" # see https://gohugo.io/content-management/excerpts/ +summaryLength = 10 # see https://gohugo.io/content-management/excerpts/ # google analytics -googleAnalytics = "" # example: UA-123-45, for more info, read the article https://support.google.com/analytics/answer/1008080?hl=en +googleAnalytics = "UA-123456-78" # example: UA-123456-78, for more info, read the article https://support.google.com/analytics/answer/1008080?hl=en # 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 @@ -36,11 +36,22 @@ target = "assets/watching/hugo_stats.json" ############################# Build ############################## [build] -writeStats = true - +noJSConfigInAssets = false +useResourceCacheWhen = 'fallback' +[build.buildStats] +enable = true [[build.cachebusters]] -source = "assets/watching/hugo_stats\\.json" -target = "style\\.css" +source = 'assets/.*\.(js|ts|jsx|tsx)' +target = '(js|scripts|javascript)' +[[build.cachebusters]] +source = 'assets/.*\.(css|sass|scss)$' +target = '(css|styles|scss|sass)' +[[build.cachebusters]] +source = '(postcss|tailwind)\.config\.js' +target = '(css|styles|scss|sass)' +[[build.cachebusters]] +source = 'assets/.*\.(.*)$' +target = '$1' ############################# Outputs ############################ @@ -84,10 +95,6 @@ ordered = true [mediaTypes."application/manifest+json"] suffixes = ["webmanifest"] -[mediaTypes."text/netlify"] -delimiter = "" -suffixes = [""] - ########################### Output Format ########################## [outputFormats] diff --git a/exampleSite/config.toml b/exampleSite/hugo.toml similarity index 100% rename from exampleSite/config.toml rename to exampleSite/hugo.toml diff --git a/exampleSite/tailwind.config.js b/exampleSite/tailwind.config.js index 5c25b65..b565b52 100755 --- a/exampleSite/tailwind.config.js +++ b/exampleSite/tailwind.config.js @@ -1,7 +1,7 @@ const toml = require("toml"); const fs = require("fs"); const path = require("path"); -const configPath = path.join(__dirname, "config.toml"); +const configPath = path.join(__dirname, "hugo.toml"); const getConfig = fs.readFileSync(configPath, "utf8"); const theme = JSON.parse(JSON.stringify(toml.parse(getConfig))); @@ -29,7 +29,7 @@ if (theme.params.fonts.font_family.secondary) { /** @type {import('tailwindcss').Config} */ module.exports = { - content: ['./hugo_stats.json'], + content: ["./hugo_stats.json"], safelist: [{ pattern: /^swiper-/ }], darkMode: "class", theme: { diff --git a/package.json b/package.json index 11590f0..6d3333d 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "hugoplate", "description": "hugo tailwindcss boilerplate", - "version": "1.2.0", + "version": "1.3.0", "license": "MIT", "author": "zeon.studio", "scripts": { diff --git a/scripts/projectSetup.js b/scripts/projectSetup.js index a0f4356..4585fc9 100644 --- a/scripts/projectSetup.js +++ b/scripts/projectSetup.js @@ -4,7 +4,7 @@ const path = require("path"); const getFolderName = (rootfolder) => { const configPath = path.join( rootfolder, - "exampleSite/config/_default/config.toml" + "exampleSite/config/_default/hugo.toml" ); const getConfig = fs.readFileSync(configPath, "utf8"); const match = getConfig.match(/theme\s*=\s*\[?"([^"\]]+)"\]?/); diff --git a/scripts/removeDarkmode.js b/scripts/removeDarkmode.js index 7fe4218..8811311 100644 --- a/scripts/removeDarkmode.js +++ b/scripts/removeDarkmode.js @@ -3,12 +3,20 @@ const path = require("path"); const rootDirs = ["assets/scss", "layouts"]; const configFiles = [ + { + filePath: "tailwind.config.js", + patterns: ["darkmode:\\s*{[^}]*},", 'darkMode:\\s*"class",'], + }, { filePath: "exampleSite/tailwind.config.js", patterns: ["darkmode:\\s*{[^}]*},", 'darkMode:\\s*"class",'], }, { - filePath: "exampleSite/config.toml", + filePath: "hugo.toml", + patterns: ["\\S*\\.darkmode[^\\]]*\\]\\n*([\\s\\S]*?)(?=\\[|$)"], + }, + { + filePath: "exampleSite/hugo.toml", patterns: ["\\S*\\.darkmode[^\\]]*\\]\\n*([\\s\\S]*?)(?=\\[|$)"], }, ]; diff --git a/scripts/themeSetup.js b/scripts/themeSetup.js index 7e3f39d..ad32df9 100644 --- a/scripts/themeSetup.js +++ b/scripts/themeSetup.js @@ -16,7 +16,7 @@ const deleteFolder = (folderPath) => { const getFolderName = (rootfolder) => { const configPath = path.join( rootfolder, - "exampleSite/config/_default/config.toml" + "exampleSite/config/_default/hugo.toml" ); const getConfig = fs.readFileSync(configPath, "utf8"); const match = getConfig.match(/theme\s*=\s*\[?"([^"\]]+)"\]?/); @@ -53,9 +53,10 @@ const setupTheme = () => { "tailwind.config.js", "postcss.config.js", "go.mod", - "config.toml", + "hugo.toml", "assets", "config", + "data", "content", "i18n", "static",