Skip to content

Commit 261ce10

Browse files
committed
remove tailwind warnings on colors
1 parent 5a3a18a commit 261ce10

File tree

3 files changed

+24
-20
lines changed

3 files changed

+24
-20
lines changed

crowdsec-docs/docusaurus.config.js

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ const {
55
ctiApiSidebar,
66
guidesSideBar,
77
} = require("./sidebarsUnversioned.js")
8+
const tailwindConfig = require("./tailwind.config.js")
89

910
const generateCurrentAndNextRedirects = (s) => [
1011
{
@@ -303,16 +304,6 @@ module.exports = {
303304
],
304305
},
305306
],
306-
async function myPlugin(context, options) {
307-
return {
308-
name: "docusaurus-tailwindcss",
309-
configurePostCss(postcssOptions) {
310-
// Appends TailwindCSS and AutoPrefixer.
311-
postcssOptions.plugins.push(require("tailwindcss"))
312-
postcssOptions.plugins.push(require("autoprefixer"))
313-
return postcssOptions
314-
},
315-
}
316-
},
307+
"./plugins/tailwind-config.js",
317308
],
318309
}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
export default function tailwindPlugin(context, options) {
2+
return {
3+
name: 'tailwind-plugin',
4+
configurePostCss(postcssOptions) {
5+
postcssOptions.plugins = [
6+
require('postcss-import'),
7+
require('tailwindcss'),
8+
require('autoprefixer'),
9+
];
10+
return postcssOptions;
11+
},
12+
};
13+
}

crowdsec-docs/tailwind.config.js

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
const colors = require('tailwindcss/colors')
21

2+
/** @type {import('tailwindcss').Config} */
33
module.exports = {
44
corePlugins: {
55
preflight: false,
@@ -11,15 +11,15 @@ module.exports = {
1111
"./versioned_docs/**/*.{js,jsx,ts,tsx,mdx}",
1212
],
1313
theme: {
14-
colors: {
15-
...colors, // Default colors
16-
primary: {
17-
light: "#2E2A77",
18-
dark: '#242441',
19-
},
20-
secondary: "#F8AB13",
14+
extend: {
15+
colors:{
16+
primary: {
17+
light: "#2E2A77",
18+
dark: '#242441',
19+
},
20+
secondary: "#F8AB13",
21+
}
2122
},
22-
extend: {},
2323
},
2424
plugins: [],
2525
prefix: "tw-", // This is the prefix for the tailwind classes to not clash with docusarus classes

0 commit comments

Comments
 (0)