Skip to content
● Meet Grav Guard: keep every Grav site you run secure and up to date, all from one place. Free for up to 3 sites. Read more →

Show custom meta data on page content

Started by Natalia Bazilenco 4 years ago · 3 replies · 824 views
4 years ago

Hi, I added a custom meta data on configuration page - slogan-
And now I try to show the slogan on home page after site title.
i try different options

TWIG
<h3>{{ site.slogan.meta }}</h3>
<h3>{{ site.slogan}}</h3>
<h3>{{ site.meta.slogan }}</h3>

but doesnt work. Can you help me please.

4 years ago

@NataliaB, You question would be more informative if you could share the slogan section in /user/config/site.yaml

4 years ago
YAML
metadata:
  description: 'short text about my company'
  slogan: 'We r the best'
4 years ago

I think you should concatenate site title with page metadata. For example:

TWIG
<h3>{{ site.title|e('html') }} - {{ page.metadata.slogan|raw }}</h3>

Suggested topics

Topic Participants Replies Views Activity
Support · by Anna, 5 days ago
1 96 4 days ago
Support · by Anna, 3 weeks ago
1 265 3 weeks ago
Support · by webmasterodp, 1 month ago
4 380 1 month ago
Support · by nwhitfield, 1 month ago
2 351 1 month ago
Support · by stell, 2 months ago
5 657 1 month ago