Переглянути джерело

refactor(seo): 统一页面标题格式并优化全局SEO配置

简化各页面的useHead配置,移除重复的meta标签
添加全局的默认SEO配置和favicon
为图片添加alt属性以提升可访问性
piks 2 тижнів тому
батько
коміт
aabdf0f11b

+ 3 - 3
app/components/products/Defense.vue

@@ -21,7 +21,7 @@
               <li>• 日本节点:作为东亚数据枢纽,为日本、韩国及泛亚地区用户提供超低延迟访问,保障区域业务流畅稳定。</li>
               <li>• 香港节点:具备独特的网络中立性与中国大陆极速连接能力,是同时服务内地用户与全球业务的绝佳桥梁。</li>
             </ul>
-            <NuxtImg width="202" class="ddos-img" src="/images/products/ddos.png" />
+            <NuxtImg width="202" class="ddos-img" src="/images/products/ddos.png" alt="DDoS攻击防护示意图" />
           </div>
         </div>
 
@@ -31,7 +31,7 @@
               <h4>全球分布式近源清洗,让攻击流量</h4>
               <h4>无法触及您的业务核心</h4>
             </div>
-            <NuxtImg src="/images/products/spread.png" />
+            <NuxtImg src="/images/products/spread.png" alt="全球分布式近源清洗网络拓扑图" />
           </div>
           <div class="card-content">
             <p>
@@ -53,7 +53,7 @@
               </p>
             </div>
           </div>
-          <NuxtImg width="256" height="auto" class="defense-image" src="/images/products/sd.png" />
+          <NuxtImg width="256" height="auto" class="defense-image" src="/images/products/sd.png" alt="高防CDN节点安全防护架构图" />
         </div>
       </div>
     </div>

+ 3 - 0
app/pages/mobile/about.vue

@@ -60,6 +60,9 @@ import cardIcon3 from '@/assets/svg/about/card-icon3.svg'
 import cardIcon4 from '@/assets/svg/about/card-icon4.svg'
 import cardIcon5 from '@/assets/svg/about/card-icon5.svg'
 
+useHead({
+  title: '关于我们'
+})
 
 const accordionItems = [
   {

+ 3 - 3
app/pages/mobile/index.vue

@@ -114,9 +114,9 @@ import ProductTabs from '~/components/mobile/home/ProductTabs.vue'
 import PlansSection from '~/components/mobile/home/PlansSection.vue'
 import Flowchart from '~/components/mobile/home/Flowchart.vue'
 import StatsSection from '~/components/mobile/home/StatsSection.vue';
-useHead(() => ({
-  title: 'DDAC',
-}))
+useHead({
+  title: 'DDAC'
+})
 </script>
 
 <style scoped lang="scss">

+ 3 - 3
app/pages/mobile/products/boost.vue

@@ -102,9 +102,9 @@
 </template>
 
 <script setup>
-useHead(() => ({
-  title: '高防服务器',
-}))
+useHead({
+  title: '高防服务器'
+})
 import SecurityServicesSuite from '~/components/mobile/products/SecurityServicesSuite.vue'
 const activeTab = ref('accelerate')
 

+ 3 - 6
app/pages/mobile/products/sdk.vue

@@ -57,12 +57,9 @@ import icon2 from '~/assets/svg/products/sdk/acceleration.svg'
 import icon3 from '~/assets/svg/products/sdk/lock.svg'
 import icon4 from '~/assets/svg/products/sdk/user.svg'
 
-useHead(() => ({
-  title: 'SDK安全加固',
-  meta: [
-    { name: 'viewport', content: 'width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no' }
-  ]
-}))
+useHead({
+  title: 'SDK安全加固'
+})
 
 const accordionItems = [
   {

+ 3 - 6
app/pages/mobile/products/web.vue

@@ -62,12 +62,9 @@
 </template>
 
 <script setup>
-useHead(() => ({
-  title: 'Web安全加速 - 移动端',
-  meta: [
-    { name: 'viewport', content: 'width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no' }
-  ]
-}))
+useHead({
+  title: 'Web安全加速'
+})
 import icon1 from '~/assets/svg/products/web/icon.svg'
 import icon2 from '~/assets/svg/products/web/icon2.svg'
 import icon3 from '~/assets/svg/products/web/icon3.svg'

+ 1 - 1
app/pages/web/about.vue

@@ -42,7 +42,7 @@ import MatrixCard from '~/components/about/MatrixCard.vue';
 import DCard from '~/components/about/DCard.vue';
 
 useHead({
-  title: 'DDAC - 了解我们',
+  title: '了解我们'
 })
 
 </script>

+ 3 - 12
app/pages/web/index.vue

@@ -162,18 +162,9 @@ const onVideoLoaded = () => {
   }
 }
 
-useHead(() => ({
-  title: 'DDAC',
-  meta: [
-    { name: 'viewport', content: 'width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no' },
-    { name: 'description', content: 'DDAC - 游戏盾防御' },
-    { name: 'keywords', content: '高防服务器 | 高防DNS | 游戏盾SDK | 高防CDN' }
-  ],
-  link: [
-    { rel: 'icon', href: '/favicon.ico' },
-    // { rel: 'preload', as: 'video', href: homeVideo }
-  ],
-}))
+useHead({
+  title: 'DDAC'
+})
 </script>
 
 <style scoped lang="scss">

+ 3 - 8
app/pages/web/products/boost.vue

@@ -96,14 +96,9 @@
 </template>
 <script setup>
 
-useHead(() => ({
-  title: '高防服务器',
-  meta: [
-    { name: 'viewport', content: 'width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no' },
-    { name: 'description', content: '高防服务器,也能极致加速' },
-    { name: 'keywords', content: 'CDN分发|网站保护' }
-  ]
-}))
+useHead({
+  title: '高防服务器'
+})
 import SecurityServicesSuite from '~/components/products/SecurityServicesSuite.vue';
 import Defense from '~/components/products/Defense.vue';
 

+ 3 - 8
app/pages/web/products/sdk.vue

@@ -43,14 +43,9 @@ const onVideoLoaded = () => {
   }
 }
 
-useHead(() => ({
-  title: 'SDK安全加固',
-  meta: [
-    { name: 'viewport', content: 'width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no' },
-    { name: 'description', content: '一体化解决游戏安全问题' },
-    { name: 'keywords', content: '全链加密 | DDoS 防护 | 智能加速 ' }
-  ]
-}))
+useHead({
+  title: 'SDK安全加固'
+})
 </script>
 
 <style scoped lang="scss">

+ 3 - 8
app/pages/web/products/web.vue

@@ -72,14 +72,9 @@
 </template>
 <script setup>
 
-useHead(() => ({
-  title: 'WEB安全加速',
-  meta: [
-    { name: 'viewport', content: 'width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no' },
-    { name: 'description', content: '智能路由/动态优化/实时处理' },
-    { name: 'keywords', content: 'CDN分发|网站保护' }
-  ]
-}))
+useHead({
+  title: 'Web安全加速'
+})
 import icon1 from '~/assets/svg/products/web/icon.svg'
 import icon2 from '~/assets/svg/products/web/icon2.svg'
 import icon3 from '~/assets/svg/products/web/icon3.svg'

+ 15 - 1
nuxt.config.ts

@@ -7,7 +7,21 @@ export default defineNuxtConfig({
   plugins: ['~/plugins/index.js'],
   app: {
     head: {
-      meta: [{ name: 'viewport', content: 'width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no' }]
+      templateParams: {
+        separator: '-'
+      },
+      titleTemplate: '%s %separator %siteName',
+      meta: [
+        { name: 'viewport', content: 'width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no' },
+        { name: 'description', content: '盾网络 - 专注于企业级DDoS/CC防护与安全加速的网络安全服务商。提供高防服务器、高防CDN、游戏盾SDK等全方位安全防护解决方案。' },
+        { name: 'keywords', content: '高防服务器,DDoS防护,CC防护,高防CDN,游戏盾,网络安全,服务器加速' },
+        { property: 'og:site_name', content: '盾网络' },
+        { property: 'og:type', content: 'website' },
+        { name: 'twitter:card', content: 'summary_large_image' }
+      ],
+      link: [
+        { rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' }
+      ]
     }
   },
   postcss: {