diff --git a/.eleventy.js b/.eleventy.js new file mode 100644 index 0000000..08a8e33 --- /dev/null +++ b/.eleventy.js @@ -0,0 +1,23 @@ +const syntaxHighlight = require('@11ty/eleventy-plugin-syntaxhighlight'); + +module.exports = (config) => { + config.addPlugin(syntaxHighlight); + config.addPassthroughCopy({ 'src/assets': 'assets' }); + config.setFrontMatterParsingOptions({ + excerpt: true, + excerpt_sperator: ' ', + }); + config.setTemplateFormats(['jpg', 'png', 'webp', 'md', 'njk']); + config.setBrowserSyncConfig({ + files: ['dist/**/*'], + open: true, + }); + config.setDataDeepMerge(true); + + return { + dir: { + input: 'src', + output: 'dist', + }, + }; +}; diff --git a/postcss.config.js b/postcss.config.js new file mode 100644 index 0000000..2c333d6 --- /dev/null +++ b/postcss.config.js @@ -0,0 +1,7 @@ +module.exports = { + plugins: [ + require('postcss-import'), + require('tailwindcss')('./tailwind.config.js'), + require('autoprefixer'), + ], +}; diff --git a/src/_bundle/main.js b/src/_bundle/main.js new file mode 100644 index 0000000..24c897e --- /dev/null +++ b/src/_bundle/main.js @@ -0,0 +1 @@ +import './main.pcss'; diff --git a/src/_bundle/main.pcss b/src/_bundle/main.pcss new file mode 100644 index 0000000..a31e444 --- /dev/null +++ b/src/_bundle/main.pcss @@ -0,0 +1,3 @@ +@import 'tailwindcss/base'; +@import 'tailwindcss/components'; +@import 'tailwindcss/utilities'; diff --git a/src/_includes/layout.njk b/src/_includes/layout.njk new file mode 100644 index 0000000..7a98ea7 --- /dev/null +++ b/src/_includes/layout.njk @@ -0,0 +1,15 @@ + + + + + + + + + + {{title}} + + +
+ + \ No newline at end of file diff --git a/tailwind.config.js b/tailwind.config.js new file mode 100644 index 0000000..b9b2ee5 --- /dev/null +++ b/tailwind.config.js @@ -0,0 +1,14 @@ +module.exports = { + theme: { + container: { + center: true, + padding: '2rem', + }, + extend: {}, + }, + variants: { + extend: {}, + }, + plugins: [require('@tailwindcss/typography')], + pruge: ['./src/**/*.js', './src/**/*.njk', './src/**/*.svg'], +}; diff --git a/webpack.config.js b/webpack.config.js new file mode 100644 index 0000000..8b7fc98 --- /dev/null +++ b/webpack.config.js @@ -0,0 +1,24 @@ +const path = require('path'); +const MiniCssExtractPlugin = require('mini-css-extract-plugin'); + +module.exports = { + entry: './src/_bundle/main.js', + mode: process.env.NODE_ENV, + module: { + rules: [ + { + test: /\.pcss$/i, + use: [MiniCssExtractPlugin.loader, 'css-loader', 'postcss-loader'], + }, + ], + }, + output: { + path: path.resolve(__dirname, 'dist', 'assets'), + filename: 'main.bundle.js', + }, + plugins: [ + new MiniCssExtractPlugin({ + filename: 'main.bulde.css', + }), + ], +};