Template "default.html.twig" is not defined ()

Today I tried my first page with the Learn Gravs Theme-Tutorial “Bootstrap”, but I got this error-messsage when I tried to load it.

1 Like

Do you have a theme installed? The theme must provide the appropriate template to render the page. If your page is called default.md, it will look for a template called templates/default.html.twig in your theme. Antimatter, Bootstrap, and Afterburner2 have this template by default. Other themes may not have it.

Please read this blog post as it gives more details on how themes in Grav work.

Thank you very much, I will try it!

Did you find the cause of this? I just went through the turotial and had the same issue crop up.

Did you do this all the steps in the tutorial: Theme Tutorial?

You need to create the templates/default.html.twig file that extends the templates/partials/base.html.twig

I must have missed something - I did get it to work, but am unsire of what it was I missed.

On a related note - is there a tutorial for setting up simple blog and post templates? I’m decent on front-end stuff, but get a little lost with all the twig stuff. Just hoping you had something to get us newbies started with.

For a blog I strongly suggest downloading the blog skeleton package as it has a great example off a blog site similar to the getgrav.org site. You can see a demo here.

Thanks. I’ll have a look.

Hi, I have also gone through this tutorial. I made the mistake of creating default.html.tiwg within the templates\partials folder. It needs to be in the templates root folder, not the partials sub folder.