New created theme with dev tools (tailwind) - no logo or stylesheets working?

Hi there,

I play around with Grav CMS and its plugin dev tools. With this plugin I had successfully created a theme with tailwind.

I am a bit confused about a thing with this theme. In the “head” of the page I can see this code:
<link rel="icon" type="image/png" href="/user/themes/taily/images/logo.png" />

I can click on the link and I see the Grav-logo in a new browser window.

But I can not see this image on the page itself. Why?

The code in base.html.twig of the image is this:
<link rel="icon" type="image/png" href="{{ url('theme://images/logo.png')|e }}" />

Also the whole page output seems not working right now. It seems that the stylesheet is not loading exactly!

How can I fix it?

@wmcig, It looks like the tailwind theme generated with $ bin/plugin devtools new-theme is totally broken.

Template /user/themes/taily/templates/partials/base.html.twig loads css as follows:

{% do assets.addCss('theme://dist/css/app' ~ extension ~ '.css', 98) %}

However, that file does not exist at all…

You might consider creating an issue at Issues · getgrav/grav-plugin-devtools · GitHub

Opened an issue on Github. Hope that will be fixed very soon.

@wmcig, Just learned something…

The tailwind theme generated by devtools is not a "prêt-à-porter " theme. You first need to:

  • $ cd user/themes/yourtheme
  • $ npm install
  • $ npm run build

But even that is not enough… the /dist/css/app.css that is loaded by the template still not not exist. The npm script generates /dist/css/site.css.

A patch has already created at the repo, but probably a new release must be created. The latest release dates from Oct. 26, 2021 while the new commit is from March 14, 2022.

I’ve added a comment to the issue.