Trouble creating a new theme on MAMP on iMAC

I have installed devtools in the root of my site MAMP/htdocs/pnhbquark.

Then bin/plugin devtools new-theme
Answered questions.
Now stuck on Please choose an option
[pure-blank ] Basic Theme using Pure.css
[inheritence] Inherit from another theme
[copy ] Copy another theme

Everything I try is invalid. Tried “inheritance”, 1, 0. Tried clicking on “inheritance”.

Am I missing something obvious?

I want my theme to be like quark, replacing a few templates. Should I start with a blank and put just my revised and new templates in the new the theme?

Thanks
Norma

Hi Norma,

which error u get? Did u place the theme in grav-intall-path/usr/templates ?

@normawhite I don’t know the root cause of your issue, but to get you going in the meantime, you might want to have a look at the tutorial Theme Inheritance.

Inheriting a theme by hand is really, really simple… Reading the procedure takes a minute and doing the cut and paste another one…

But don’t forget to replace “mytheme” and “antimatter” during the cut & paste or it might take a bit longer… :wink:

I was following the manual just fine until the choice of empty, inherit. There the manual showed that I could enter 0. the response to either was simply “invalid”, followed by a repeat of the options.

I have successfully followed the advice in the other response (pambau) all is well (until the next problem).

Many thanks - that worked for now.

This worked well for my changes to blog and its helpers. But doe not seem to work for a new modular twig. I have truetest,html.twig - a modification of text.html.twig to fill the page with text when there is no image.

My site was working well until I moved it into my theme pnhbtheme/templates/modular.


Then I get the error modular/truetext.html.twig not found.

Am I missing something?

Thanks
Norma

Hi @normawhite, if I am reading things right the templates folder should be at the same level as your pnhbtheme.yaml. Here is another example inherited theme to look at re: structure https://github.com/hibbitts-design/grav-theme-course-hub-bootstrap

Hope the above helps, and Happy Canada Day!

Thanks, but my templates folder is at the same level as pnhbtheme.yaml.
I posted a picture of the directory structure, but I quess that I am not allowed to post an image file.

So the structure is
theme
pnhbtheme
-templates
–modular
—truetext.html.twig
–partials
—blog-item.html.twig
—blog-list-item.html.twig
–blog.html.twig
-pnhbtheme.yaml
-blueprints.yaml
All the blog stuff works as intended.
Only the modular fails.

Templates and the two yamls are at the same level.
Your example does not include any overrides to a modular template. The error is failed to find modular/truetext.html.twig.

Happy Canada Day to you too.
Here we had emergency stay out of the heat warnings:) I have almost succeeded in converting my site to run with quark instead of Gantry.
Norma

Sorry, I misled you - it turns out the blog changes were not working either - I did not notice:)
I see now that two yamls need to be in themes.
Thanks

Well no, I think they were right before. They are in exactly the same place in pnhbtheme as same named files in quark directory and where the manual says to put them.
Still my blog uses the blog.html.twig and truetext.html.twig from quark.
And yes, I cleared all cache many times.
Is there something else?
Thanks

Hmm… if you want to please DM me in the Slack room with your user folder zipped and I can have a look for you @normawhite

Hi Paul

Thanks. Actually, I just managed to fix it - pretty much the way it was. So back in business for now, Norma

1 Like