A Lektor plugin that adds Tailwind CSS to your project seamlessly.
Version: 0.1.0
Author: Frost Ming
View all tags.
A Lektor plugin that adds Tailwind CSS to your project seamlessly.
Add plugin to your project
$ lektor plugin add lektor-tailwind
$ lektor plugin list
Configure your template paths
In tailwindcss.config.js
:
module.exports = {
content: ['./templates/**/*.{html,j2}'],
theme: {
extend: {},
},
plugins: [],
}
Add the Tailwind directives to your CSS
In assets/static/style.css
:
@tailwind base;
@tailwind components;
@tailwind utilities;
Start lektor build or server:
$ lektor build
$ lektor server
You got it. Please refer to official Tailwind documentation for more information on using Tailwind CSS and its CLI.
By default, the input CSS file in assets/static/style.css
, while it can be changed by css_path
plugin config.
Comments