瀏覽代碼

meta test

wenliming 3 年之前
父節點
當前提交
0b4c821ba6
共有 2 個文件被更改,包括 597 次插入24 次删除
  1. 26 7
      components/Tutorial.vue
  2. 571 17
      yarn.lock

+ 26 - 7
components/Tutorial.vue

@@ -112,7 +112,9 @@ export default {
   data() {
     return {
       title: 'Hello World!',
-      name:this.$route.query.name
+      name:this.$route.query.name,
+      image:this.$route.query.image,
+			twitterTitle:this.$route.query.title,
     }
   },
   head() {
@@ -120,16 +122,33 @@ export default {
       title: this.title,
       meta: [
         {
-          hid: 'description',
-          name: this.name,
-          content: 'My custom description'
-        }
+          name: 'twitter:card',
+          content: 'summary_large_image'
+        },
+				{
+					name: 'twitter:url',
+					content: 'https://piaoquantv.yishihui.com'
+				},
+				{
+					name: 'twitter:title',
+					content: this.twitterTitle
+				},
+				{
+					name: 'twitter:image',
+					content: 'https://i.ytimg.com/vi/7LpAYFsI6yE/'+ this.image +'.jpg'
+				},
+				{
+					name: 'twitter:image:width',
+					content: '1280'
+				},
+        {
+					name: 'twitter:image:height',
+					content: '720'
+				},
       ]
     }
   },
   created(){
-    
-
     console.log(this.$route.query.name)
   }
 }

文件差異過大導致無法顯示
+ 571 - 17
yarn.lock


部分文件因文件數量過多而無法顯示