fix tailwind by making a copy for copying and update README

This commit is contained in:
Chaoming Li 2024-12-31 14:59:37 +11:00
parent 9e3e083f2f
commit fc742b787a
3 changed files with 49 additions and 7 deletions

View file

@ -76,7 +76,7 @@ cp -r themes/hugo-saasify-theme/exampleSite/* .
# Copy package.json and other config files to your site root # Copy package.json and other config files to your site root
cp themes/hugo-saasify-theme/package.json . cp themes/hugo-saasify-theme/package.json .
cp themes/hugo-saasify-theme/postcss.config.js . cp themes/hugo-saasify-theme/postcss.config.js .
cp themes/hugo-saasify-theme/tailwind.config.js . cp themes/hugo-saasify-theme/tailwind.config.copy.js ./tailwind.config.js
``` ```
```bash ```bash

21
tailwind.config.copy.js Normal file
View file

@ -0,0 +1,21 @@
/** @type {import('tailwindcss').Config} */
module.exports = {
presets: [require('./themes/hugo-saasify-theme/tailwind.config.js')],
content: [
"./themes/hugo-saasify-theme/layouts/**/*.html",
"./layouts/**/*.html",
"./content/**/*.{html,md}"
],
theme: {
extend: {
fontFamily: {
sans: ['Inter', 'system-ui', 'sans-serif'],
heading: ['Plus Jakarta Sans', 'sans-serif'],
},
},
},
plugins: [
require('@tailwindcss/forms'),
require('@tailwindcss/typography'),
],
}

View file

@ -1,13 +1,34 @@
/** @type {import('tailwindcss').Config} */ /** @type {import('tailwindcss').Config} */
module.exports = { module.exports = {
presets: [require('./themes/hugo-saasify-theme/tailwind.config.js')], content: ["./layouts/**/*.html"],
content: [
"./themes/hugo-saasify-theme/layouts/**/*.html",
"./layouts/**/*.html",
"./content/**/*.{html,md}"
],
theme: { theme: {
extend: { extend: {
colors: {
primary: {
50: '#eef1fc',
100: '#dde3f9',
200: '#bbc7f3',
300: '#99abec',
400: '#778fe6',
500: '#5573df',
600: '#425ad6',
700: '#3548ab',
800: '#283680',
900: '#1b2456',
},
secondary: {
50: '#faf5ff',
100: '#f3e8ff',
200: '#e9d5ff',
300: '#d8b4fe',
400: '#c084fc',
500: '#a855f7',
600: '#9333ea',
700: '#7e22ce',
800: '#6b21a8',
900: '#581c87',
},
},
fontFamily: { fontFamily: {
sans: ['Inter', 'system-ui', 'sans-serif'], sans: ['Inter', 'system-ui', 'sans-serif'],
heading: ['Plus Jakarta Sans', 'sans-serif'], heading: ['Plus Jakarta Sans', 'sans-serif'],