mirror of
https://github.com/aljazceru/njump.git
synced 2025-12-17 14:24:27 +01:00
fix typography: include plugin on prod build.
This commit is contained in:
8
main.go
8
main.go
@@ -68,7 +68,13 @@ func main() {
|
|||||||
log.Fatal().Err(err).Msg("failed to load tailwind.config.js")
|
log.Fatal().Err(err).Msg("failed to load tailwind.config.js")
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
config := strings.Replace(string(configb), "module.exports", "tailwind.config", 1)
|
config := strings.Replace(
|
||||||
|
strings.Replace(
|
||||||
|
string(configb),
|
||||||
|
"plugins: [require('@tailwindcss/typography')]", "", 1,
|
||||||
|
),
|
||||||
|
"module.exports", "tailwind.config", 1,
|
||||||
|
)
|
||||||
|
|
||||||
styleb, err := os.ReadFile("tailwind.css")
|
styleb, err := os.ReadFile("tailwind.css")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|||||||
@@ -6,5 +6,8 @@
|
|||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"postinstall": "tailwind -i tailwind.css -o static/tailwind-bundle.min.css --minify"
|
"postinstall": "tailwind -i tailwind.css -o static/tailwind-bundle.min.css --minify"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"@tailwindcss/typography": "^0.5.10"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ module.exports = {
|
|||||||
fontSize: {
|
fontSize: {
|
||||||
xs: '0.7rem',
|
xs: '0.7rem',
|
||||||
sm: '0.8rem',
|
sm: '0.8rem',
|
||||||
'2xl': ['1.5rem', '1.1rem'],
|
'2xl': ['1.5rem', '1.1rem']
|
||||||
},
|
},
|
||||||
colors: {
|
colors: {
|
||||||
lavender: '#fdf0f5',
|
lavender: '#fdf0f5',
|
||||||
@@ -18,10 +18,10 @@ module.exports = {
|
|||||||
garnet: '#42091e'
|
garnet: '#42091e'
|
||||||
},
|
},
|
||||||
borderWidth: {
|
borderWidth: {
|
||||||
'05rem': '0.5rem', // You can define custom border widths in rem units
|
'05rem': '0.5rem' // you can define custom border widths in rem units
|
||||||
},
|
},
|
||||||
gap: {
|
gap: {
|
||||||
'48vw': '4.8vw',
|
'48vw': '4.8vw'
|
||||||
},
|
},
|
||||||
typography: ({theme}) => ({
|
typography: ({theme}) => ({
|
||||||
/* for markdown html content */
|
/* for markdown html content */
|
||||||
@@ -35,5 +35,6 @@ module.exports = {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
plugins: [require('@tailwindcss/typography')]
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user