Skip to content

Commit

Permalink
Merge pull request #73 from RadKod/refactor/seo
Browse files Browse the repository at this point in the history
Refactor/seo
  • Loading branch information
selimdoyranli authored Oct 27, 2024
2 parents 81f5da0 + 5c51427 commit fb43243
Show file tree
Hide file tree
Showing 8 changed files with 255 additions and 77 deletions.
18 changes: 18 additions & 0 deletions app.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,24 @@
></script>
</head>
<body {{ BODY_ATTRS }}>
<header style="display: none">
<h1>kelime oyunu</h1>
<strong>günlük kelime oyunu</strong>
<p>
parolla, kelime oyunu oyna, kendi kelime oyunu sorularını oluştur, oyuncuların oluşturduğu eğlenceli soruları çöz. passaparola oyna
</p>
<a href="https://www.parolla.app" title="kelime oyunu">kelime oyunu</a>
</header>
{{ APP }}
<footer style="display: none">
<h3>kelime oyunu oyna</h3>
<strong>günlük kelime oyunu</strong>
<p>
parolla, kelime oyunu oyna, kendi kelime oyunu sorularını oluştur, oyuncuların oluşturduğu eğlenceli soruları çöz, pasaparola oyna,
günlük bulmaca çöz, günlük bulmaca
</p>
<a href="https://www.parolla.app" title="günlük kelime oyunu">günlük kelime oyunu</a>
<strong>günlük bulmaca</strong>
</footer>
</body>
</html>
49 changes: 49 additions & 0 deletions nuxt-config/head.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
const { title, meta } = require('../system/head/main/tr')

module.exports = {
htmlAttrs: {
lang: 'tr'
},
title,
link: [
{ rel: 'icon', type: 'image/x-icon', href: '/meta/icon/favicon.ico' },
{ rel: 'dns-prefetch', href: '//api.radkod.com' },
{ rel: 'manifest', href: '/manifest.json' }
],
meta: [
{ charset: 'utf-8' },
{
name: 'viewport',
content: 'width=device-width, initial-scale=1.0, interactive-widget=resizes-content, user-scalable=no'
},
{
hid: 'robots',
name: 'robots',
content: 'index,follow'
},
{
hid: 'Publisher',
property: 'Publisher',
content: 'RadKod'
},
{
hid: 'theme-color',
name: 'theme-color',
content: '#eee'
},
{
name: 'apple-mobile-web-app-capable',
content: 'yes'
},
{
name: 'apple-mobile-web-app-status-bar-style',
content: 'black-translucent'
},
{ name: 'Classification', content: 'Game' },
{ name: 'Rating', content: 'General' },
{ name: 'Distribution', content: 'Global' },
{ name: 'Copyright', content: 'parolla' },
{ itemprop: 'copyrightYear', content: new Date().getFullYear().toString() },
...meta
]
}
24 changes: 8 additions & 16 deletions nuxt.config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
const head = require('./nuxt-config/head')

module.exports = {
watch: ['nuxt-config/**/*'],
/*
** Nuxt target
** See https://nuxtjs.org/api/configuration-target
Expand All @@ -23,17 +26,7 @@ module.exports = {
** Headers of the page
** See https://nuxtjs.org/api/configuration-head
*/
head: {
htmlAttrs: {
lang: 'tr'
},
title: 'parolla - Kelime oyunu',
link: [
{ rel: 'icon', type: 'image/x-icon', href: '/meta/icon/favicon.ico' },
{ rel: 'dns-prefetch', href: '//api.radkod.com' },
{ rel: 'manifest', href: '/manifest.json' }
]
},
head,

/*
** Global Styles (Do not import actual styles)
Expand Down Expand Up @@ -89,7 +82,7 @@ module.exports = {
{ src: '~/plugins/vuex-persist', ssr: false }, // https://www.npmjs.com/package/vuex-persist
{ src: '~/plugins/ua-injector', ssr: false },
{ src: '~/plugins/theme-color', ssr: false },
{ src: '~/plugins/global-meta-tags-setter', ssr: false },
{ src: '~/plugins/dynamic-head', ssr: false },
{ src: '~/plugins/iconify', ssr: false }, // https://www.npmjs.com/package/@iconify/vue
{ src: '~/plugins/vue-timeago', ssr: false } // https://vue-timeago.egoist.sh
],
Expand Down Expand Up @@ -277,11 +270,10 @@ module.exports = {
postcss: {
postcssOptions: {
plugins: {
'postcss-preset-env': this.preset
'postcss-preset-env': {
stage: 2
}
}
},
preset: {
stage: 2
}
}
},
Expand Down
14 changes: 13 additions & 1 deletion pages/CreatorMode/CreatorModeRoom/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,19 @@ export default defineComponent({
const room = computed(() => store.getters['creator/room'])
useMeta(() => ({
title: room.value?.title ? `${room.value.title} | ${i18n.t('seo.main.title')}` : i18n.t('seo.main.title')
title: room.value?.title && `${room.value.title}`,
meta: [
{
hid: 'og:title',
name: 'og:title',
content: room.value?.title && `${room.value.title} - ${i18n.t('seo.main.title')}`
},
{
hid: 'twitter:title',
name: 'twitter:title',
content: room.value?.title && `${room.value.title} - ${i18n.t('seo.main.title')}`
}
]
}))
},
head: {}
Expand Down
21 changes: 21 additions & 0 deletions plugins/dynamic-head.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
export default ({ app }) => {
const extendedApp = app

const headFile = require(`@/system/head/main/${extendedApp.i18n.locale || 'tr'}.js`)

if (extendedApp.head) {
extendedApp.head.htmlAttrs.lang = extendedApp.i18n.locale
extendedApp.head.htmlAttrs.dir = extendedApp.i18n.localeProperties.dir

const setTitle = () => {
extendedApp.head.title = headFile.title
}

const setMeta = () => {
extendedApp.head.meta = headFile.meta
}

setTitle()
setMeta()
}
}
60 changes: 0 additions & 60 deletions plugins/global-meta-tags-setter.js

This file was deleted.

73 changes: 73 additions & 0 deletions system/head/main/en.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
export const title = 'parolla - Word game. Daily word game'

export const meta = [
{
hid: 'description',
name: 'description',
content: 'Play daily word game, create your own word game questions, solve fun questions created by players'
},
{
hid: 'keywords',
name: 'keywords',
content: 'word game, play word game, daily word game, play daily word game'
},
{
name: 'apple-mobile-web-app-capable',
content: 'yes'
},
{
hid: 'og:type',
property: 'og:type',
content: 'website'
},
{
hid: 'og:title',
property: 'og:title',
content: 'parolla - Word game'
},
{
hid: 'og:description',
property: 'og:description',
content: 'Solve daily questions and join the competition. Create your own Q&A set and solve fun questions created by players'
},
{
hid: 'og:url',
property: 'og:url',
content: 'https://parolla.app'
},
{
hid: 'og:image',
property: 'og:image',
content: '/meta/og-main-en.png'
},
{
hid: 'twitter:card',
property: 'twitter:card',
content: 'summary_large_image'
},
{
hid: 'twitter:title',
property: 'twitter:title',
content: 'parolla - Word game'
},
{
hid: 'twitter:description',
property: 'twitter:description',
content: 'Solve daily questions and join the competition. Create your own Q&A set and solve fun questions created by players'
},
{
hid: 'twitter:url',
property: 'twitter:url',
content: 'https://parolla.app'
},
{
hid: 'twitter:image',
property: 'twitter:image',
content: '/meta/og-main-en.png'
},
{
hid: 'twitter:creator',
property: 'twitter:creator',
content: `@parollaapp`
}
]
73 changes: 73 additions & 0 deletions system/head/main/tr.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
export const title = 'parolla - Kelime oyunu. Günlük kelime oyunu'

export const meta = [
{
hid: 'description',
name: 'description',
content: 'Günlük kelime oyunu oyna, kendi kelime oyunu sorularını oluştur, oyuncuların oluşturduğu eğlenceli soruları çöz'
},
{
hid: 'keywords',
name: 'keywords',
content: 'kelime oyunu, kelime oyunu oyna, günlük kelime oyunu, günlük kelime oyunu oyna'
},
{
name: 'apple-mobile-web-app-capable',
content: 'yes'
},
{
hid: 'og:type',
property: 'og:type',
content: 'website'
},
{
hid: 'og:title',
property: 'og:title',
content: 'parolla - Kelime oyunu'
},
{
hid: 'og:description',
property: 'og:description',
content: 'Günlük soruları çöz ve rekabete katıl. Kendi soru-cevap setini oluştur, oyuncuların oluşturduğu eğlenceli soruları çöz'
},
{
hid: 'og:url',
property: 'og:url',
content: 'https://parolla.app'
},
{
hid: 'og:image',
property: 'og:image',
content: '/meta/og-main-tr.jpg'
},
{
hid: 'twitter:card',
property: 'twitter:card',
content: 'summary_large_image'
},
{
hid: 'twitter:title',
property: 'twitter:title',
content: 'parolla - Kelime oyunu'
},
{
hid: 'twitter:description',
property: 'twitter:description',
content: 'Günlük soruları çöz ve rekabete katıl. Kendi soru-cevap setini oluştur, oyuncuların oluşturduğu eğlenceli soruları çöz'
},
{
hid: 'twitter:url',
property: 'twitter:url',
content: 'https://parolla.app'
},
{
hid: 'twitter:image',
property: 'twitter:image',
content: '/meta/og-main-tr.jpg'
},
{
hid: 'twitter:creator',
property: 'twitter:creator',
content: `@parollaapp`
}
]

0 comments on commit fb43243

Please sign in to comment.