Closed Mopster closed 9 years ago
Ok, the site.yml in /data works, I had it located at the wrong place. But the default values stored in site.yml are not being overwritten by the page meta information.
You shouldn't use both auto_display_meta_tags
and display_meta_tags site: 'test'
.
If you want, you could do something like auto_display_meta_tags site: 'ok'
Is it working now @Mopster?
I'll be giving it another go on Monday. I used both lines to test them, I used them seperately, but they both only give the twitter meta tag and the default site.yml information. The info written in the frontmatter on the documents are not being used to override the default info.
I started a new site with the middleman-blog template and added the meta-tags gem en follows the readme instructions, you can see the result in the screenshot below. The site.yml data is being printed, but the frontmatter title and description data are not being used.
Please refer to the README!
Either use set_meta_tags title: 'Relevant title'
for non-common tags or title 'Relevant title'
for common ones. You can also set values with the display_meta_tags
or auto_display_meta_tags
.
Frontmatter can't be used with dynamic values (I mean, data/
or ruby variables).
I installed the gem and followed the readme, but both the
and
are only printing the following line :
The 'site' variable isn't being read from the 'data/site.yml'. The title and description are also not taken from the frontmatter of my index page or an article page.
My Gemfile :
In config.rg :
In the
of the layouts/layout.erb :The data/site.yml file :