Pelican plugin to add Tailwind CSS to your web site
Project description
Tailwind CSS Plugin for Pelican 🌬
This plugin helps you use Tailwind CSS in your Pelican web site.
Why Use This Plugin?
Because you want use Tailwind CSS in seconds. Not hours.
Requirements
In order to run this plugin, you need to install Node.JS. (Someday this dependency could be replaced with a Python package.)
Installation
This plugin can be installed via:
python -m pip install pelican-tailwindcss
As long as you have not explicitly added a PLUGINS setting to your Pelican settings file, then the newly-installed plugin should be automatically detected and enabled. Otherwise, you must add tailwindcss to your existing PLUGINS list. For more information, please see the How to Use Plugins documentation.
Basic Usage
-
Create a
tailwind.config.jsfile in your Pelican project root folder containing:/** @type {import('tailwindcss').Config} */ module.exports = { content: ["./themes/**/*.html", "./themes/**/*.js"], theme: { extend: {}, }, plugins: [], };
The
contentproperty values are just suggestions. Feel free to modify them according to your needs. -
Create a
input.cssfile in your Pelican project root folder containing:@tailwind base; @tailwind components; @tailwind utilities;
-
Add the build file (
output.css) in yourbase.html.<link rel="stylesheet" href="/output.css" />
-
Done! You should be ready to use Tailwind CSS in your website template.
Advanced Usage
In your settings you can configure the plugin's behavior using the TAILWIND setting.
An example of a complete TAILWIND setting:
TAILWIND = {
"version": "3.0.0",
"plugins": [
"@tailwindcss/typography",
"@tailwindcss/forms",
"@tailwindcss/line-clamp",
"@tailwindcss/aspect-ratio",
],
}
Tailwind Plugin Installation
As you can see from the example above, it is possible to add the plugins property to the configuration.
Just add the name of a Tailwind plugin to the list, and the plugin will be installed.
Useful Information
Plugins
Your tailwind.config.js file will only be copied when Pelican starts. This means that any changes made after starting Pelican will not be recognized. For example, if you want to install a new plugin for Tailwind, you will have to restart Pelican in order for that plugin to become active.
Contributing
Contributions are welcome and much appreciated. Every little bit helps. You can contribute by improving the documentation, adding missing features, and fixing bugs. You can also help out by reviewing and commenting on existing issues.
To start contributing to this plugin, review the Contributing to Pelican documentation, beginning with the Contributing Code section.
License
This project is licensed under the AGPL-3.0 license.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pelican_tailwindcss-0.3.0.tar.gz.
File metadata
- Download URL: pelican_tailwindcss-0.3.0.tar.gz
- Upload date:
- Size: 5.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
85db21f0de97c95df65cc79e2f9aa887fc6cd11c54f424633b3ce07e2ef492f7
|
|
| MD5 |
78d487ff309aa901fde49b56b56ad578
|
|
| BLAKE2b-256 |
bde243419eaae089aa9b262a7aed596abae1badf800d790d7b94da0fa6a6a006
|
Provenance
The following attestation bundles were made for pelican_tailwindcss-0.3.0.tar.gz:
Publisher:
main.yml on pelican-plugins/tailwindcss
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pelican_tailwindcss-0.3.0.tar.gz -
Subject digest:
85db21f0de97c95df65cc79e2f9aa887fc6cd11c54f424633b3ce07e2ef492f7 - Sigstore transparency entry: 172959813
- Sigstore integration time:
-
Permalink:
pelican-plugins/tailwindcss@ae799bcfc8cf4c7526aa9be0c1af59aba9735280 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/pelican-plugins
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
main.yml@ae799bcfc8cf4c7526aa9be0c1af59aba9735280 -
Trigger Event:
push
-
Statement type:
File details
Details for the file pelican_tailwindcss-0.3.0-py3-none-any.whl.
File metadata
- Download URL: pelican_tailwindcss-0.3.0-py3-none-any.whl
- Upload date:
- Size: 6.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3a802340eb55712c262ce945465b51580ad24c815849948bfe0fb2e0a205184f
|
|
| MD5 |
a376fd6f241fb840d5a13015525eed67
|
|
| BLAKE2b-256 |
d4a36251d57ef41b02e450560b1997545a2b71422eedf72b7d01696b194006a4
|
Provenance
The following attestation bundles were made for pelican_tailwindcss-0.3.0-py3-none-any.whl:
Publisher:
main.yml on pelican-plugins/tailwindcss
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pelican_tailwindcss-0.3.0-py3-none-any.whl -
Subject digest:
3a802340eb55712c262ce945465b51580ad24c815849948bfe0fb2e0a205184f - Sigstore transparency entry: 172959814
- Sigstore integration time:
-
Permalink:
pelican-plugins/tailwindcss@ae799bcfc8cf4c7526aa9be0c1af59aba9735280 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/pelican-plugins
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
main.yml@ae799bcfc8cf4c7526aa9be0c1af59aba9735280 -
Trigger Event:
push
-
Statement type: