xml解析
This commit is contained in:
		| @ -1,7 +1,6 @@ | |||||||
| const pkg = require('./package') | const pkg = require('./package') | ||||||
|  |  | ||||||
| const DevBaseUrl = 'http://127.0.0.1:65534' | const DevBaseUrl = 'http://127.0.0.1:65534' | ||||||
| // const DevBaseUrl = 'https://api.wyr.me' |  | ||||||
| const ProdBashUrl = 'https://api.wyr.me' | const ProdBashUrl = 'https://api.wyr.me' | ||||||
|  |  | ||||||
| module.exports = { | module.exports = { | ||||||
|  | |||||||
| @ -10,7 +10,7 @@ | |||||||
|           |   {{ articels.post_date }} |           |   {{ articels.post_date }} | ||||||
|         li |         li | ||||||
|           Icon(:icon="['far', 'bookmark']") |           Icon(:icon="['far', 'bookmark']") | ||||||
|           nuxt-link(v-for='(relationships, index) in articels.term_relationships', :key='index', v-if='relationships.term_taxonomy', :to="'/' + relationships.term_taxonomy.term.slug") |           nuxt-link(v-for='(relationships, index) in articels.term_relationships', :key='index', v-if='relationships.term_taxonomy && relationships.term_taxonomy.term && relationships.term_taxonomy.taxonomy.category === "category"', :to="'/' + relationships.term_taxonomy.term.slug") | ||||||
|             span |             span | ||||||
|               |   {{ relationships.term_taxonomy.term.name }} |               |   {{ relationships.term_taxonomy.term.name }} | ||||||
|         li(v-if='articels.postmetum.meta_value !== 0') |         li(v-if='articels.postmetum.meta_value !== 0') | ||||||
| @ -585,8 +585,26 @@ export default { | |||||||
|     } |     } | ||||||
|   }, |   }, | ||||||
|   head () { |   head () { | ||||||
|  |     const keywords = [] | ||||||
|  |     for (let i = 0; i < this.articels.term_relationships.length; i++) { | ||||||
|  |       if (this.articels.term_relationships[i].term_taxonomy && this.articels.term_relationships[i].term_taxonomy.term && this.articels.term_relationships[i].term_taxonomy.taxonomy.category === 'category') { | ||||||
|  |         keywords.push(this.articels.term_relationships[i].term_taxonomy.term.name) | ||||||
|  |       } | ||||||
|  |     } | ||||||
|     return { |     return { | ||||||
|       title: `${this.articels.post_title} - 轶哥` |       title: `${this.articels.post_title} - 轶哥`, | ||||||
|  |       meta: [ | ||||||
|  |         { | ||||||
|  |           hid: 'description', | ||||||
|  |           name: 'description', | ||||||
|  |           content: this.articels.post_excerpt | ||||||
|  |         }, | ||||||
|  |         { | ||||||
|  |           hid: 'keywords', | ||||||
|  |           name: 'keywords', | ||||||
|  |           content: '轶哥,王轶,全栈,程序员,技术博客' | ||||||
|  |         } | ||||||
|  |       ] | ||||||
|     } |     } | ||||||
|   } |   } | ||||||
| } | } | ||||||
|  | |||||||
		Reference in New Issue
	
	Block a user