mirror of
https://github.com/CorentinTh/it-tools.git
synced 2025-04-24 00:36:14 -04:00
feat(seo): removed duplicate keywords and added split title
This commit is contained in:
parent
4fdc09a787
commit
34800f461d
1 changed files with 4 additions and 1 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue