-
Notifications
You must be signed in to change notification settings - Fork 9
Metadata
Setting the meta title and meta description for any page can be done through its frontmatter:
---
title: An interesting and informative page title
summary: A useful snippet of text to fill the meta-description
---
The 'title' attribute will create the title tag for the page, while the 'summary' attribute will create a meta tag with the name "description".
You can also add this in dynamically, using the Page function:
page()->title = "A totally useful page title";
In addition to basic metadata added by title and summary, you can use the metadata attribute to specify addition metadata parameters:
The generator meta tag is generally used to tell people what you used to create any given site. Joomla automatically sets a meta tag, which could be considered a security weakness as it's an easy way for bots to know what platform you're using. Unsetting, or changing the meta generator is extremely easy:
metadata:
generator: Totally not Joomla.
While keywords are generally not considered particularly useful for SEO any more, some clients will insist on their use, and there is documented instances where completely unique keywords do influence search results.
Each keyword should be comma separated.
metadata:
keywords: HTML, XML, CSS, Javascript
The author meta tag tells search engines and users who authored the page:
metadata:
author: John Smith
It's beyond the scope of this document to explain the Robots meta tag, however this provides a good summary: https://developers.google.com/search/reference/robots_meta_tag
Here's how to set your Robots meta tag:
metadata:
robots: noindex, follow
Chained attributes should be comma separated
Got a question or need help? We have a forum on Github Discussions where you can get in touch with us.