{"id":8381,"date":"2021-01-16T19:31:01","date_gmt":"2021-01-16T11:31:01","guid":{"rendered":"https:\/\/sdeno.com\/?p=8381"},"modified":"2021-01-16T19:33:04","modified_gmt":"2021-01-16T11:33:04","slug":"vue%e9%92%88%e5%af%b9%e6%90%9c%e7%b4%a2%e5%bc%95%e6%93%8e%e5%81%9aseo%e4%bc%98%e5%8c%96","status":"publish","type":"post","link":"https:\/\/sdeno.com\/?p=8381","title":{"rendered":"vue\u9488\u5bf9\u641c\u7d22\u5f15\u64ce\u505aSEO\u4f18\u5316"},"content":{"rendered":"<p><strong>\u5148\u628a\u51e0\u4e2a\u65b9\u6cd5\u653e\u51fa\u6765\uff1a<\/strong><\/p>\n<p>1.SSR\u670d\u52a1\u5668\u6e32\u67d3\uff1b<br \/>\n2.\u9759\u6001\u5316\uff1b<br \/>\n3.\u9884\u6e32\u67d3prerender-spa-plugin\uff1b<br \/>\n4.\u4f7f\u7528Phantomjs\u9488\u5bf9\u722c\u866b\u505a\u5904\u7406\u3002<\/p>\n<p><strong>\u9996\u5148\u590d\u4e60\u4e00\u4e0bSEO\uff1a<\/strong><\/p>\n<p>\u641c\u7d22\u5f15\u64ce\u4f18\u5316\uff08Search engine optimization\uff0c\u7b80\u79f0SEO\uff09\uff0c\u6307\u4e3a\u4e86\u63d0\u5347\u7f51\u9875\u5728\u641c\u7d22\u5f15\u64ce\u81ea\u7136\u641c\u7d22\u7ed3\u679c\u4e2d\uff08\u975e\u5546\u4e1a\u6027\u63a8\u5e7f\u7ed3\u679c\uff09\u7684\u6536\u5f55\u6570\u91cf\u4ee5\u53ca\u6392\u5e8f\u4f4d\u7f6e\u800c\u505a\u7684\u4f18\u5316\u884c\u4e3a\uff0c\u662f\u4e3a\u4e86\u4ece\u641c\u7d22\u5f15\u64ce\u4e2d\u83b7\u5f97\u66f4\u591a\u7684\u514d\u8d39\u6d41\u91cf\uff0c\u4ee5\u53ca\u66f4\u597d\u7684\u5c55\u73b0\u5f62\u8c61\u3002<\/p>\n<p>vue\u5bf9seo\u592a\u4e0d\u53cb\u597d\u4e86\uff0c\u5355\u9875\u9762SPA\u5e94\u7528\u5c31\u662f\u5b9e\u65f6\u6e32\u67d3\u7684\uff0c\u722c\u866b\u90fd\u722c\u4e0d\u5230\uff0c\u6211\u5728\u505a\u5b8c\u4e00\u4e2avue\u5199\u7684\u5b98\u7f51\u7684\u65f6\u5019\uff0c\u8001\u677f\u7a81\u7136\u8bf4\u8981seo\uff0c\u6211\u61f5\u903c\u4e86\uff0c\u6240\u4ee5\u88ab\u8feb\u8425\u4e1a\u627e\u4e86\u4e00\u4e0b\u4f18\u5316\u65b9\u6cd5\u3002<\/p>\n<p><strong>1. SSR\uff1a<\/strong><\/p>\n<p>\u8fd9\u4e2avue\u7684\u5b98\u65b9\u6709\u4e00\u4e2a\u6587\u6863\uff08<a href=\"https:\/\/ssr.vuejs.org\/zh\/\" rel=\"nofollow\">\u5b98\u65b9\u5730\u5740<\/a>\uff09\uff0c\u4f46\u662f\u5bf9Vue\u7248\u672c\u6709\u8981\u6c42\uff0c\u5bf9\u670d\u52a1\u5668\u4e5f\u6709\u4e00\u5b9a\u8981\u6c42\uff0c\u9700\u8981\u652f\u6301nodejs\u73af\u5883\uff0c\u5176\u4ed6\u73af\u5883\u4e5f\u53ef\u4ee5\uff0c\u4ee3\u7801\u53c8\u8981\u91cd\u65b0\u5199\u4e00\u904d\u3002<\/p>\n<p><strong>\u00a0\u4f7f\u7528SSR\u6743\u8861\u4e4b\u5904\uff1a<\/strong><\/p>\n<ol>\n<li>\u5f00\u53d1\u6761\u4ef6\u6240\u9650\uff0c\u6d4f\u89c8\u5668\u7279\u5b9a\u7684\u4ee3\u7801\uff0c\u53ea\u80fd\u5728\u67d0\u4e9b\u751f\u547d\u5468\u671f\u94a9\u5b50\u51fd\u6570 (lifecycle hook) \u4e2d\u4f7f\u7528\uff1b\u4e00\u4e9b\u5916\u90e8\u6269\u5c55\u5e93 (external library) \u53ef\u80fd\u9700\u8981\u7279\u6b8a\u5904\u7406\uff0c\u624d\u80fd\u5728\u670d\u52a1\u5668\u6e32\u67d3\u5e94\u7528\u7a0b\u5e8f\u4e2d\u8fd0\u884c\uff1b<\/li>\n<li>\u73af\u5883\u548c\u90e8\u7f72\u8981\u6c42\u66f4\u9ad8\uff0c\u9700\u8981Node.js server \u8fd0\u884c\u73af\u5883\uff1b<\/li>\n<li>\u9ad8\u6d41\u91cf\u7684\u60c5\u51b5\u4e0b\uff0c\u8bf7\u51c6\u5907\u76f8\u5e94\u7684\u670d\u52a1\u5668\u8d1f\u8f7d\uff0c\u5e76\u660e\u667a\u5730\u91c7\u7528\u7f13\u5b58\u7b56\u7565\u3002<\/li>\n<\/ol>\n<p><strong>\u4f18\u52bf\uff1a<\/strong><\/p>\n<ol>\n<li>\u66f4\u597d\u7684 SEO\uff0c\u7531\u4e8e\u641c\u7d22\u5f15\u64ce\u722c\u866b\u6293\u53d6\u5de5\u5177\u53ef\u4ee5\u76f4\u63a5\u67e5\u770b\u5b8c\u5168\u6e32\u67d3\u7684\u9875\u9762\uff1b<\/li>\n<li>\u66f4\u5feb\u7684\u5185\u5bb9\u5230\u8fbe\u65f6\u95f4 (time-to-content)\uff0c\u7279\u522b\u662f\u5bf9\u4e8e\u7f13\u6162\u7684\u7f51\u7edc\u60c5\u51b5\u6216\u8fd0\u884c\u7f13\u6162\u7684\u8bbe\u5907\u3002<\/li>\n<\/ol>\n<p><strong>\u4e0d\u8db3\uff1a\uff08\u5f00\u53d1\u4e2d\u9047\u5230\u7684\u5751\uff09<\/strong><\/p>\n<p>1.\u4e00\u5957\u4ee3\u7801\u4e24\u5957\u6267\u884c\u73af\u5883\uff0c\u4f1a\u5f15\u8d77\u5404\u79cd\u95ee\u9898\uff0c\u6bd4\u5982\u670d\u52a1\u7aef\u6ca1\u6709window\u3001document\u5bf9\u8c61\uff0c\u5904\u7406\u65b9\u5f0f\u662f\u589e\u52a0\u5224\u65ad\uff0c\u5982\u679c\u662f\u5ba2\u6237\u7aef\u624d\u6267\u884c\uff1a<\/p>\n<pre class=\"hljs less\"><code class=\"language-javascript\"><span class=\"hljs-selector-tag\">if<\/span>(process.browser){\r\n   <span class=\"hljs-selector-tag\">console<\/span><span class=\"hljs-selector-class\">.log<\/span>(window);\r\n}<\/code><\/pre>\n<p>\u5f15\u7528npm\u5305\uff0c\u5e26\u6709dom\u64cd\u4f5c\u7684\uff0c\u4f8b\u5982\uff1a wowjs \uff0c\u4e0d\u80fd\u7528 import \u7684\u65b9\u5f0f\uff0c\u6539\u7528\uff1a<\/p>\n<pre class=\"hljs typescript\"><code class=\"language-javascript\"><span class=\"hljs-keyword\">if<\/span> (process.browser) {\r\n  <span class=\"hljs-keyword\">var<\/span> { WOW } = <span class=\"hljs-built_in\">require<\/span>(<span class=\"hljs-string\">'wowjs'<\/span>);\r\n  <span class=\"hljs-built_in\">require<\/span>(<span class=\"hljs-string\">'wowjs\/css\/libs\/animate.css'<\/span>);\r\n}<\/code><\/pre>\n<p>2.Nuxt asyncData\u65b9\u6cd5\uff0c\u521d\u59cb\u5316\u9875\u9762\u524d\u5148\u5f97\u5230\u6570\u636e\uff0c\u4f46\u4ec5\u9650\u4e8e \u9875\u9762\u7ec4\u4ef6 \u8c03\u7528\uff1a<\/p>\n<pre class=\"hljs kotlin\"><code class=\"language-javascript\"><span class=\"hljs-comment\">\/\/ \u5e76\u53d1\u52a0\u8f7d\u591a\u4e2a\u63a5\u53e3\uff1a<\/span>\r\n async asyncData ({ app, query }) {\r\n   let [resA, resB, resC] = await Promise.all([\r\n      app.$axios.<span class=\"hljs-keyword\">get<\/span>(<span class=\"hljs-string\">'\/api\/a'<\/span>),\r\n      app.$axios.<span class=\"hljs-keyword\">get<\/span>(<span class=\"hljs-string\">'\/api\/b'<\/span>),\r\n      app.$axios.<span class=\"hljs-keyword\">get<\/span>(<span class=\"hljs-string\">'\/api\/c'<\/span>),\r\n   ])\r\n   \r\n   <span class=\"hljs-keyword\">return<\/span> {\r\n     dataA: resA.<span class=\"hljs-keyword\">data<\/span>,\r\n     dataB: resB.<span class=\"hljs-keyword\">data<\/span>,\r\n     dataC: resC.<span class=\"hljs-keyword\">data<\/span>,\r\n   }\r\n}<\/code><\/pre>\n<p><strong>\u5728asyncData\u4e2d\u83b7\u53d6\u53c2\u6570\uff1a<\/strong><\/p>\n<p><strong>1.\u83b7\u53d6\u52a8\u6001\u8def\u7531\u53c2\u6570\uff0c\u5982\uff1a<\/strong><\/p>\n<p><code>\/list\/:id' ==&gt;\u00a0 '\/list\/123<\/code><\/p>\n<p>\u63a5\u6536\uff1a<\/p>\n<div>\n<table border=\"1\" cellspacing=\"0\" cellpadding=\"0\">\n<tbody>\n<tr>\n<td>\n<div>1<\/div>\n<div>2<\/div>\n<div>3<\/div>\n<\/td>\n<td>\n<div>\n<div><code>async asyncData ({ app, query }) {<\/code><\/div>\n<div><code>\u00a0<\/code>\u00a0<code>console.log(app.context.params.id)\u00a0<\/code><code>\/\/123<\/code><\/div>\n<div><code>}<\/code><\/div>\n<\/div>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p><strong>2.\u83b7\u53d6url?\u83b7\u53d6\u53c2\u6570\uff0c\u5982\uff1a<\/strong><\/p>\n<p><code>\/list?id=123<\/code><\/p>\n<p>\u63a5\u6536\uff1a<\/p>\n<div>\n<div>\n<div>\n<table border=\"1\" cellspacing=\"0\" cellpadding=\"0\">\n<tbody>\n<tr>\n<td>\n<div>1<\/div>\n<div>2<\/div>\n<div>3<\/div>\n<\/td>\n<td>\n<div>\n<div><code>async asyncData ({ app, query }) {<\/code><\/div>\n<div><code>\u00a0<\/code>\u00a0<code>console.log(query.id)\u00a0<\/code><code>\/\/123<\/code><\/div>\n<div><code>}<\/code><\/div>\n<\/div>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<\/div>\n<p>3.\u5982\u679c\u4f60\u4f7f\u7528 v-if \u8bed\u6cd5\uff0c\u90e8\u7f72\u5230\u7ebf\u4e0a\u5927\u6982\u4e5f\u4f1a\u9047\u5230\u8fd9\u4e2a\u9519\u8bef\uff1a<\/p>\n<blockquote><p>Error while initializing app DOMException: Failed to execute &#8216;appendChild&#8217; on &#8216;Node&#8217;: This node type does not support this method.<br \/>\nat Object.We [as appendChild]<\/p><\/blockquote>\n<p>\u6839\u636egithub nuxt\u4e0a\u7684\u00a0<a href=\"https:\/\/github.com\/nuxt\/nuxt.js\/issues\/1552\" target=\"_blank\" rel=\"nofollow noopener\">issue\u7b2c1552\u6761\u00a0<\/a>\u63d0\u793a\uff0c\u8981\u5c06 v-if \u6539\u4e3a v-show \u8bed\u6cd5\u3002<\/p>\n<p><strong>2.\u9759\u6001\u5316<\/strong><\/p>\n<p>\u5728 Nuxt.js \u6267\u884c generate \u9759\u6001\u5316\u6253\u5305\u65f6\uff0c\u52a8\u6001\u8def\u7531\u4f1a\u88ab\u5ffd\u7565\u3002<\/p>\n<div>\n<table border=\"1\" cellspacing=\"0\" cellpadding=\"0\">\n<tbody>\n<tr>\n<td>\n<div>1<\/div>\n<div>2<\/div>\n<div>3<\/div>\n<div>4<\/div>\n<\/td>\n<td>\n<div>\n<div><code>-| pages\/<\/code><\/div>\n<div><code>---| index.vue<\/code><\/div>\n<div><code>---| users\/<\/code><\/div>\n<div><code>-----| _id.vue<\/code><\/div>\n<\/div>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p>\u9700\u8981\u52a8\u6001\u8def\u7531\u5148\u751f\u6210\u9759\u6001\u9875\u9762\uff0c\u4f60\u9700\u8981\u6307\u5b9a\u52a8\u6001\u8def\u7531\u53c2\u6570\u7684\u503c\uff0c\u5e76\u914d\u7f6e\u5230 routes \u6570\u7ec4\u4e2d\u53bb\u3002<\/p>\n<div>\n<table border=\"1\" cellspacing=\"0\" cellpadding=\"0\">\n<tbody>\n<tr>\n<td>\n<div>1<\/div>\n<div>2<\/div>\n<div>3<\/div>\n<div>4<\/div>\n<div>5<\/div>\n<div>6<\/div>\n<div>7<\/div>\n<div>8<\/div>\n<div>9<\/div>\n<div>10<\/div>\n<\/td>\n<td>\n<div>\n<div><code>\/\/ nuxt.config.js<\/code><\/div>\n<div><code>module.exports = {<\/code><\/div>\n<div><code>\u00a0<\/code>\u00a0<code>generate: {<\/code><\/div>\n<div><code>\u00a0<\/code>\u00a0<code>routes: [<\/code><\/div>\n<div><code>\u00a0\u00a0<\/code>\u00a0<code>'\/users\/1'<\/code>\u00a0<code>,<\/code><\/div>\n<div><code>\u00a0\u00a0<\/code>\u00a0<code>'\/users\/2'<\/code>\u00a0<code>,<\/code><\/div>\n<div><code>\u00a0\u00a0<\/code>\u00a0<code>'\/users\/3'<\/code><\/div>\n<div><code>\u00a0<\/code>\u00a0<code>]<\/code><\/div>\n<div><code>\u00a0<\/code>\u00a0<code>}<\/code><\/div>\n<div><code>}<\/code><\/div>\n<\/div>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p>\u8fd0\u884c\u6253\u5305\uff0c\u5373\u53ef\u770b\u89c1\u6253\u5305\u51fa\u6765\u7684\u9875\u9762\u3002<\/p>\n<p>\u4f46\u662f\u5982\u679c\u8def\u7531\u52a8\u6001\u53c2\u6570\u7684\u503c\u662f\u52a8\u6001\u7684\u800c\u4e0d\u662f\u56fa\u5b9a\u7684\uff0c\u5e94\u8be5\u600e\u4e48\u505a\u5462\uff1f<\/p>\n<p>\u4f7f\u7528\u4e00\u4e2a\u8fd4\u56de Promise \u5bf9\u8c61\u7c7b\u578b \u7684 \u51fd\u6570\uff1b<br \/>\n\u4f7f\u7528\u4e00\u4e2a\u56de\u8c03\u662f callback(err, params) \u7684 \u51fd\u6570\u3002<\/p>\n<div>\n<table border=\"1\" cellspacing=\"0\" cellpadding=\"0\">\n<tbody>\n<tr>\n<td>\n<div>1<\/div>\n<div>2<\/div>\n<div>3<\/div>\n<div>4<\/div>\n<div>5<\/div>\n<div>6<\/div>\n<div>7<\/div>\n<div>8<\/div>\n<div>9<\/div>\n<div>10<\/div>\n<div>11<\/div>\n<div>12<\/div>\n<div>13<\/div>\n<div>14<\/div>\n<div>15<\/div>\n<div>16<\/div>\n<div>17<\/div>\n<div>18<\/div>\n<\/td>\n<td>\n<div>\n<div><code>\/\/ nuxt.config.js<\/code><\/div>\n<div><code>import axios from\u00a0<\/code><code>'axios'<\/code><\/div>\n<div><\/div>\n<div><code>export\u00a0<\/code><code>default<\/code>\u00a0<code>{<\/code><\/div>\n<div><code>\u00a0<\/code>\u00a0<code>generate: {<\/code><\/div>\n<div><code>\u00a0<\/code>\u00a0<code>routes:\u00a0<\/code><code>function<\/code>\u00a0<code>() {<\/code><\/div>\n<div><code>\u00a0\u00a0<\/code>\u00a0<code>return<\/code>\u00a0<code>axios.get(<\/code>\u00a0<code>'<a href=\"https:\/\/my-api\/users\" rel=\"nofollow\">https:\/\/my-api\/users<\/a>'<\/code>\u00a0<code>)<\/code><\/div>\n<div><code>\u00a0\u00a0<\/code>\u00a0<code>.then((res) =&gt; {<\/code><\/div>\n<div><code>\u00a0\u00a0<\/code>\u00a0<code>return<\/code>\u00a0<code>res.data.map((user) =&gt; {<\/code><\/div>\n<div><code>\u00a0\u00a0\u00a0<\/code>\u00a0<code>return<\/code>\u00a0<code>{<\/code><\/div>\n<div><code>\u00a0\u00a0\u00a0<\/code>\u00a0<code>route:\u00a0<\/code><code>'\/users\/'<\/code>\u00a0<code>+ user.id,<\/code><\/div>\n<div><code>\u00a0\u00a0\u00a0<\/code>\u00a0<code>payload: user<\/code><\/div>\n<div><code>\u00a0\u00a0\u00a0<\/code>\u00a0<code>}<\/code><\/div>\n<div><code>\u00a0\u00a0<\/code>\u00a0<code>})<\/code><\/div>\n<div><code>\u00a0\u00a0<\/code>\u00a0<code>})<\/code><\/div>\n<div><code>\u00a0<\/code>\u00a0<code>}<\/code><\/div>\n<div><code>\u00a0<\/code>\u00a0<code>}<\/code><\/div>\n<div><code>}<\/code><\/div>\n<\/div>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p>\u73b0\u5728\u6211\u4eec\u53ef\u4ee5\u4ece \/users\/_id.vue \u8bbf\u95ee\u7684 payload \uff0c\u5982\u4e0b\u6240\u793a\uff1a<\/p>\n<div>\n<table border=\"1\" cellspacing=\"0\" cellpadding=\"0\">\n<tbody>\n<tr>\n<td>\n<div>1<\/div>\n<div>2<\/div>\n<div>3<\/div>\n<div>4<\/div>\n<\/td>\n<td>\n<div>\n<div><code>async asyncData ({ params, error, payload }) {<\/code><\/div>\n<div><code>\u00a0<\/code>\u00a0<code>if<\/code>\u00a0<code>(payload)\u00a0<\/code><code>return<\/code>\u00a0<code>{ user: payload }<\/code><\/div>\n<div><code>\u00a0<\/code>\u00a0<code>else<\/code>\u00a0<code>return<\/code>\u00a0<code>{ user: await backend.fetchUser(params.id) }<\/code><\/div>\n<div><code>}<\/code><\/div>\n<\/div>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p>\u5982\u679c\u4f60\u7684\u52a8\u6001\u8def\u7531\u7684\u53c2\u6570\u5f88\u591a\uff0c\u4f8b\u5982\u5546\u54c1\u8be6\u60c5\uff0c\u53ef\u80fd\u9ad8\u8fbe\u51e0\u5343\u51e0\u4e07\u4e2a\u3002\u9700\u8981\u4e00\u4e2a\u63a5\u53e3\u8fd4\u56de\u6240\u6709id\uff0c\u7136\u540e\u6253\u5305\u65f6\u904d\u5386id\uff0c\u6253\u5305\u5230\u672c\u5730\uff0c\u5982\u679c\u67d0\u4e2a\u5546\u54c1\u4fee\u6539\u4e86\u6216\u8005\u4e0b\u67b6\u4e86\uff0c\u53c8\u8981\u91cd\u65b0\u6253\u5305\uff0c\u6570\u91cf\u591a\u7684\u60c5\u51b5\u4e0b\u6253\u5305\u4e5f\u662f\u975e\u5e38\u6162\u7684\uff0c\u975e\u5e38\u4e0d\u73b0\u5b9e\u3002<\/p>\n<p>\u4f18\u52bf\uff1a<\/p>\n<ul>\n<li>\u7eaf\u9759\u6001\u6587\u4ef6\uff0c\u8bbf\u95ee\u901f\u5ea6\u8d85\u5feb\uff1b<\/li>\n<li>\u5bf9\u6bd4SSR\uff0c\u4e0d\u6d89\u53ca\u5230\u670d\u52a1\u5668\u8d1f\u8f7d\u65b9\u9762\u95ee\u9898\uff1b<\/li>\n<li>\u9759\u6001\u7f51\u9875\u4e0d\u5b9c\u906d\u5230\u9ed1\u5ba2\u653b\u51fb\uff0c\u5b89\u5168\u6027\u66f4\u9ad8\u3002<\/li>\n<\/ul>\n<p>\u4e0d\u8db3\uff1a<\/p>\n<ul>\n<li>\u5982\u679c\u52a8\u6001\u8def\u7531\u53c2\u6570\u591a\u7684\u8bdd\u4e0d\u9002\u7528\u3002<\/li>\n<\/ul>\n<p><strong>3.\u9884\u6e32\u67d3prerender-spa-plugin<\/strong><\/p>\n<p>\u5982\u679c\u4f60\u53ea\u662f\u7528\u6765\u6539\u5584\u5c11\u6570\u8425\u9500\u9875\u9762\uff08\u4f8b\u5982 \/, \/about, \/contact \u7b49\uff09\u7684 SEO\uff0c\u90a3\u4e48\u4f60\u53ef\u80fd\u9700\u8981\u9884\u6e32\u67d3\u3002\u65e0\u9700\u4f7f\u7528 web \u670d\u52a1\u5668\u5b9e\u65f6\u52a8\u6001\u7f16\u8bd1 HTML\uff0c\u800c\u662f\u4f7f\u7528\u9884\u6e32\u67d3\u65b9\u5f0f\uff0c\u5728\u6784\u5efa\u65f6 (build time) \u7b80\u5355\u5730\u751f\u6210\u9488\u5bf9\u7279\u5b9a\u8def\u7531\u7684\u9759\u6001 HTML \u6587\u4ef6\u3002\u4f18\u70b9\u662f\u8bbe\u7f6e\u9884\u6e32\u67d3\u66f4\u7b80\u5355\uff0c\u5e76\u53ef\u4ee5\u5c06\u4f60\u7684\u524d\u7aef\u4f5c\u4e3a\u4e00\u4e2a\u5b8c\u5168\u9759\u6001\u7684\u7ad9\u70b9\u3002<\/p>\n<div>\n<table border=\"1\" cellspacing=\"0\" cellpadding=\"0\">\n<tbody>\n<tr>\n<td>\n<div>1<\/div>\n<\/td>\n<td>\n<div>\n<div><code>$ cnpm\u00a0<\/code><code>install<\/code>\u00a0<code>prerender-spa-plugin --save<\/code><\/div>\n<\/div>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p>vue cli 3 vue.config.js \u914d\u7f6e\uff1a<\/p>\n<div>\n<table border=\"1\" cellspacing=\"0\" cellpadding=\"0\">\n<tbody>\n<tr>\n<td>\n<div>1<\/div>\n<div>2<\/div>\n<div>3<\/div>\n<div>4<\/div>\n<div>5<\/div>\n<div>6<\/div>\n<div>7<\/div>\n<div>8<\/div>\n<div>9<\/div>\n<div>10<\/div>\n<div>11<\/div>\n<div>12<\/div>\n<div>13<\/div>\n<div>14<\/div>\n<div>15<\/div>\n<div>16<\/div>\n<div>17<\/div>\n<div>18<\/div>\n<div>19<\/div>\n<div>20<\/div>\n<div>21<\/div>\n<div>22<\/div>\n<div>23<\/div>\n<div>24<\/div>\n<div>25<\/div>\n<div>26<\/div>\n<div>27<\/div>\n<div>28<\/div>\n<div>29<\/div>\n<\/td>\n<td>\n<div>\n<div><code>const PrerenderSPAPlugin = require(<\/code>\u00a0<code>'prerender-spa-plugin'<\/code>\u00a0<code>);<\/code><\/div>\n<div><code>const Renderer = PrerenderSPAPlugin.PuppeteerRenderer;<\/code><\/div>\n<div><code>const path = require(<\/code>\u00a0<code>'path'<\/code>\u00a0<code>);<\/code><\/div>\n<div><code>module.exports = {<\/code><\/div>\n<div><code>\u00a0<\/code>\u00a0<code>configureWebpack: config =&gt; {<\/code><\/div>\n<div><code>\u00a0\u00a0<\/code>\u00a0<code>if<\/code>\u00a0<code>(process.env.NODE_ENV !==\u00a0<\/code><code>'production'<\/code>\u00a0<code>)\u00a0<\/code><code>return<\/code>\u00a0<code>;<\/code><\/div>\n<div><code>\u00a0\u00a0<\/code>\u00a0<code>return<\/code>\u00a0<code>{<\/code><\/div>\n<div><code>\u00a0\u00a0\u00a0<\/code>\u00a0<code>plugins: [<\/code><\/div>\n<div><code>\u00a0\u00a0\u00a0\u00a0<\/code>\u00a0<code>new<\/code>\u00a0<code>PrerenderSPAPlugin({<\/code><\/div>\n<div><code>\u00a0\u00a0\u00a0\u00a0\u00a0<\/code>\u00a0<code>\/\/ \u751f\u6210\u6587\u4ef6\u7684\u8def\u5f84\uff0c\u4e5f\u53ef\u4ee5\u4e0ewebpakc\u6253\u5305\u7684\u4e00\u81f4\u3002<\/code><\/div>\n<div><code>\u00a0\u00a0\u00a0\u00a0\u00a0<\/code>\u00a0<code>\/\/ \u4e0b\u9762\u8fd9\u53e5\u8bdd\u975e\u5e38\u91cd\u8981\uff01\uff01\uff01<\/code><\/div>\n<div><code>\u00a0\u00a0\u00a0\u00a0\u00a0<\/code>\u00a0<code>\/\/ \u8fd9\u4e2a\u76ee\u5f55\u53ea\u80fd\u6709\u4e00\u7ea7\uff0c\u5982\u679c\u76ee\u5f55\u5c42\u6b21\u5927\u4e8e\u4e00\u7ea7\uff0c\u5728\u751f\u6210\u7684\u65f6\u5019\u4e0d\u4f1a\u6709\u4efb\u4f55\u9519\u8bef\u63d0\u793a\uff0c\u5728\u9884\u6e32\u67d3\u7684\u65f6\u5019\u53ea\u4f1a\u5361\u7740\u4e0d\u52a8\u3002<\/code><\/div>\n<div><code>\u00a0\u00a0\u00a0\u00a0\u00a0<\/code>\u00a0<code>staticDir: path.join(__dirname,<\/code>\u00a0<code>'dist'<\/code>\u00a0<code>),<\/code><\/div>\n<div><code>\u00a0\u00a0\u00a0\u00a0\u00a0<\/code>\u00a0<code>\/\/ \u5bf9\u5e94\u81ea\u5df1\u7684\u8def\u7531\u6587\u4ef6\uff0c\u6bd4\u5982a\u6709\u53c2\u6570\uff0c\u5c31\u9700\u8981\u5199\u6210 \/a\/param1\u3002<\/code><\/div>\n<div><code>\u00a0\u00a0\u00a0\u00a0\u00a0<\/code>\u00a0<code>routes: [<\/code>\u00a0<code>'\/'<\/code>\u00a0<code>,\u00a0<\/code><code>'\/product'<\/code>\u00a0<code>,<\/code>\u00a0<code>'\/about'<\/code>\u00a0<code>],<\/code><\/div>\n<div><code>\u00a0\u00a0\u00a0\u00a0\u00a0<\/code>\u00a0<code>\/\/ \u8fd9\u4e2a\u5f88\u91cd\u8981\uff0c\u5982\u679c\u6ca1\u6709\u914d\u7f6e\u8fd9\u6bb5\uff0c\u4e5f\u4e0d\u4f1a\u8fdb\u884c\u9884\u7f16\u8bd1<\/code><\/div>\n<div><code>\u00a0\u00a0\u00a0\u00a0\u00a0<\/code>\u00a0<code>renderer:\u00a0<\/code><code>new<\/code>\u00a0<code>Renderer({<\/code><\/div>\n<div><code>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/code>\u00a0<code>inject: {<\/code><\/div>\n<div><code>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/code>\u00a0<code>foo:\u00a0<\/code><code>'bar'<\/code><\/div>\n<div><code>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/code>\u00a0<code>},<\/code><\/div>\n<div><code>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/code>\u00a0<code>headless:\u00a0<\/code><code>false<\/code>\u00a0<code>,<\/code><\/div>\n<div><code>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/code>\u00a0<code>\/\/ \u5728 main.js \u4e2d document.dispatchEvent(new Event('render-event'))\uff0c\u4e24\u8005\u7684\u4e8b\u4ef6\u540d\u79f0\u8981\u5bf9\u5e94\u4e0a\u3002<\/code><\/div>\n<div><code>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/code>\u00a0<code>renderAfterDocumentEvent:\u00a0<\/code><code>'render-event'<\/code><\/div>\n<div><code>\u00a0\u00a0\u00a0\u00a0\u00a0<\/code>\u00a0<code>})<\/code><\/div>\n<div><code>\u00a0\u00a0\u00a0\u00a0<\/code>\u00a0<code>}),<\/code><\/div>\n<div><code>\u00a0\u00a0\u00a0<\/code>\u00a0<code>],<\/code><\/div>\n<div><code>\u00a0\u00a0<\/code>\u00a0<code>};<\/code><\/div>\n<div><code>\u00a0<\/code>\u00a0<code>}<\/code><\/div>\n<div><code>}<\/code><\/div>\n<\/div>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p>\u5728main.js\u4e2d\u6dfb\u52a0\uff1a<\/p>\n<div>\n<table border=\"1\" cellspacing=\"0\" cellpadding=\"0\">\n<tbody>\n<tr>\n<td>\n<div>1<\/div>\n<div>2<\/div>\n<div>3<\/div>\n<div>4<\/div>\n<div>5<\/div>\n<div>6<\/div>\n<div>7<\/div>\n<\/td>\n<td>\n<div>\n<div><code>new<\/code>\u00a0<code>Vue({<\/code><\/div>\n<div><code>\u00a0<\/code>\u00a0<code>router,<\/code><\/div>\n<div><code>\u00a0<\/code>\u00a0<code>render: h =&gt; h(App),<\/code><\/div>\n<div><code>\u00a0<\/code>\u00a0<code>mounted () {<\/code><\/div>\n<div><code>\u00a0<\/code>\u00a0<code>document.dispatchEvent(<\/code>\u00a0<code>new<\/code>\u00a0<code>Event(<\/code>\u00a0<code>'render-event'<\/code>\u00a0<code>))<\/code><\/div>\n<div><code>\u00a0<\/code>\u00a0<code>}<\/code><\/div>\n<div><code>}).$mount(<\/code>\u00a0<code>'#app'<\/code>\u00a0<code>)<\/code><\/div>\n<\/div>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p>\u6ce8\u610f\uff1arouter\u4e2d\u5fc5\u987b\u8bbe\u7f6e mode: \u201chistory\u201d \u3002<\/p>\n<p>\u6253\u5305\u51fa\u6765\u53ef\u4ee5\u770b\u89c1\u6587\u4ef6\uff0c\u6253\u5305\u51fa\u6587\u4ef6\u5939 \/index.html \uff0c\u4f8b\u5982\uff1a about =&gt; about\/index.html \uff0c\u91cc\u9762\u6709html\u5185\u5bb9\u3002<\/p>\n<p>\u4f18\u52bf\uff1a<\/p>\n<ul>\n<li>\u6539\u52a8\u5c0f\uff0c\u5f15\u5165\u4e2a\u63d2\u4ef6\u5c31\u5b8c\u4e8b\uff1b<\/li>\n<\/ul>\n<p>\u4e0d\u8db3\uff1a<\/p>\n<ul>\n<li>\u65e0\u6cd5\u4f7f\u7528\u52a8\u6001\u8def\u7531\uff1b<\/li>\n<li>\u53ea\u9002\u7528\u5c11\u91cf\u9875\u9762\u7684\u9879\u76ee\uff0c\u9875\u9762\u591a\u8fbe\u51e0\u767e\u4e2a\u7684\u60c5\u51b5\u4e0b\uff0c\u6253\u5305\u4f1a\u5f88\u5f88\u5f88\u6162\uff1b<\/li>\n<\/ul>\n<p><strong>4.\u4f7f\u7528Phantomjs\u9488\u5bf9\u722c\u866b\u505a\u5904\u7406<\/strong><\/p>\n<p>Phantomjs\u662f\u4e00\u4e2a\u57fa\u4e8ewebkit\u5185\u6838\u7684\u65e0\u5934\u6d4f\u89c8\u5668\uff0c\u5373\u6ca1\u6709UI\u754c\u9762\uff0c\u5373\u5b83\u5c31\u662f\u4e00\u4e2a\u6d4f\u89c8\u5668\uff0c\u53ea\u662f\u5176\u5185\u7684\u70b9\u51fb\u3001\u7ffb\u9875\u7b49\u4eba\u4e3a\u76f8\u5173\u64cd\u4f5c\u9700\u8981\u7a0b\u5e8f\u8bbe\u8ba1\u5b9e\u73b0\u3002<\/p>\n<p>\u867d\u7136\u201cPhantomJS\u5ba3\u5e03\u7ec8\u6b62\u5f00\u53d1\u201d\uff0c\u4f46\u662f\u5df2\u7ecf\u6ee1\u8db3\u5bf9Vue\u7684SEO\u5904\u7406\u3002<\/p>\n<p>\u8fd9\u79cd\u89e3\u51b3\u65b9\u6848\u5176\u5b9e\u662f\u4e00\u79cd\u65c1\u8def\u673a\u5236\uff0c\u539f\u7406\u5c31\u662f\u901a\u8fc7Nginx\u914d\u7f6e\uff0c \u5224\u65ad\u8bbf\u95ee\u7684\u6765\u6e90UA\u662f\u5426\u662f\u722c\u866b\u8bbf\u95ee\uff0c\u5982\u679c\u662f\u5219\u5c06\u641c\u7d22\u5f15\u64ce\u7684\u722c\u866b\u8bf7\u6c42\u8f6c\u53d1\u5230\u4e00\u4e2anode server\uff0c\u518d\u901a\u8fc7PhantomJS\u6765\u89e3\u6790\u5b8c\u6574\u7684HTML\uff0c\u8fd4\u56de\u7ed9\u722c\u866b\u3002<\/p>\n<figure class=\"mdx-lazyload-container\" style=\"max-width:739px\"><div style=\"padding-top:108.25439783491%\"><\/div><div class=\"mdx-img-loading-sp mdui-valign\"><div><div class=\"mdui-spinner\"><\/div><\/div><\/div><img width=\"739\" height=\"800\" class=\"alignnone size-full wp-image-8384 lazyload\" title=\"vue\u9488\u5bf9\u641c\u7d22\u5f15\u64ce\u505aSEO\u4f18\u5316\" src=\"data:image\/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==\" data-src=\"https:\/\/sdeno.com\/wp-content\/uploads\/2021\/01\/up-5f01a7a074a7a8c550b856d2a1b6079ad9d.jpg\" alt=\"https:\/\/sdeno.com\/wp-content\/uploads\/2021\/01\/up-5f01a7a074a7a8c550b856d2a1b6079ad9d.jpg\" data-srcset=\"https:\/\/sdeno.com\/wp-content\/uploads\/2021\/01\/up-5f01a7a074a7a8c550b856d2a1b6079ad9d.jpg 739w, https:\/\/sdeno.com\/wp-content\/uploads\/2021\/01\/up-5f01a7a074a7a8c550b856d2a1b6079ad9d-277x300.jpg 277w\" sizes=\"auto, (max-width: 739px) 100vw, 739px\"><\/figure>\n<p>\u5177\u4f53\u4ee3\u7801\u6233\u8fd9\u91cc\uff1a\u00a0<a href=\"https:\/\/github.com\/lengziyu\/vue-seo-phantomjs\" target=\"_blank\" rel=\"nofollow noopener\">vue-seo-phantomjs\u00a0<\/a>\u3002<\/p>\n<p>\u8981\u5b89\u88c5\u5168\u5c40 phantomjs \uff0c\u5c40\u90e8 express \uff0c\u6d4b\u8bd5\uff1a<\/p>\n<div>\n<table border=\"1\" cellspacing=\"0\" cellpadding=\"0\">\n<tbody>\n<tr>\n<td>\n<div>1<\/div>\n<\/td>\n<td>\n<div>\n<div><code>$ phantomjs spider.js\u00a0<\/code><code>'<a href=\"https:\/\/www.baidu.com\/\" rel=\"nofollow\">https:\/\/www.baidu.com<\/a>'<\/code><\/div>\n<\/div>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p>\u5982\u679c\u89c1\u5230\u5728\u547d\u4ee4\u884c\u91cc\u51fa\u73b0\u4e86\u4e00\u63a8html\uff0c\u90a3\u606d\u559c\u4f60\uff0c\u4f60\u5df2\u7ecf\u5f81\u670dPhantomJS\u5566\u3002<\/p>\n<p>\u542f\u52a8\u4e4b\u540e\u6216\u8005\u7528postman\u5728\u8bf7\u6c42\u5934\u589e\u52a0 User-Agent \u503c\u4e3a Baiduspider \uff0c\u6548\u679c\u4e00\u6837\u7684\u3002<\/p>\n<p><strong>\u90e8\u7f72\u4e0a\u7ebf<\/strong><\/p>\n<p>\u7ebf\u4e0a\u8981\u5b89\u88c5<code>\u00a0node\u00a0<\/code>\u3001<code>\u00a0pm2\u00a0<\/code>\u3001\u00a0<code>phantomjs<\/code>\u00a0\uff0cnginx\u76f8\u5173\u914d\u7f6e\uff1a<\/p>\n<div>\n<table border=\"1\" cellspacing=\"0\" cellpadding=\"0\">\n<tbody>\n<tr>\n<td>\n<div>1<\/div>\n<div>2<\/div>\n<div>3<\/div>\n<div>4<\/div>\n<div>5<\/div>\n<div>6<\/div>\n<div>7<\/div>\n<div>8<\/div>\n<div>9<\/div>\n<div>10<\/div>\n<div>11<\/div>\n<div>12<\/div>\n<div>13<\/div>\n<div>14<\/div>\n<div>15<\/div>\n<div>16<\/div>\n<div>17<\/div>\n<div>18<\/div>\n<\/td>\n<td>\n<div>\n<div><code>upstream spider_server {<\/code><\/div>\n<div><code>\u00a0<\/code>\u00a0<code>server localhost:3000;<\/code><\/div>\n<div><code>}<\/code><\/div>\n<div><\/div>\n<div><code>server {<\/code><\/div>\n<div><code>\u00a0<\/code>\u00a0<code>listen\u00a0 80;<\/code><\/div>\n<div><code>\u00a0<\/code>\u00a0<code>server_name example.com;<\/code><\/div>\n<div><code>\u00a0<\/code><\/div>\n<div><code>\u00a0<\/code>\u00a0<code>location \/ {<\/code><\/div>\n<div><code>\u00a0\u00a0<\/code>\u00a0<code>proxy_set_header Host\u00a0\u00a0 $host:$proxy_port;<\/code><\/div>\n<div><code>\u00a0\u00a0<\/code>\u00a0<code>proxy_set_header X-Real-IP\u00a0 $remote_addr;<\/code><\/div>\n<div><code>\u00a0\u00a0<\/code>\u00a0<code>proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;<\/code><\/div>\n<div><\/div>\n<div><code>\u00a0\u00a0<\/code>\u00a0<code>if<\/code>\u00a0<code>($http_user_agent ~*\u00a0<\/code><code>\"Baiduspider|twitterbot|facebookexternalhit|rogerbot|linkedinbot|embedly|quora link preview|showyoubot|outbrain|pinterest|slackbot|vkShare|W3C_Validator|bingbot|Sosospider|Sogou Pic Spider|Googlebot|360Spider\"<\/code>\u00a0<code>) {<\/code><\/div>\n<div><code>\u00a0\u00a0<\/code>\u00a0<code>proxy_pass http:<\/code>\u00a0<code>\/\/spider_server<\/code>\u00a0<code>;<\/code><\/div>\n<div><code>\u00a0\u00a0<\/code>\u00a0<code>}<\/code><\/div>\n<div><code>\u00a0<\/code>\u00a0<code>}<\/code><\/div>\n<div><code>}<\/code><\/div>\n<\/div>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p>\u4f18\u52bf\uff1a<\/p>\n<ul>\n<li>\u5b8c\u5168\u4e0d\u7528\u6539\u52a8\u9879\u76ee\u4ee3\u7801\uff0c\u6309\u539f\u672c\u7684SPA\u5f00\u53d1\u5373\u53ef\uff0c\u5bf9\u6bd4\u5f00\u53d1SSR\u6210\u672c\u5c0f\u4e0d\u8981\u592a\u591a\uff1b<\/li>\n<li>\u5bf9\u5df2\u7528SPA\u5f00\u53d1\u5b8c\u6210\u7684\u9879\u76ee\uff0c\u8fd9\u662f\u4e0d\u4e8c\u4e4b\u9009\u3002<\/li>\n<\/ul>\n<p>\u4e0d\u8db3\uff1a<\/p>\n<ul>\n<li>\u90e8\u7f72\u9700\u8981node\u670d\u52a1\u5668\u652f\u6301\uff1b<\/li>\n<li>\u722c\u866b\u8bbf\u95ee\u6bd4\u7f51\u9875\u8bbf\u95ee\u8981\u6162\u4e00\u4e9b\uff0c\u56e0\u4e3a\u5b9a\u65f6\u8981\u5b9a\u65f6\u8d44\u6e90\u52a0\u8f7d\u5b8c\u6210\u624d\u8fd4\u56de\u7ed9\u722c\u866b\uff1b<\/li>\n<li>\u5982\u679c\u88ab\u6076\u610f\u6a21\u62df\u767e\u5ea6\u722c\u866b\u5927\u91cf\u5faa\u73af\u722c\u53d6\uff0c\u4f1a\u9020\u6210\u670d\u52a1\u5668\u8d1f\u8f7d\u65b9\u9762\u95ee\u9898\uff0c\u89e3\u51b3\u65b9\u6cd5\u662f\u5224\u65ad\u8bbf\u95ee\u7684IP\uff0c\u662f\u5426\u662f\u767e\u5ea6\u5b98\u65b9\u722c\u866b\u7684IP\u3002<\/li>\n<\/ul>\n<p><strong>\u603b\u7ed3<\/strong><\/p>\n<p>\u5982\u679c\u6784\u5efa\u5927\u578b\u7f51\u7ad9\uff0c\u5982\u5546\u57ce\u7c7b\uff0c\u522b\u72b9\u8c6b\uff0c\u76f4\u63a5\u4e0aSSR\u670d\u52a1\u5668\u6e32\u67d3\uff0c\u5f53\u7136\u4e5f\u6709\u76f8\u5e94\u7684\u5751\u7b49\u4f60\uff0c\u793e\u533a\u8f83\u6210\u719f\uff0c\u82f1\u6587\u597d\u70b9\uff0c\u4e00\u5207\u95ee\u9898\u90fd\u8fce\u5203\u800c\u89e3\u3002<\/p>\n<p>\u5982\u679c\u53ea\u662f\u4e2a\u4eba\u535a\u5ba2\u3001\u516c\u53f8\u5b98\u7f51\u8fd9\u7c7b\uff0c\u5176\u4f59\u4e09\u79cd\u90fd\u53ef\u4ee5\u3002<\/p>\n<p>\u5982\u679c\u5bf9\u5df2\u7528SPA\u5f00\u53d1\u5b8c\u6210\u7684\u9879\u76ee\u8fdb\u884cSEO\u4f18\u5316\uff0c\u800c\u4e14\u652f\u6301node\u670d\u52a1\u5668\uff0c\u8bf7\u4f7f\u7528 Phantomjs \u3002<\/p>\n<p><a href=\"https:\/\/my.oschina.net\/liulunsheng\/blog\/3160302\" target=\"_blank\" rel=\"noopener\">https:\/\/my.oschina.net\/liulunsheng\/blog\/3160302<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5148\u628a\u51e0\u4e2a\u65b9\u6cd5\u653e\u51fa\u6765\uff1a 1.SSR\u670d\u52a1\u5668\u6e32\u67d3\uff1b 2.\u9759\u6001\u5316\uff1b 3.\u9884\u6e32\u67d3prerender-spa-plugin [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[51],"tags":[],"class_list":["post-8381","post","type-post","status-publish","format-standard","hentry","category-vue-element-admin"],"_links":{"self":[{"href":"https:\/\/sdeno.com\/index.php?rest_route=\/wp\/v2\/posts\/8381","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/sdeno.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/sdeno.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/sdeno.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/sdeno.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=8381"}],"version-history":[{"count":0,"href":"https:\/\/sdeno.com\/index.php?rest_route=\/wp\/v2\/posts\/8381\/revisions"}],"wp:attachment":[{"href":"https:\/\/sdeno.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=8381"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/sdeno.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=8381"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/sdeno.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=8381"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}