lukeed

@bongo/tailwind

Tailwind CSS for bongo, built from the classes that your pages use.

#Install

bun add -d @bongo/tailwind tailwindcss

#Usage

Add the plugin to bongo.config.ts:

import { tailwind } from '@bongo/tailwind';

export default {
	$site: { url: 'https://example.com/', title: 'My Site', lang: 'en' },
	plugins: [tailwind()],
};

Import Tailwind in a stylesheet, and link it with <bongo:style src="https://raw.githubusercontent.com/lukeed/bongo/main/packages/plugin.tailwind/app.css" />:

/* assets/app.css */
@import "tailwindcss";

The stylesheet gets the utilities of:

  • each class name in a class attribute of a rendered page,
  • each class name in the scripts of the folder of the stylesheet, and
  • each file that an @source names.

See the docs for the details.

#License

MIT © Luke Edwards

See also

@bongo/bongo(3), @bongo/feed(3), @bongo/markdown(3), @lukeed/bongo(3), create-bongo(3), create-worktop(3), tsm(3), tschema(3), fetch-event-stream(3), resolve.exports(3)