Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tailwind.config.js not generated #4

Open
kjaymiller opened this issue Oct 30, 2023 · 0 comments
Open

tailwind.config.js not generated #4

kjaymiller opened this issue Oct 30, 2023 · 0 comments

Comments

@kjaymiller
Copy link
Owner

when you create your site, there is no generation of the tailwind config file.

This needs to be created by the user.

Here are some things that could be done to improve this:

Create the template on run if not exists

We could create the basic config as a template

/** @type {import('tailwindcss').Config} */
module.exports = {
  content: ['output/**/*.{html, js}'],
  plugins: [require('@tailwindcss/typography')] // This could be optional as a plugin_extra
}

We can then have a pre_build_site hookspec that happens prior to rendering that checks for the tailwind.config.js and creates the file if it doesn't exist.

import pathlib

class TailwindCSS:

    @hook_impl
    def pre_build_site(site:Site):
          if not pathlib.Path('tailwind.confilg.js').exits():
               Template(tailwind_config_template).render(extras=extras)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant