Skip to content
Grav 2.0 is officially stable. Read the announcement →

Community guidelines

Please keep discussions civil and on-topic. Repeated violations may lead to a temporary ban.

Support

Can't find metadata.html.twig - theme tutorial

Solved by osagrav View solution

Started by osagrav 9 months ago · 7 replies · 131 views
9 months ago

I'm reading the Theme Tutorial (https://learn.getgrav.org/17/themes/theme-tutorial) and on Step 5 "Breaking It Down", item #5 reads:

After a couple of standard meta tags are set, there is a reference to include partials/metadata.html.twig. This file is located in the systems/templates/partials folder and contains a loop that loops over the page's metadata.

I've looked in the Quark theme, and the "Clean" theme I just created, but there is no "metadata.html.twig" file anywhere to be found. In fact, I'm even having trouble finding a copy online.

Where can I find this file?

9 months ago

@osagrav,

@osagrav:
This file is located in the systems/templates/partials folder

What about this line is it you do not understand? ;-)

9 months ago

@pamtbaau:
What about this line is it you do not understand? 😉

Seriously? What about my entire post don't you understand?

That file isn't there. That's the problem. I've looked in all the themes I have.

It's not even in the Quark repo, have a look for yourself:
https://github.com/search?q=repo%3Agetgrav%2Fgrav-theme-quark%20metadata.html.twig&type=code

And I even went to my /user/ directory (I'm using the Grav Docker container) and ran a search but it's not in there, either. Not even a /system/ directory in there.

last edited 09/09/25 by osagrav
9 months ago

@osagrav:
Seriously?

Yes, seriously...

And I even went to my /user/ directory (I’m using the Grav Docker container) and ran a search but it’s not in there, either. Not even a /system/ directory in there.

Seriously? :-)

Try the /system/ directory inside the root of your Grav installation...

1...2...3...4... Ah, there's the :person_facepalming: moment... ;-)

You're excused... There is a typo in the docs it should say /system/templates/partials instead of systems/templates/partials

/system/ also contains default configs, default blueprints, etc. That's the first place where Grav looks for resources and then overrides these resources with resources found in /user/ (eg. /user/configs/, /user/themes/quark/templates/partials/).

9 months ago Solution

Wow. What a childish, rude, and condescending "welcome" to these forums.

Don't worry, I'd already found the answer on my own:
https://github.com/getgrav/grav-theme-quark/issues/12

The actual answer is that in the Docker, the files are not exposed to the host filesystem, only /config/ is. Therefore, /system/ was not present where I was looking (and because I'm new to Grav). Which means /system/ was in the actual Docker container.

You're the one who needs to be excused, I'm afraid. I was just looking for help, not an insult.

Yikes.

9 months ago

@osagrav, I'm afraid we have a different sense of humor... It was certainly not meant to be childish, rude and condescending. It also wasn't meant to be an insult... If it would, I would not have added smileys and winks to mark the lightness of my remarks.

Sorry to hear you've interpreted it that way. Maybe I should have taken your fist reply as an early warning of misinterpretation.

Anyway, I'm glad you've found the issue.

👍 1
9 months ago

It was the childish, rude, and condescending words and tone that you used, not the way they were taken.
A lot can be lost in translation and intention when writing text.
It's okay, though, I forgive you.
Yes, I'm also glad I found the file. Now I see what it is doing.

👍 1
9 months ago

I'm so glad I read to the end of this thread :face_with_peeking_eye: and it was just a misunderstanding.

I have also wasted time wondering the same thing. The answer is indeed clear in the docs but it can be easy to overlook because of an oversight like the file not existing on your filesystem.

Suggested topics

Topic Participants Replies Views Activity
Support · by Thomas, 1 week ago
2 50 6 hours ago
Support · by Anna, 2 days ago
2 58 9 hours ago
Support · by Justin Young, 10 hours ago
1 28 10 hours ago
Support · by Duc , 1 week ago
2 63 5 days ago
Support · by Colin Hume, 1 week ago
2 53 5 days ago