feat(seo): removed duplicate keywords and added split title
This commit is contained in:
		
							parent
							
								
									4fdc09a787
								
							
						
					
					
						commit
						34800f461d
					
				| @ -2,6 +2,7 @@ | ||||
| import {Component, Vue} from 'nuxt-property-decorator' | ||||
| import ToolWrapper from '~/components/ToolWrapper.vue' | ||||
| import type {ToolConfig} from '~/types/ToolConfig' | ||||
| 
 | ||||
| @Component({components: {ToolWrapper}}) | ||||
| export default class Tool extends Vue { | ||||
|   config(): ToolConfig { | ||||
| @ -11,6 +12,8 @@ export default class Tool extends Vue { | ||||
|   public head() { | ||||
|     const {title, description, keywords} = this.config() | ||||
| 
 | ||||
|     const uniqueKeywords = [...new Set([...keywords, ...title.split(/\s+/)])] | ||||
| 
 | ||||
|     return { | ||||
|       title, | ||||
|       meta: [ | ||||
| @ -21,7 +24,7 @@ export default class Tool extends Vue { | ||||
|         }, | ||||
|         { | ||||
|           name: 'keywords', | ||||
|           content: keywords, | ||||
|           content: uniqueKeywords, | ||||
|           hid: 'keywords' | ||||
|         } | ||||
|       ] | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user