├── LICENSE ├── README.md ├── composer.json ├── unset_html_head_link.info.yml └── unset_html_head_link.module /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2017 Vic Shóstak 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Unset HTML head link (Drupal 8.x) 2 | 3 | [![GitHub release](https://img.shields.io/badge/version-1.1-brightgreen.svg?style=flat-square)](https://github.com/webartisans-org/drupal_8_unset_html_head_link) [![licence](https://img.shields.io/badge/CMS_Drupal-8.x-red.svg?style=flat-square)](https://www.drupal.org) [![licence](https://img.shields.io/badge/licence-MIT-blue.svg?style=flat-square)](https://github.com/webartisans-org/drupal_8_unset_html_head_link/blob/master/LICENSE) 4 | 5 | > Module for unset any wrong HTML links (like `rel="delete-form"`, `rel="edit-form"`, etc.) from head on Drupal 8.x websites. This is trust way to grow up position in SERP Google, Yandex, etc. 6 | 7 | As we know, delete this HTML head links was improve SEO for your CMS Drupal 8.x website: 8 | 9 | ```html 10 | 11 | 12 | 13 | 14 | 15 | 16 | ``` 17 | 18 | Support for: 19 | 20 | * Nodes 21 | * Taxonomy terms 22 | * Entity Clone 23 | 24 | ### Install module 25 | 26 | With Composer: 27 | 28 | ```console 29 | composer require 'drupal/unset_html_head_link:1.x-dev' 30 | ``` 31 | 32 | Or download [ZIP with module](https://github.com/webartisans-org/unset_html_head_link/archive/master.zip), unpack and upload to `./modules/` folder in your server. 33 | 34 | * Enable this module at `/admin/modules` (look in `Search engine optimization` pack). 35 | * **Don't forget to flush cache!** 36 | 37 | ### SEO hints 38 | 39 | * Use [Metatag](https://www.drupal.org/project/metatag) module for add _only right_ META information to your site. 40 | 41 | ### Author & maintainers 42 | 43 | Development and maintenance engaged by [Vic Shóstak](https://github.com/koddr) (aka Koddr) for [True web artisans](https://github.com/truewebartisans). If you want to say «thank you» and/or ask me about `Unset HTML head link` — [create new issue](https://github.com/truewebartisans/drupal_8_unset_html_head_link/issues/new). 44 | 45 | ### Your assistance will help make project even better! 46 | 47 | * [Donate with PayPal](https://www.paypal.me/koddr/9.99usd) 48 | * [Donate with Yandex.Money](https://money.yandex.ru/to/41001601525977/599) 49 | 50 | Thanks for supporting! 51 | 52 | ### License 53 | 54 | [The MIT License (MIT)](https://github.com/truewebartisans/drupal_8_unset_html_head_link/blob/master/LICENSE) 55 | -------------------------------------------------------------------------------- /composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "koddr/unset_html_head_link", 3 | "type": "drupal-module", 4 | "description": "Module for unset any wrong HTML links (like rel=delete-form, rel=edit-form, etc.) from head on Drupal 8.x websites. This is trust way to grow up position in SERP Google, Yandex, etc.", 5 | "keywords": ["Drupal", "SEO", "META"], 6 | "license": "MIT", 7 | "homepage": "https://github.com/webartisans-org/drupal_8_unset_html_head_link", 8 | "minimum-stability": "dev", 9 | "support": { 10 | "issues": "https://github.com/webartisans-org/drupal_8_unset_html_head_link/issues", 11 | "source": "https://github.com/webartisans-org/drupal_8_unset_html_head_link" 12 | }, 13 | "require": { } 14 | } 15 | -------------------------------------------------------------------------------- /unset_html_head_link.info.yml: -------------------------------------------------------------------------------- 1 | # Module name. 2 | name: Unset HTML head link 3 | # Module description. 4 | description: 'Module for unset any wrong HTML links (like rel=delete-form, rel=edit-form, etc.) from head on Drupal 8.x websites. This is trust way to grow up position in SERP Google, Yandex, etc.' 5 | # Module dev info. 6 | core: 8.x 7 | type: module 8 | package: SEO 9 | # Module version. 10 | version: 1.1 11 | -------------------------------------------------------------------------------- /unset_html_head_link.module: -------------------------------------------------------------------------------- 1 | $value) { 50 | if (isset($value[0]['rel']) && in_array($value[0]['rel'], $unset_html_head_link)) { 51 | unset($attachments['#attached']['html_head_link'][$key]); 52 | } 53 | } 54 | } 55 | 56 | /** 57 | * Implements hook_module_implements_alter(). 58 | */ 59 | function unset_html_head_link_module_implements_alter(&$implementations, $hook) { 60 | if ($hook === 'page_attachments_alter') { 61 | $group = $implementations['unset_html_head_link']; 62 | unset($implementations['unset_html_head_link']); 63 | $implementations['unset_html_head_link'] = $group; 64 | } 65 | } 66 | --------------------------------------------------------------------------------