|
1 |
| -const eleventyNavigationPlugin = require("@11ty/eleventy-navigation"); |
2 |
| -const metagen = require('eleventy-plugin-metagen'); |
3 |
| -const sitemap = require("@quasibit/eleventy-plugin-sitemap"); |
4 |
| -const markdownIt = require('markdown-it'); |
5 |
| -const markdownItAnchor = require('markdown-it-anchor'); |
6 |
| -const syntaxHighlight = require("@11ty/eleventy-plugin-syntaxhighlight"); |
7 |
| -const img2picture = require('eleventy-plugin-img2picture'); |
8 |
| -const postcss = require('postcss'); |
9 |
| -const tailwindcss = require('tailwindcss'); |
10 |
| -const autoprefixer = require('autoprefixer'); |
11 |
| -const cssnano = require('cssnano') |
| 1 | +import eleventyNavigationPlugin from "@11ty/eleventy-navigation"; |
| 2 | +import metagen from "eleventy-plugin-metagen"; |
| 3 | +import sitemap from "@quasibit/eleventy-plugin-sitemap"; |
| 4 | +import markdownIt from "markdown-it"; |
| 5 | +import markdownItAnchor from "markdown-it-anchor"; |
| 6 | +import syntaxHighlight from "@11ty/eleventy-plugin-syntaxhighlight"; |
| 7 | +import img2picture from "eleventy-plugin-img2picture"; |
| 8 | +import postcss from "postcss"; |
| 9 | +import tailwindcss from "tailwindcss"; |
| 10 | +import autoprefixer from "autoprefixer"; |
| 11 | +import cssnano from "cssnano"; |
| 12 | +import tailwindConfig from "./tailwind.config.js"; |
12 | 13 | // const fetch = require('node-fetch').default;
|
13 | 14 |
|
14 |
| -const postCssPlugins = [tailwindcss(require('./tailwind.config.js')), autoprefixer()] |
| 15 | +const postCssPlugins = [tailwindcss(tailwindConfig), autoprefixer()]; |
15 | 16 |
|
16 | 17 | const dev = process.env.NODE_ENV !== 'production'
|
17 | 18 |
|
18 | 19 | if (!dev) { postCssPlugins.push(cssnano())}
|
19 | 20 | const slugify = (s) => encodeURIComponent(String(s).trim().toLowerCase().replace(/[^a-z0-9 -]/g, '').replace(/\s+/g, '-').replace(/-+/g, '-'))
|
20 | 21 |
|
21 |
| -module.exports = (eleventyConfig) => { |
| 22 | +export default (eleventyConfig) => { |
22 | 23 | eleventyConfig.addPassthroughCopy({
|
23 | 24 | public: './'
|
24 |
| - }) |
| 25 | + }); |
25 | 26 |
|
26 | 27 | // Process Markdown
|
27 | 28 | let markdownItOptions = {
|
|
0 commit comments