Merge pull request #3 from tfsomrat/main
rename config.toml to hugo.toml
This commit is contained in:
commit
313c9f8c38
@ -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
|
||||
|
@ -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]
|
@ -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: {
|
||||
|
@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "hugoplate",
|
||||
"description": "hugo tailwindcss boilerplate",
|
||||
"version": "1.2.0",
|
||||
"version": "1.3.0",
|
||||
"license": "MIT",
|
||||
"author": "zeon.studio",
|
||||
"scripts": {
|
||||
|
@ -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*\[?"([^"\]]+)"\]?/);
|
||||
|
@ -8,7 +8,7 @@ const configFiles = [
|
||||
patterns: ["darkmode:\\s*{[^}]*},", 'darkMode:\\s*"class",'],
|
||||
},
|
||||
{
|
||||
filePath: "exampleSite/config.toml",
|
||||
filePath: "exampleSite/hugo.toml",
|
||||
patterns: ["\\S*\\.darkmode[^\\]]*\\]\\n*([\\s\\S]*?)(?=\\[|$)"],
|
||||
},
|
||||
];
|
||||
|
@ -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",
|
||||
|
Loading…
Reference in New Issue
Block a user