Closed stephenvoisey closed 8 years ago
There are some sample meta
tags set by the site.yaml
, and also there's a default generator tag. However, you can remove these by simplying putting this in your user/config/site.yaml
:
metadata:
generator:
Basically it removes the description and sets the generator
tag to empty/null.
Throughout Grav there's a consistent methodology of being able to set things site-wide and then override by page. The same is true for metadata, if it's not being set by the page, it's probably being set by some site-wide configuration, in this case, site.yaml
.
Regarding indenting, this is really to do with the nesting of the twig includes. You can control the whitespace a little with Twig via whitespace control: http://twig.sensiolabs.org/doc/templates.html#whitespace-control
However, because a Twig template can theoretically be called from any other template, and potentially at different nested depths, it's really not practical to do this. Really this is not unique to Twig or Grav, this is something that all CMSes face because by their very nature, they are modular.
Even though spaces are totally ignored by browsers and search-engines alike, I know some people are anal about it :) For those folks I suggest looking at the Tidy extension for PHP (or potentially your webserver). However note that there is going to be some level of performance degradation for this processing. So you should definitely test this kind of solution. Also it could 'corrupt' data it doesn't understand, so testing is key.
Some options:
The charaset
and http-equiv
tags I believe are coming from the theme. Grav doesn't have any knowledge of the output format other than as it is defined in the theme. You are expected to modify a theme to your needs, and this is the place to do that kind of thing.
Also this goes for the HTML5 meta tag ending in >
rather than />
. You just change this in the theme's partial for outputting the metadata. Again Grav itself doesn't control the output at all. The theme is considered something the user should manipulate to his/her own needs.
P.S. feel free to post PRs to Antimatter if you feel something can be improved in regards to its output.
Appreciate the great feedback and help, apologies if I posted here in error.
Hey RocketTheme,
I'm trying to nicely generate my meta data tags in my template. As mentioned by Andy in the gitter room, he suggested using the new method as seen in Antimatter template to include a partial twig page with the following code in:
I ran into a couple of issues:
Would be good defaults to add, again as tweakable options in the config settings.
Hope this is useful feedback, even if I am being picky. Cheers for a great CMS.