v0.5.0 - SEO friendly update
- sitemap.xml - robots.txt - meta-tags
This commit is contained in:
@@ -1,10 +1,13 @@
|
||||
import { createApp } from 'vue'
|
||||
import App from './App.vue'
|
||||
import router from './router'
|
||||
import { createHead } from '@vueuse/head'
|
||||
import './assets/styles.css'
|
||||
|
||||
const app = createApp(App)
|
||||
const head = createHead()
|
||||
|
||||
app.use(router)
|
||||
app.use(head)
|
||||
|
||||
app.mount('#app')
|
||||
+21
-2
@@ -26,8 +26,27 @@ const router = createRouter({
|
||||
},
|
||||
|
||||
routes: [
|
||||
{ path: '/', name: 'home', component: HomeView },
|
||||
{ path: '/docs/:docName', name: 'documents', component: DocViewer, props: true }
|
||||
{
|
||||
path: '/',
|
||||
name: 'home',
|
||||
component: HomeView,
|
||||
meta: {
|
||||
title: 'uVPN — Защита вашего цифрового мира',
|
||||
description: 'Безопасный, быстрый и анонимный VPN-сервис для вашего ПК и смартфона. Защитите свои данные от посторонних глаз уже сегодня.',
|
||||
keywords: 'vpn, сервис, анонимность, безопасность, шифрование, купить vpn'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: '/docs/:docName',
|
||||
name: 'documents',
|
||||
component: DocViewer,
|
||||
props: true,
|
||||
meta: {
|
||||
title: 'Документы uVPN',
|
||||
description: 'Пользовательское соглашение и политика конфиденциальности сервиса uVPN.',
|
||||
keywords: 'vpn, пользовательское соглашение, политика конфиденциальности, документы'
|
||||
}
|
||||
}
|
||||
]
|
||||
})
|
||||
|
||||
|
||||
@@ -18,4 +18,40 @@ import PricingSection from '../components/PricingSection.vue'
|
||||
import StepsSection from '../components/StepsSection.vue'
|
||||
import TestimonialsSection from '../components/TestimonialsSection.vue'
|
||||
import FaqSection from '../components/FaqSection.vue'
|
||||
|
||||
import { useHead } from '@vueuse/head';
|
||||
import { useRoute } from 'vue-router';
|
||||
|
||||
const route = useRoute();
|
||||
|
||||
useHead({
|
||||
title: route.meta.title,
|
||||
meta: [
|
||||
{
|
||||
name: 'description',
|
||||
content: route.meta.description
|
||||
},
|
||||
{
|
||||
name: 'keywords',
|
||||
content: route.meta.keywords
|
||||
},
|
||||
// Open Graph теги для соцсетей
|
||||
{
|
||||
property: 'og:title',
|
||||
content: route.meta.title
|
||||
},
|
||||
{
|
||||
property: 'og:description',
|
||||
content: route.meta.description
|
||||
},
|
||||
{
|
||||
property: 'og:type',
|
||||
content: 'website'
|
||||
},
|
||||
{
|
||||
property: 'og:url',
|
||||
content: window.location.href // Здесь можно также задать каноничный URL
|
||||
}
|
||||
]
|
||||
});
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user