How to set / remove drupal 8 meta tags
Adding meta tags to drupal 8, how to do it "drupal" way ? Meta tags like keywords, description, author etc.
Removing drupal own metatags like:
<meta name="Generator" content="Drupal 8 (https://www.drupal.org)" /> <meta name="MobileOptimized" content="width" /> <meta name="HandheldFriendly" content="true" />
I have added the meta tags currently just to html.html.twig file. There seems to be module which is in beta stage, but if possible, I would like to avoid using 3rd party modules for this at the moment.
The Meta tags module requires you to install three modules:
- Meta tags: http://drupal.org/project/metatag
- CTools: http://drupal.org/project/ctools
- Token: http://drupal.org/project/token
You will see that the Meta Tags module comes with additional modules you can enable it.
Configure Meta Tags Module
- Click on Configuration in the black admin menu bar
- Click on Meta tags in the Search and Metadata box on the left side of the screen.
Notice there are four global settings.
- Click on each and observe what you get by default. All nodes, terms, and users will have the same configuration by default. But that doesn't have to be the case.
Now add default Meta Tag.
Click on Add a meta tag default.
Selet Article from the Type dropdown. Enter the token [node:content-type:description] in the abstract field. Save When you create an Article node from now on, the description of the Article content type will appear as such:
Now its time to enter the meta tag data with in the site.
These are some of the basic steps you can follow to add Meta Tag in Drupal. Please follow the steps and let me know if there are any other issue you get.
- → How to set / remove drupal 8 meta tags
- → How to do Bundling of css & js files in Drupal
- → Button onclick and save cookie on Drupal 7
- → How can I use both Laravel and Drupal in my website?
- → VueJS component won't render on front end (possibly Drupal issue)
- → Git remote existing distant project to local
- → Commerce paypal WPS not convert unsupported currency
- → Aborting a change to a node from a module
- → Can I specify a Schema.org property at the item wrapper level instead of the item tag?
- → Mysql exception after moving drupal site PDOException: SQLSTATE[HY000] 
- → Drupal 7 PDOException: SQLSTATE[HY000]: General error: 1366 Incorrect integer value
- → drupal7 get content with manual sql
- → Drupal 7: how do I add the async attribute to an external JS script when using drupal_add_js?