소스 검색

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


이 변경점에서 너무 많은 파일들이 변경되어 몇몇 파일들은 표시되지 않았습니다.