{"id":1402,"date":"2024-06-02T22:50:41","date_gmt":"2024-06-02T22:50:41","guid":{"rendered":""},"modified":"2024-06-05T06:12:19","modified_gmt":"2024-06-04T22:12:19","slug":"vuepress-%e5%8d%9a%e5%ae%a2%e4%bc%98%e5%8c%96%e4%b9%8b%e6%b7%bb%e5%8a%a0%e6%95%b0%e6%8d%ae%e7%bb%9f%e8%ae%a1%e5%8a%9f%e8%83%bd","status":"publish","type":"post","link":"https:\/\/www.lccc.top\/?p=1402","title":{"rendered":"VuePress \u535a\u5ba2\u4f18\u5316\u4e4b\u6dfb\u52a0\u6570\u636e\u7edf\u8ba1\u529f\u80fd"},"content":{"rendered":"<td class=\"d-block comment-body markdown-body  js-comment-body\">\n<h2 dir=\"auto\">\u524d\u8a00<\/h2>\n<p dir=\"auto\">\u5728 <a href=\"https:\/\/github.com\/mqyqingfeng\/Blog\/issues\/235\" data-hovercard-type=\"issue\" data-hovercard-url=\"\/mqyqingfeng\/Blog\/issues\/235\/hovercard\">\u300a\u4e00\u7bc7\u5e26\u4f60\u7528 VuePress + Github Pages \u642d\u5efa\u535a\u5ba2\u300b<\/a>\u4e2d\uff0c\u6211\u4eec\u4f7f\u7528 VuePress \u642d\u5efa\u4e86\u4e00\u4e2a\u535a\u5ba2\uff0c\u6700\u7ec8\u7684\u6548\u679c\u70b9\u51fb\u67e5\u770b\uff1a<a href=\"http:\/\/ts.yayujs.com\/\" rel=\"nofollow\">TypeScript4 \u4e2d\u6587\u6587\u6863<\/a>\u3002\u4eca\u5929\u6211\u4eec\u7ed9\u535a\u5ba2\u6dfb\u52a0\u6570\u636e\u7edf\u8ba1\u529f\u80fd\u3002<\/p>\n<h2 dir=\"auto\">1. \u767e\u5ea6\u7edf\u8ba1<\/h2>\n<h3 dir=\"auto\">1.1 \u521b\u5efa\u7ad9\u70b9<\/h3>\n<h4 dir=\"auto\">1.1.1 \u767b\u9646\u7ad9\u70b9<\/h4>\n<p dir=\"auto\">\u767b\u9646\u767e\u5ea6\u7edf\u8ba1\u540e\u53f0\uff1a<a href=\"https:\/\/tongji.baidu.com\/web\/welcome\/login\" rel=\"nofollow\">https:\/\/tongji.baidu.com\/web\/welcome\/login<\/a><\/p>\n<h4 dir=\"auto\">1.1.2 \u65b0\u589e\u7f51\u7ad9<\/h4>\n<p dir=\"auto\">\u5728 \u300c\u7ba1\u7406\u300d- \u300c\u7f51\u7ad9\u5217\u8868\u300d\u4e2d\uff0c\u70b9\u51fb\u300c\u65b0\u589e\u7f51\u7ad9\u300d\uff1a<\/p>\n<p dir=\"auto\"><a target=\"_blank\" rel=\"noopener noreferrer nofollow\" href=\"\/\/www.lccc.top\/wp-content\/uploads\/pic\/mqyqingfen\/1f6efec5077a8144ce1e54d26c70f318c3d9fdff.jpg\"><img decoding=\"async\" src=\"\/\/www.lccc.top\/wp-content\/uploads\/pic\/mqyqingfen\/1f6efec5077a8144ce1e54d26c70f318c3d9fdff.jpg\" alt=\"\" data-canonical-src=\"https:\/\/p3-juejin.byteimg.com\/tos-cn-i-k3u1fbpfcp\/8500ba9be11544c7a2741502de90cc83~tplv-k3u1fbpfcp-zoom-1.image\" style=\"max-width: 100%;\"><\/a><\/p>\n<h4 dir=\"auto\">1.1.3  \u586b\u5199\u4fe1\u606f<\/h4>\n<p dir=\"auto\">\u6dfb\u52a0\u7f51\u7ad9\u57df\u540d\u3001\u7f51\u7ad9\u9996\u9875\u7b49\u4fe1\u606f\uff1a<\/p>\n<p dir=\"auto\"><a target=\"_blank\" rel=\"noopener noreferrer nofollow\" href=\"\/\/www.lccc.top\/wp-content\/uploads\/pic\/mqyqingfen\/8cf475728d4f5e91bb2742a6c9717ac8f584d14d.jpg\"><img decoding=\"async\" src=\"\/\/www.lccc.top\/wp-content\/uploads\/pic\/mqyqingfen\/8cf475728d4f5e91bb2742a6c9717ac8f584d14d.jpg\" alt=\"\" data-canonical-src=\"https:\/\/p3-juejin.byteimg.com\/tos-cn-i-k3u1fbpfcp\/851b1e42e0984467ab0f7f57f2d0cb0c~tplv-k3u1fbpfcp-zoom-1.image\" style=\"max-width: 100%;\"><\/a><\/p>\n<h4 dir=\"auto\">1.1.4 \u83b7\u53d6\u4ee3\u7801<\/h4>\n<p dir=\"auto\">\u6dfb\u52a0\u5b8c\u540e\uff0c\u4f1a\u81ea\u52a8\u8df3\u8f6c\u5230\u4ee3\u7801\u83b7\u53d6\u9875\u9762\uff0c\u6211\u4eec\u53ef\u4ee5\u770b\u5230\u6839\u636e\u6211\u4eec\u586b\u5199\u7684\u7ad9\u70b9\u4fe1\u606f\u751f\u6210\u7684\u76d1\u63a7\u4ee3\u7801\uff0c\u6ce8\u610f\u8fd9\u6bb5\u4ee3\u7801\u662f\u6709\u7279\u6b8a\u6807\u793a\u7684\uff0c\u4f60\u9700\u8981\u6839\u636e\u81ea\u5df1\u7684\u7ad9\u70b9\u4fe1\u606f\u751f\u6210\u5e76\u4f7f\u7528\uff1a<\/p>\n<p dir=\"auto\"><a target=\"_blank\" rel=\"noopener noreferrer nofollow\" href=\"\/\/www.lccc.top\/wp-content\/uploads\/pic\/mqyqingfen\/2d8e63bc02da66b4552642bbade7f935cee0ff5f.jpg\"><img decoding=\"async\" src=\"\/\/www.lccc.top\/wp-content\/uploads\/pic\/mqyqingfen\/2d8e63bc02da66b4552642bbade7f935cee0ff5f.jpg\" alt=\"\" data-canonical-src=\"https:\/\/p3-juejin.byteimg.com\/tos-cn-i-k3u1fbpfcp\/8f1c1bb57c054ae999471a26b3a32d2c~tplv-k3u1fbpfcp-zoom-1.image\" style=\"max-width: 100%;\"><\/a><\/p>\n<h3 dir=\"auto\">1.2 \u5f15\u5165\u4ee3\u7801<\/h3>\n<p dir=\"auto\">\u6211\u4eec\u5728 <code class=\"notranslate\">config.js<\/code> \u91cc\u5199\u5165\u751f\u6210\u7684\u4ee3\u7801\uff1a<\/p>\n<div class=\"highlight highlight-source-js notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"module.exports = {\n    head: [\n      [\n        'script', {}, `\n        var _hmt = _hmt || [];\n        (function() {\n          var hm = document.createElement(&quot;script&quot;);\n          hm.src = &quot;https:\/\/hm.baidu.com\/hm.js?xxxxxxxxxxxxxxxxxxx&quot;;\n          var s = document.getElementsByTagName(&quot;script&quot;)[0]; \n          s.parentNode.insertBefore(hm, s);\n        })();\n        &lt;\/script&gt;        \n        `\n      ]\n    ]\n}\"><\/p>\n<pre class=\"notranslate\"><span class=\"pl-smi\">module<\/span><span class=\"pl-kos\">.<\/span><span class=\"pl-c1\">exports<\/span> <span class=\"pl-c1\">=<\/span> <span class=\"pl-kos\">{<\/span>\n    <span class=\"pl-c1\">head<\/span>: <span class=\"pl-kos\">[<\/span>\n      <span class=\"pl-kos\">[<\/span>\n        <span class=\"pl-s\">'script'<\/span><span class=\"pl-kos\">,<\/span> <span class=\"pl-kos\">{<\/span><span class=\"pl-kos\">}<\/span><span class=\"pl-kos\">,<\/span> <span class=\"pl-s\">`<\/span>\n<span class=\"pl-s\">        var _hmt = _hmt || [];<\/span>\n<span class=\"pl-s\">        (function() {<\/span>\n<span class=\"pl-s\">          var hm = document.createElement(\"script\");<\/span>\n<span class=\"pl-s\">          hm.src = \"https:\/\/hm.baidu.com\/hm.js?xxxxxxxxxxxxxxxxxxx\";<\/span>\n<span class=\"pl-s\">          var s = document.getElementsByTagName(\"script\")[0]; <\/span>\n<span class=\"pl-s\">          s.parentNode.insertBefore(hm, s);<\/span>\n<span class=\"pl-s\">        })();<\/span>\n<span class=\"pl-s\">        &lt;\/script&gt;        <\/span>\n<span class=\"pl-s\">        `<\/span>\n      <span class=\"pl-kos\">]<\/span>\n    <span class=\"pl-kos\">]<\/span>\n<span class=\"pl-kos\">}<\/span><\/pre>\n<\/div>\n<h3 dir=\"auto\">1.3 \u9a8c\u8bc1<\/h3>\n<h4 dir=\"auto\">1.3.1 \u672c\u5730\u9a8c\u8bc1<\/h4>\n<p dir=\"auto\">\u6211\u4eec\u672c\u5730\u8fd0\u884c\uff0c\u5237\u65b0\u9875\u9762\uff0c\u7136\u540e\u67e5\u770b\u9875\u9762\u8bf7\u6c42\uff1a<\/p>\n<p dir=\"auto\"><a target=\"_blank\" rel=\"noopener noreferrer nofollow\" href=\"\/\/www.lccc.top\/wp-content\/uploads\/pic\/mqyqingfen\/93c22c0289d91f95e9bd15429232bc0ee48ad1a2.jpg\"><img decoding=\"async\" src=\"\/\/www.lccc.top\/wp-content\/uploads\/pic\/mqyqingfen\/93c22c0289d91f95e9bd15429232bc0ee48ad1a2.jpg\" alt=\"\" data-canonical-src=\"https:\/\/p3-juejin.byteimg.com\/tos-cn-i-k3u1fbpfcp\/819078d24ff245df9f5ea550db78d3c6~tplv-k3u1fbpfcp-zoom-1.image\" style=\"max-width: 100%;\"><\/a><\/p>\n<p dir=\"auto\">\u53ef\u4ee5\u770b\u5230\u9875\u9762\u8bf7\u6c42\u4e86 <code class=\"notranslate\">hm.js<\/code> \u548c <code class=\"notranslate\">hm.gif<\/code> \uff0c\u8868\u660e\u786e\u5b9e\u53d1\u9001\u4e86\u8bf7\u6c42\u3002<\/p>\n<h4 dir=\"auto\">1.3.2 \u7ebf\u4e0a\u9a8c\u8bc1<\/h4>\n<p dir=\"auto\">\u73b0\u5728\u6211\u4eec\u90e8\u7f72\u5230\u7ebf\u4e0a\u3002\u7b49\u90e8\u7f72\u5b8c\u6210\u540e\uff0c\u6211\u4eec\u8fd8\u53ef\u4ee5\u5728\u7edf\u8ba1\u540e\u53f0\u7684\u201c<a href=\"https:\/\/tongji.baidu.com\/sc-web\/10000424309\/home\/js\/check?siteId=17560690\" rel=\"nofollow\">\u4ee3\u7801\u5b89\u88c5\u68c0\u67e5<\/a>\u201d\u9875\u9762\u81ea\u52a8\u68c0\u6d4b\u6216\u624b\u52a8\u68c0\u6d4b\u4ee3\u7801\u5b89\u88c5\u60c5\u51b5\u3002<br \/>\n<a target=\"_blank\" rel=\"noopener noreferrer nofollow\" href=\"\/\/www.lccc.top\/wp-content\/uploads\/pic\/mqyqingfen\/758222d73c852e97bd87e5440546f97ac1f35153.jpg\"><img decoding=\"async\" src=\"\/\/www.lccc.top\/wp-content\/uploads\/pic\/mqyqingfen\/758222d73c852e97bd87e5440546f97ac1f35153.jpg\" alt=\"\" data-canonical-src=\"https:\/\/p3-juejin.byteimg.com\/tos-cn-i-k3u1fbpfcp\/0a1ea37c27174e7492c16529081da7a5~tplv-k3u1fbpfcp-zoom-1.image\" style=\"max-width: 100%;\"><\/a><\/p>\n<h3 dir=\"auto\">1.4 \u7b49\u5f85<\/h3>\n<p dir=\"auto\">\u5982\u679c\u4ee3\u7801\u5b89\u88c5\u6b63\u786e\uff0c\u4e00\u822c 20 \u5206\u949f\u540e\uff0c\u53ef\u4ee5\u67e5\u770b\u7f51\u7ad9\u5206\u6790\u6570\u636e\u3002<\/p>\n<h2 dir=\"auto\">2. \u5355\u9875\u5e94\u7528\u7684\u6570\u636e\u7edf\u8ba1\u95ee\u9898<\/h2>\n<h3 dir=\"auto\">2.1 \u95ee\u9898<\/h3>\n<p dir=\"auto\">\u6211\u4eec\u901a\u8fc7\u5728 <code class=\"notranslate\">head<\/code> \u4e2d\u5f15\u5165\u767e\u5ea6\u7edf\u8ba1\u4ee3\u7801\uff0c\u5982\u679c\u662f\u666e\u901a\u7684\u9875\u9762\uff0c\u6ca1\u6709\u4ec0\u4e48\u95ee\u9898\uff0c\u4f46\u6211\u4eec\u7528 VuePress \u642d\u5efa\u7684\u662f\u4e00\u4e2a\u5355\u9875\u5e94\u7528\uff0c\u9875\u9762\u5207\u6362\u8fc7\u7a0b\u4e2d\uff0c\u4e0d\u4f1a\u91cd\u65b0\u52a0\u8f7d\u9875\u9762\uff0c\u81ea\u7136\u4e5f\u4e0d\u4f1a\u89e6\u53d1\u767e\u5ea6\u7edf\u8ba1\u3002\u6240\u4ee5\u6211\u4eec\u53ea\u80fd\u7edf\u8ba1\u5230\u7528\u6237\u8bbf\u95ee\u4e86\u9875\u9762\uff0c\u4f46\u5177\u4f53\u70b9\u5f00\u4e86\u54ea\u4e9b\u6587\u7ae0\uff0c\u8df3\u8f6c\u4e86\u54ea\u4e9b\u8def\u7531\u5e76\u4e0d\u77e5\u9053\u3002\u4e3a\u4e86\u5b9e\u73b0\u8def\u7531\u5207\u6362\u65f6\u7684\u6570\u636e\u7edf\u8ba1\uff0c\u6211\u4eec\u8fd8\u9700\u8981\u76d1\u542c\u8def\u7531\u6539\u53d8\uff0c\u624b\u52a8\u4e0a\u62a5\u6570\u636e\uff0c\u90a3\u5177\u4f53\u6211\u4eec\u8be5\u600e\u4e48\u505a\u5462?<\/p>\n<h3 dir=\"auto\">2.2 \u601d\u8def<\/h3>\n<p dir=\"auto\">\u9996\u5148\u6839\u636e <a href=\"https:\/\/vuepress.vuejs.org\/zh\/guide\/#%E5%AE%83%E6%98%AF%E5%A6%82%E4%BD%95%E5%B7%A5%E4%BD%9C%E7%9A%84\" rel=\"nofollow\">VuePress \u5b98\u7f51<\/a>\u7684\u4ecb\u7ecd\uff1a<\/p>\n<blockquote>\n<p dir=\"auto\">\u4e00\u4e2a VuePress \u7f51\u7ad9\u662f\u4e00\u4e2a\u7531 <a href=\"http:\/\/vuejs.org\/\" rel=\"nofollow\">Vue<\/a>\u3001<a href=\"https:\/\/github.com\/vuejs\/vue-router\">Vue Router<\/a>\u548c <a href=\"http:\/\/webpack.js.org\/\" rel=\"nofollow\">webpack<\/a> \u9a71\u52a8\u7684\u5355\u9875\u5e94\u7528\u3002<\/p>\n<\/blockquote>\n<p dir=\"auto\">\u800c\u5728 VuePress \u6587\u6863\u7684\u57fa\u672c\u914d\u7f6e\u4e2d\uff0c\u4ecb\u7ecd\u4e86\u4e00\u4e2a<a href=\"https:\/\/vuepress.vuejs.org\/zh\/guide\/basic-config.html#%E5%BA%94%E7%94%A8%E7%BA%A7%E5%88%AB%E7%9A%84%E9%85%8D%E7%BD%AE\" rel=\"nofollow\">\u5e94\u7528\u7ea7\u522b\u7684\u914d\u7f6e<\/a>\uff1a<\/p>\n<blockquote>\n<p dir=\"auto\">\u7531\u4e8e VuePress \u662f\u4e00\u4e2a\u6807\u51c6\u7684 Vue \u5e94\u7528\uff0c\u4f60\u53ef\u4ee5\u901a\u8fc7\u521b\u5efa\u4e00\u4e2a <code class=\"notranslate\">.vuepress\/enhanceApp.js<\/code> \u6587\u4ef6\u6765\u505a\u4e00\u4e9b\u5e94\u7528\u7ea7\u522b\u7684\u914d\u7f6e\uff0c\u5f53\u8be5\u6587\u4ef6\u5b58\u5728\u7684\u65f6\u5019\uff0c\u4f1a\u88ab\u5bfc\u5165\u5230\u5e94\u7528\u5185\u90e8\u3002<code class=\"notranslate\">enhanceApp.js<\/code> \u5e94\u8be5 <code class=\"notranslate\">export default<\/code> \u4e00\u4e2a\u94a9\u5b50\u51fd\u6570\uff0c\u5e76\u63a5\u53d7\u4e00\u4e2a\u5305\u542b\u4e86\u4e00\u4e9b\u5e94\u7528\u7ea7\u522b\u5c5e\u6027\u7684\u5bf9\u8c61\u4f5c\u4e3a\u53c2\u6570\u3002\u4f60\u53ef\u4ee5\u4f7f\u7528\u8fd9\u4e2a\u94a9\u5b50\u6765\u5b89\u88c5\u4e00\u4e9b\u9644\u52a0\u7684 Vue \u63d2\u4ef6\u3001\u6ce8\u518c\u5168\u5c40\u7ec4\u4ef6\uff0c\u6216\u8005\u589e\u52a0\u989d\u5916\u7684\u8def\u7531\u94a9\u5b50\u7b49\uff1a<\/p>\n<\/blockquote>\n<div class=\"highlight highlight-source-js notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"\/\/ \u4f7f\u7528\u5f02\u6b65\u51fd\u6570\u4e5f\u662f\u53ef\u4ee5\u7684\nexport default ({\n  Vue, \/\/ VuePress \u6b63\u5728\u4f7f\u7528\u7684 Vue \u6784\u9020\u51fd\u6570\n  options, \/\/ \u9644\u52a0\u5230\u6839\u5b9e\u4f8b\u7684\u4e00\u4e9b\u9009\u9879\n  router, \/\/ \u5f53\u524d\u5e94\u7528\u7684\u8def\u7531\u5b9e\u4f8b\n  siteData, \/\/ \u7ad9\u70b9\u5143\u6570\u636e\n  isServer \/\/ \u5f53\u524d\u5e94\u7528\u914d\u7f6e\u662f\u5904\u4e8e \u670d\u52a1\u7aef\u6e32\u67d3 \u6216 \u5ba2\u6237\u7aef\n}) =&gt; {\n  \/\/ ...\u505a\u4e00\u4e9b\u5176\u4ed6\u7684\u5e94\u7528\u7ea7\u522b\u7684\u4f18\u5316\n}\"><\/p>\n<pre class=\"notranslate\"><span class=\"pl-c\">\/\/ \u4f7f\u7528\u5f02\u6b65\u51fd\u6570\u4e5f\u662f\u53ef\u4ee5\u7684<\/span>\n<span class=\"pl-k\">export<\/span> <span class=\"pl-k\">default<\/span> <span class=\"pl-kos\">(<\/span><span class=\"pl-kos\">{<\/span>\n  Vue<span class=\"pl-kos\">,<\/span> <span class=\"pl-c\">\/\/ VuePress \u6b63\u5728\u4f7f\u7528\u7684 Vue \u6784\u9020\u51fd\u6570<\/span>\n  options<span class=\"pl-kos\">,<\/span> <span class=\"pl-c\">\/\/ \u9644\u52a0\u5230\u6839\u5b9e\u4f8b\u7684\u4e00\u4e9b\u9009\u9879<\/span>\n  router<span class=\"pl-kos\">,<\/span> <span class=\"pl-c\">\/\/ \u5f53\u524d\u5e94\u7528\u7684\u8def\u7531\u5b9e\u4f8b<\/span>\n  siteData<span class=\"pl-kos\">,<\/span> <span class=\"pl-c\">\/\/ \u7ad9\u70b9\u5143\u6570\u636e<\/span>\n  isServer <span class=\"pl-c\">\/\/ \u5f53\u524d\u5e94\u7528\u914d\u7f6e\u662f\u5904\u4e8e \u670d\u52a1\u7aef\u6e32\u67d3 \u6216 \u5ba2\u6237\u7aef<\/span>\n<span class=\"pl-kos\">}<\/span><span class=\"pl-kos\">)<\/span> <span class=\"pl-c1\">=&gt;<\/span> <span class=\"pl-kos\">{<\/span>\n  <span class=\"pl-c\">\/\/ ...\u505a\u4e00\u4e9b\u5176\u4ed6\u7684\u5e94\u7528\u7ea7\u522b\u7684\u4f18\u5316<\/span>\n<span class=\"pl-kos\">}<\/span><\/pre>\n<\/div>\n<p dir=\"auto\">\u5728\u8fd9\u91cc\u6211\u4eec\u53ef\u4ee5\u770b\u5230\uff0c\u6709\u63d0\u4f9b\u5f53\u524d\u5e94\u7528\u7684\u8def\u7531\u5b9e\u4f8b router\uff0c\u56e0\u4e3a VuePress \u7684\u8def\u7531\u662f\u7531 Vue Router \u9a71\u52a8\u7684\uff0c\u6240\u4ee5\u6211\u4eec\u67e5\u4e0b Vue Router \u7684\u5b98\u7f51\u4ecb\u7ecd\uff0c\u53ef\u4ee5\u770b\u5230\u4e00\u4e2a<a href=\"https:\/\/router.vuejs.org\/zh\/guide\/advanced\/navigation-guards.html#%E5%85%A8%E5%B1%80%E5%89%8D%E7%BD%AE%E5%AE%88%E5%8D%AB\" rel=\"nofollow\">\u5168\u5c40\u524d\u7f6e\u5b88\u536b<\/a>\uff1a<\/p>\n<blockquote>\n<p dir=\"auto\">\u4f60\u53ef\u4ee5\u4f7f\u7528 router.beforeEach \u6ce8\u518c\u4e00\u4e2a\u5168\u5c40\u524d\u7f6e\u5b88\u536b\uff1a<\/p>\n<\/blockquote>\n<div class=\"highlight highlight-source-js notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"const router = new VueRouter({ ... })\n\nrouter.beforeEach((to, from, next) =&gt; {\n  \/\/ ...\n})\"><\/p>\n<pre class=\"notranslate\"><span class=\"pl-k\">const<\/span> <span class=\"pl-s1\">router<\/span> <span class=\"pl-c1\">=<\/span> <span class=\"pl-k\">new<\/span> <span class=\"pl-v\">VueRouter<\/span><span class=\"pl-kos\">(<\/span><span class=\"pl-kos\">{<\/span> ... <span class=\"pl-kos\">}<\/span><span class=\"pl-kos\">)<\/span>\n\n<span class=\"pl-s1\">router<\/span><span class=\"pl-kos\">.<\/span><span class=\"pl-en\">beforeEach<\/span><span class=\"pl-kos\">(<\/span><span class=\"pl-kos\">(<\/span><span class=\"pl-s1\">to<\/span><span class=\"pl-kos\">,<\/span> <span class=\"pl-s1\">from<\/span><span class=\"pl-kos\">,<\/span> <span class=\"pl-s1\">next<\/span><span class=\"pl-kos\">)<\/span> <span class=\"pl-c1\">=&gt;<\/span> <span class=\"pl-kos\">{<\/span>\n  <span class=\"pl-c\">\/\/ ...<\/span>\n<span class=\"pl-kos\">}<\/span><span class=\"pl-kos\">)<\/span><\/pre>\n<\/div>\n<blockquote>\n<p dir=\"auto\">\u6bcf\u4e2a\u5b88\u536b\u65b9\u6cd5\u63a5\u6536\u4e09\u4e2a\u53c2\u6570\uff1a<\/p>\n<ul dir=\"auto\">\n<li>to: Route: \u5373\u5c06\u8981\u8fdb\u5165\u7684\u76ee\u6807 \u8def\u7531\u5bf9\u8c61<\/li>\n<li>from: Route: \u5f53\u524d\u5bfc\u822a\u6b63\u8981\u79bb\u5f00\u7684\u8def\u7531<\/li>\n<li>next: Function: \u4e00\u5b9a\u8981\u8c03\u7528\u8be5\u65b9\u6cd5\u6765 resolve \u8fd9\u4e2a\u94a9\u5b50\u3002<\/li>\n<\/ul>\n<\/blockquote>\n<p dir=\"auto\">\u7531\u6b64\u5f97\u51fa\uff0c\u6211\u4eec\u53ef\u4ee5\u5728\u83b7\u53d6\u8def\u7531\u5b9e\u4f8b\u540e\uff0c\u6ce8\u518c\u4e00\u4e2a\u5168\u5c40\u524d\u7f6e\u5b88\u536b\u6765\u76d1\u542c\u8def\u7531\u6539\u53d8\u3002<\/p>\n<p dir=\"auto\">\u73b0\u5728\u6211\u4eec\u80fd\u76d1\u542c\u8def\u7531\u6539\u53d8\u4e86\uff0c\u600e\u4e48\u624b\u52a8\u4e0a\u62a5\u6570\u636e\u5462\uff1f\u8fd9\u4e2a\u6211\u4eec\u53ef\u4ee5\u67e5\u770b<a href=\"https:\/\/tongji.baidu.com\/holmes\/Tongji\/%E7%BB%9F%E8%AE%A1%E5%BC%80%E6%94%BE%E6%89%8B%E5%86%8C\/JS%20API%E9%83%A8%E7%BD%B2%E8%AF%B4%E6%98%8E\/PV%E8%B7%9F%E8%B8%AA\" rel=\"nofollow\">\u767e\u5ea6\u7edf\u8ba1\u7684\u6587\u6863<\/a>\uff0c\u6709\u8bb2\u5230\u9488\u5bf9\u8fd9\u79cd\u5355\u9875\u5e94\u7528\u5982\u4f55\u5728 JS \u4e2d\u8c03\u7528 PV \u8ddf\u8e2a\u4ee3\u7801\uff1a<\/p>\n<div class=\"highlight highlight-source-ts notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"_hmt.push(['_trackPageview', pageURL]); \n\n\/\/ pageURL\uff1a\u6307\u5b9a\u8981\u7edf\u8ba1PV\u7684\u9875\u9762URL\u3002\u6b64\u9879\u5fc5\u9009\u3002\"><\/p>\n<pre class=\"notranslate\"><span class=\"pl-s1\">_hmt<\/span><span class=\"pl-kos\">.<\/span><span class=\"pl-en\">push<\/span><span class=\"pl-kos\">(<\/span><span class=\"pl-kos\">[<\/span><span class=\"pl-s\">'_trackPageview'<\/span><span class=\"pl-kos\">,<\/span> <span class=\"pl-s1\">pageURL<\/span><span class=\"pl-kos\">]<\/span><span class=\"pl-kos\">)<\/span><span class=\"pl-kos\">;<\/span> \n\n<span class=\"pl-c\">\/\/ pageURL\uff1a\u6307\u5b9a\u8981\u7edf\u8ba1PV\u7684\u9875\u9762URL\u3002\u6b64\u9879\u5fc5\u9009\u3002<\/span><\/pre>\n<\/div>\n<p dir=\"auto\">\u73b0\u5728\u4e07\u4e8b\u4ff1\u5907\uff0c\u6211\u4eec\u5f00\u59cb\u5199\u8d77\u6765\u5427\u3002<\/p>\n<h3 dir=\"auto\">2.3 \u5b9e\u8df5<\/h3>\n<p dir=\"auto\">\u6211\u4eec\u5728 <code class=\"notranslate\">.vuepress<\/code> \u6587\u4ef6\u5939\u4e0b\u65b0\u5efa\u4e00\u4e2a <code class=\"notranslate\">enhanceApp.js<\/code> \u6587\u4ef6\uff0c\u4ee3\u7801\u5199\u5165\uff1a<\/p>\n<div class=\"highlight highlight-source-js notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content='export default ({ router }) =&gt; {\n    router.beforeEach((to, from, next) =&gt; {\n      if (typeof _hmt !== \"undefined\") {\n        if (to.path) {\n          _hmt.push([\"_trackPageview\", to.fullPath]);\n        }\n      }\n      \n      next();\n    });\n  };'><\/p>\n<pre class=\"notranslate\"><span class=\"pl-k\">export<\/span> <span class=\"pl-k\">default<\/span> <span class=\"pl-kos\">(<\/span><span class=\"pl-kos\">{<\/span> router <span class=\"pl-kos\">}<\/span><span class=\"pl-kos\">)<\/span> <span class=\"pl-c1\">=&gt;<\/span> <span class=\"pl-kos\">{<\/span>\n    <span class=\"pl-s1\">router<\/span><span class=\"pl-kos\">.<\/span><span class=\"pl-en\">beforeEach<\/span><span class=\"pl-kos\">(<\/span><span class=\"pl-kos\">(<\/span><span class=\"pl-s1\">to<\/span><span class=\"pl-kos\">,<\/span> <span class=\"pl-s1\">from<\/span><span class=\"pl-kos\">,<\/span> <span class=\"pl-s1\">next<\/span><span class=\"pl-kos\">)<\/span> <span class=\"pl-c1\">=&gt;<\/span> <span class=\"pl-kos\">{<\/span>\n      <span class=\"pl-k\">if<\/span> <span class=\"pl-kos\">(<\/span><span class=\"pl-k\">typeof<\/span> <span class=\"pl-s1\">_hmt<\/span> <span class=\"pl-c1\">!==<\/span> <span class=\"pl-s\">\"undefined\"<\/span><span class=\"pl-kos\">)<\/span> <span class=\"pl-kos\">{<\/span>\n        <span class=\"pl-k\">if<\/span> <span class=\"pl-kos\">(<\/span><span class=\"pl-s1\">to<\/span><span class=\"pl-kos\">.<\/span><span class=\"pl-c1\">path<\/span><span class=\"pl-kos\">)<\/span> <span class=\"pl-kos\">{<\/span>\n          <span class=\"pl-s1\">_hmt<\/span><span class=\"pl-kos\">.<\/span><span class=\"pl-en\">push<\/span><span class=\"pl-kos\">(<\/span><span class=\"pl-kos\">[<\/span><span class=\"pl-s\">\"_trackPageview\"<\/span><span class=\"pl-kos\">,<\/span> <span class=\"pl-s1\">to<\/span><span class=\"pl-kos\">.<\/span><span class=\"pl-c1\">fullPath<\/span><span class=\"pl-kos\">]<\/span><span class=\"pl-kos\">)<\/span><span class=\"pl-kos\">;<\/span>\n        <span class=\"pl-kos\">}<\/span>\n      <span class=\"pl-kos\">}<\/span>\n      \n      <span class=\"pl-s1\">next<\/span><span class=\"pl-kos\">(<\/span><span class=\"pl-kos\">)<\/span><span class=\"pl-kos\">;<\/span>\n    <span class=\"pl-kos\">}<\/span><span class=\"pl-kos\">)<\/span><span class=\"pl-kos\">;<\/span>\n  <span class=\"pl-kos\">}<\/span><span class=\"pl-kos\">;<\/span><\/pre>\n<\/div>\n<p dir=\"auto\">\u73b0\u5728\u6211\u4eec\u5728\u672c\u5730\u518d\u8fd0\u884c\u4e0b\u4ee3\u7801\uff0c\u7136\u540e\u70b9\u51fb\u6587\u7ae0\uff0c\u5305\u62ec\u70b9\u51fb\u6587\u7ae0\u4e2d\u7684\u951a\u70b9\uff0c\u67e5\u770b\u8bf7\u6c42\u5c31\u53ef\u4ee5\u770b\u5230\u4e0a\u62a5\u4e86\u6570\u636e\u3002<\/p>\n<h3 dir=\"auto\">2.4 \u68b3\u7406<\/h3>\n<p dir=\"auto\">\u8fd9\u91cc\u6211\u4eec\u9488\u5bf9\u80fd\u4e0a\u62a5\u6570\u636e\u7684\u60c5\u5f62\u68b3\u7406\u4e00\u4e0b\uff1a<\/p>\n<ol dir=\"auto\">\n<li>\u9875\u9762\u8fdb\u5165\u548c\u5237\u65b0<\/li>\n<li>\u70b9\u51fb\u5176\u4ed6\u6587\u7ae0\uff0c\u8def\u7531\u5207\u6362<\/li>\n<li>\u70b9\u51fb\u6587\u7ae0\u951a\u70b9\uff0c\u5207\u6362\u5230\u5176\u4ed6\u7ae0\u8282\uff08\u8fd9\u91cc\u5176\u5b9e\u8fd8\u662f\u8def\u7531\u5207\u6362\uff09<\/li>\n<\/ol>\n<p dir=\"auto\">\u73b0\u5728\u4ee5\u4e0a\u90fd\u4f1a\u89e6\u53d1\u6570\u636e\u4e0a\u62a5\u3002<\/p>\n<h2 dir=\"auto\">3. \u8c37\u6b4c\u7edf\u8ba1<\/h2>\n<p dir=\"auto\">VuePress \u76f4\u63a5\u63d0\u4f9b\u4e86 <code class=\"notranslate\">@vuepress\/plugin-google-analytics<\/code> \u63d2\u4ef6\uff0c\u4f7f\u7528\u8be5\u63d2\u4ef6\uff0c\u65e0\u987b\u6211\u4eec\u624b\u52a8\u76d1\u542c\u8def\u7531\u6539\u53d8\uff0c\u4e0a\u8282\u6240\u8bf4\u7684\u4e09\u79cd\u60c5\u5f62\u4e0b\u90fd\u4f1a\u89e6\u53d1\u6570\u636e\u4e0a\u62a5\u3002<\/p>\n<p dir=\"auto\">\u6211\u4eec\u76f4\u63a5\u53c2\u7167<a href=\"https:\/\/www.vuepress.cn\/zh\/plugin\/official\/plugin-google-analytics.html#vuepress-plugin-google-analytics\" rel=\"nofollow\">\u6587\u6863<\/a>\uff1a<\/p>\n<h3 dir=\"auto\">3.1 \u5b89\u88c5<\/h3>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"yarn add -D @vuepress\/plugin-google-analytics\n# OR npm install -D @vuepress\/plugin-google-analytics\"><\/p>\n<pre class=\"notranslate\">yarn add -D @vuepress\/plugin-google-analytics\n<span class=\"pl-c\"><span class=\"pl-c\">#<\/span> OR npm install -D @vuepress\/plugin-google-analytics<\/span><\/pre>\n<\/div>\n<blockquote>\n<p dir=\"auto\">\u6ce8\u610f\uff1a\u5982\u679c\u4f60\u7684\u9879\u76ee\u6b63\u5728\u4f7f\u7528 Google analytics \u63d2\u4ef6\uff0c\u63a8\u8350\u4f7f\u7528 Yarn (opens new window)\u800c\u4e0d\u662f npm \u6765\u5b89\u88c5\u6240\u6709\u4f9d\u8d56\u3002\u56e0\u4e3a\u5728\u8fd9\u79cd\u60c5\u5f62\u4e0b\uff0cnpm \u4f1a\u751f\u6210\u9519\u8bef\u7684\u4f9d\u8d56\u6811\u3002<\/p>\n<\/blockquote>\n<h3 dir=\"auto\">3.2 \u4f7f\u7528<\/h3>\n<div class=\"highlight highlight-source-js notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"module.exports = {\n  plugins: [\n    [\n      '@vuepress\/google-analytics',\n      {\n        'ga': '' \/\/ UA-00000000-0\n      }\n    ]\n  ]\n}\"><\/p>\n<pre class=\"notranslate\"><span class=\"pl-smi\">module<\/span><span class=\"pl-kos\">.<\/span><span class=\"pl-c1\">exports<\/span> <span class=\"pl-c1\">=<\/span> <span class=\"pl-kos\">{<\/span>\n  <span class=\"pl-c1\">plugins<\/span>: <span class=\"pl-kos\">[<\/span>\n    <span class=\"pl-kos\">[<\/span>\n      <span class=\"pl-s\">'@vuepress\/google-analytics'<\/span><span class=\"pl-kos\">,<\/span>\n      <span class=\"pl-kos\">{<\/span>\n        <span class=\"pl-s\">'ga'<\/span>: <span class=\"pl-s\">''<\/span> <span class=\"pl-c\">\/\/ UA-00000000-0<\/span>\n      <span class=\"pl-kos\">}<\/span>\n    <span class=\"pl-kos\">]<\/span>\n  <span class=\"pl-kos\">]<\/span>\n<span class=\"pl-kos\">}<\/span><\/pre>\n<\/div>\n<h3 dir=\"auto\">3.3 \u83b7\u53d6 ga<\/h3>\n<h4 dir=\"auto\">3.3.1 \u767b\u9646\u540e\u53f0<\/h4>\n<p dir=\"auto\">\u6240\u8c13 ga\uff0c\u5373 Google Analytics ID\uff0c\u6211\u4eec\u9700\u8981\u5230\u8c37\u6b4c\u5206\u6790\u521b\u5efa\u7ad9\u70b9\u83b7\u53d6\uff1a<\/p>\n<p dir=\"auto\">\u6211\u4eec\u767b\u9646\u8c37\u6b4c\u5206\u6790\u540e\u53f0\uff1a<a href=\"https:\/\/analytics.google.com\/\" rel=\"nofollow\">https:\/\/analytics.google.com\/<\/a><\/p>\n<p dir=\"auto\">\u5982\u679c\u662f\u7b2c\u4e00\u6b21\u767b\u9646\uff0c\u4f1a\u8ddf\u7740\u6307\u793a\u521b\u5efa\u8d26\u53f7\uff0c\u6240\u8c13\u8d26\u53f7\uff0c\u901a\u5e38\u662f\u4e00\u4e2a\u516c\u53f8\u6216\u8005\u7ec4\u7ec7\u3002<\/p>\n<h4 dir=\"auto\">3.3.2 \u6dfb\u52a0\u5a92\u4f53\u8d44\u6e90<\/h4>\n<p dir=\"auto\">\u63a5\u4e0b\u6765\u6dfb\u52a0\u5a92\u4f53\u8d44\u6e90\uff0c\u6240\u8c13\u5a92\u4f53\u8d44\u6e90\uff0c\u4e00\u822c\u5c31\u662f\u6307\u7f51\u7ad9\u6216 APP\uff0c\u4f60\u4e5f\u53ef\u4ee5\u7406\u89e3\u4e3a\u767e\u5ea6\u7684\u7ad9\u70b9\uff0c\u6bcf\u4e2a\u5a92\u4f53\u8d44\u6e90\u90fd\u6709\u4e00\u4e2a\u552f\u4e00\u7684\u8ffd\u8e2a ID\uff0c\u5c31\u662f\u6211\u4eec\u8981\u62ff\u5230\u7684 ga\u3002<\/p>\n<p dir=\"auto\">\u4f46\u662f\u5728\u6dfb\u52a0\u5a92\u4f53\u8d44\u6e90\u7684\u65f6\u5019\uff0c\u4e00\u5b9a\u8981\u6ce8\u610f\uff0c\u6211\u4eec\u9700\u8981\u70b9\u51fb \u300c\u67e5\u770b\u9ad8\u7ea7\u9009\u9879\u300d\uff0c\u6253\u5f00\u521b\u5efa \u300cUniversal Analytics \u5a92\u4f53\u8d44\u6e90\u300d\u5f00\u5173\uff0c\u81f3\u4e8e\u662f\u52fe\u9009 \u300c\u540c\u65f6\u521b\u5efa Google Analytics 4 \u548c Universal Analytics\u300d \u8fd8\u662f\u300c\u4ec5\u521b\u5efa Universal Analytics\u300d\u5219\u90fd\u53ef\u4ee5\u3002<\/p>\n<p dir=\"auto\">\u4f46\u53ea\u6709\u901a\u8fc7 Unviersal Analytics \u521b\u5efa\u7684 ga \u624d\u662f\u6211\u4eec\u8fd9\u6b21\u9700\u8981\u7684 ga\uff0c\u5b83\u521b\u5efa\u7684\u683c\u5f0f\u8ddf\u6240\u9700\u8981\u7684 <code class=\"notranslate\">UA-00000000-0<\/code> \u76f8\u540c\uff0c\u5982\u679c\u662f Google Analytics 4 \u521b\u5efa\u7684\uff0c\u5219\u662f\u4ee5  G \u5f00\u5934\u7684\u3002<\/p>\n<p dir=\"auto\"><a target=\"_blank\" rel=\"noopener noreferrer nofollow\" href=\"\/\/www.lccc.top\/wp-content\/uploads\/pic\/mqyqingfen\/757ccd154f966d62697c401c4e90c9eaf1d894e9.jpg\"><img decoding=\"async\" src=\"\/\/www.lccc.top\/wp-content\/uploads\/pic\/mqyqingfen\/757ccd154f966d62697c401c4e90c9eaf1d894e9.jpg\" alt=\"\" data-canonical-src=\"https:\/\/p3-juejin.byteimg.com\/tos-cn-i-k3u1fbpfcp\/d5fc0c7552b6435e9cd5ddbe1543682f~tplv-k3u1fbpfcp-zoom-1.image\" style=\"max-width: 100%;\"><\/a><\/p>\n<p dir=\"auto\">\u5173\u4e8e Google Analytics\uff08\u5206\u6790\uff094 \u591a\u8bf4\u4e00\u53e5\uff0cGoogle Analytics 4 \u7b80\u79f0 GA4\uff0c\u4e5f\u662f\u65b0\u7248 GA\uff0c2020\u5e7410\u6708\u4efd\u53d1\u5e03\uff0c\u6839\u636e<a href=\"https:\/\/support.google.com\/analytics\/answer\/10089681?hl=zh-Hans\" rel=\"nofollow\">\u5b98\u65b9\u6587\u6863<\/a>\u7684\u4ecb\u7ecd\uff1a<\/p>\n<blockquote>\n<p dir=\"auto\">Google Analytics\uff08\u5206\u6790\uff094\uff08\u4ee5\u524d\u79f0\u4e3a\u201c\u5e94\u7528 + \u7f51\u7ad9\u201d\uff09\u662f\u4e00\u9879\u65b0\u578b\u5a92\u4f53\u8d44\u6e90\uff0c\u63d0\u4f9b\u7684\u62a5\u544a\u4e0e\u60a8\u5728 Universal Analytics \u5a92\u4f53\u8d44\u6e90\u4e2d\u770b\u5230\u7684\u62a5\u544a\u4e0d\u540c\u3002Google Analytics\uff08\u5206\u6790\uff094 \u5a92\u4f53\u8d44\u6e90\u7684\u4f18\u52bf\u4e4b\u4e00\u662f\uff1a\u60a8\u53ef\u4ee5\u5c06\u5176\u7528\u4e8e\u7f51\u7ad9\u3001\u5e94\u7528\uff0c\u6216\u540c\u65f6\u7528\u4e8e\u8fd9\u4e24\u8005\u3002Universal Analytics \u5a92\u4f53\u8d44\u6e90\u4ec5\u652f\u6301\u7f51\u7ad9\u3002<\/p>\n<\/blockquote>\n<p dir=\"auto\">\u5728\u521b\u5efa\u5b8c\u540e\uff0c\u6211\u4eec\u5c31\u53ef\u4ee5\u770b\u5230\u751f\u6210\u7684 ga \u4e86\uff1a<\/p>\n<p dir=\"auto\"><a target=\"_blank\" rel=\"noopener noreferrer nofollow\" href=\"\/\/www.lccc.top\/wp-content\/uploads\/pic\/mqyqingfen\/6107181e859fa5684ccf4fd2e19e89a86d38eb85.jpg\"><img decoding=\"async\" src=\"\/\/www.lccc.top\/wp-content\/uploads\/pic\/mqyqingfen\/6107181e859fa5684ccf4fd2e19e89a86d38eb85.jpg\" alt=\"\" data-canonical-src=\"https:\/\/p3-juejin.byteimg.com\/tos-cn-i-k3u1fbpfcp\/fd828a40271d4932b5448233bb1f5407~tplv-k3u1fbpfcp-zoom-1.image\" style=\"max-width: 100%;\"><\/a><\/p>\n<p dir=\"auto\">\u590d\u5236 ga\uff0c\u6211\u4eec\u586b\u5165\u5230 <code class=\"notranslate\">config.js<\/code> \u7684\u4ee3\u7801\u4e2d\u3002<\/p>\n<h3 dir=\"auto\">3.4 \u9a8c\u8bc1<\/h3>\n<p dir=\"auto\">\u6ce8\u610f\uff0c\u8c37\u6b4c\u5206\u6790\u4e0e\u767e\u5ea6\u5206\u6790\u7a0d\u6709\u4e0d\u540c\uff0c\u5982\u679c\u6211\u4eec\u5728\u672c\u5730\u8fd0\u884c\uff0c\u5e76\u4e0d\u4f1a\u770b\u5230\u6709\u6570\u636e\u7684\u4e0a\u62a5\uff0c\u6211\u4eec\u53ef\u4ee5\u628a\u4ee3\u7801\u90e8\u7f72\u5230\u7ebf\u4e0a\u67e5\u770b\uff1a<\/p>\n<p dir=\"auto\">\u5982\u679c\u770b\u5230\u6709\u5982\u56fe\u7684\u5e26<code class=\"notranslate\">collect<\/code>\u7684\u8bf7\u6c42\uff0c\u5c31\u8868\u793a\u53d1\u9001\u8bf7\u6c42\u6210\u529f\u3002<\/p>\n<p dir=\"auto\"><a target=\"_blank\" rel=\"noopener noreferrer nofollow\" href=\"\/\/www.lccc.top\/wp-content\/uploads\/pic\/mqyqingfen\/072b9d28a6ea2b079ccb6de7f9952cad84f6da38.jpg\"><img decoding=\"async\" src=\"\/\/www.lccc.top\/wp-content\/uploads\/pic\/mqyqingfen\/072b9d28a6ea2b079ccb6de7f9952cad84f6da38.jpg\" alt=\"\" data-canonical-src=\"https:\/\/p3-juejin.byteimg.com\/tos-cn-i-k3u1fbpfcp\/30f3c6979da240da80f4de2e210bcd9e~tplv-k3u1fbpfcp-zoom-1.image\" style=\"max-width: 100%;\"><\/a><\/p>\n<h3 dir=\"auto\">3.5 \u7b49\u5f85<\/h3>\n<p dir=\"auto\">\u6839\u636e<a href=\"https:\/\/support.google.com\/analytics\/answer\/9333790?hl=zh-Hans\" rel=\"nofollow\">\u5b98\u65b9\u7684\u5e2e\u52a9\u6587\u6863<\/a>\uff0c\u6211\u4eec\u53ef\u4ee5\u77e5\u9053:<\/p>\n<blockquote>\n<p dir=\"auto\">\u5411\u60a8\u7684\u7f51\u7ad9\u6dfb\u52a0\u4e86 Analytics\uff08\u5206\u6790\uff09\u4ee3\u7801\u4e4b\u540e\uff0cAnalytics\uff08\u5206\u6790\uff09\u5c06\u5728\u6570\u5206\u949f\uff08\u901a\u5e38\u662f 10-15 \u5206\u949f\uff09\u5185\u5f00\u59cb\u5411\u60a8\u7684\u5a92\u4f53\u8d44\u6e90\u53d1\u9001\u6570\u636e\u3002<\/p>\n<\/blockquote>\n<blockquote>\n<p dir=\"auto\">\u8981\u786e\u8ba4\u60a8\u7684\u5a92\u4f53\u8d44\u6e90\u662f\u5426\u6b63\u5728\u63a5\u6536\u6570\u636e\uff0c\u8bf7\u67e5\u770b\u201c\u5b9e\u65f6\u201d\u62a5\u544a\u3002\u5982\u679c\u60a8\u6b63\u786e\u8bbe\u7f6e\u4e86\u8861\u91cf\u4ee3\u7801\uff0c\u5219\u201c\u5f53\u524d\u7684\u7528\u6237\u6570\u91cf\u201d\u5361\u7247\u5c06\u4f1a\u6bcf 15 \u79d2\u5de6\u53f3\u5237\u65b0\u4e00\u6b21\uff0c\u4ee5\u663e\u793a\u6700\u65b0\u7684\u7528\u6237\u6570\u91cf\u3002<\/p>\n<\/blockquote>\n<blockquote>\n<p dir=\"auto\">Analytics\uff08\u5206\u6790\uff09\u9700\u8981 24-48 \u5c0f\u65f6\u6765\u5904\u7406\u5176\u4ed6\u62a5\u544a\u7684\u6570\u636e\u3002<\/p>\n<\/blockquote>\n<h2 dir=\"auto\">4. \u8c37\u6b4c\u8fd8\u662f\u767e\u5ea6\uff1f<\/h2>\n<p dir=\"auto\">\u81f3\u4e8e\u4f7f\u7528\u8c37\u6b4c\u8fd8\u662f\u767e\u5ea6\uff0c\u56e0\u4eba\u800c\u5f02\uff0c\u5728\u56fd\u5185\uff0c\u8c37\u6b4c\u56e0\u4e3a\u4e00\u4e9b\u539f\u56e0\uff0c\u4f1a\u5bfc\u81f4\u52a0\u8f7d\u901f\u5ea6\u964d\u4f4e\uff0c\u5f53\u7136\u4f60\u4e5f\u53ef\u4ee5\u4e24\u8005\u90fd\u7528\u3002<\/p>\n<h2 dir=\"auto\">\u7cfb\u5217\u6587\u7ae0<\/h2>\n<p dir=\"auto\">\u535a\u5ba2\u642d\u5efa\u7cfb\u5217\u662f\u6211\u81f3\u4eca\u5199\u7684\u552f\u4e00\u4e00\u4e2a\u504f\u5b9e\u6218\u7684\u7cfb\u5217\u6559\u7a0b\uff0c\u8bb2\u89e3\u5982\u4f55\u4f7f\u7528 VuePress \u642d\u5efa\u535a\u5ba2\uff0c\u5e76\u90e8\u7f72\u5230 GitHub\u3001Gitee\u3001\u4e2a\u4eba\u670d\u52a1\u5668\u7b49\u5e73\u53f0\u3002<\/p>\n<ol dir=\"auto\">\n<li><a href=\"https:\/\/github.com\/mqyqingfeng\/Blog\/issues\/235\" data-hovercard-type=\"issue\" data-hovercard-url=\"\/mqyqingfeng\/Blog\/issues\/235\/hovercard\">\u4e00\u7bc7\u5e26\u4f60\u7528 VuePress + GitHub Pages \u642d\u5efa\u535a\u5ba2<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/mqyqingfeng\/Blog\/issues\/236\" data-hovercard-type=\"issue\" data-hovercard-url=\"\/mqyqingfeng\/Blog\/issues\/236\/hovercard\">\u4e00\u7bc7\u6559\u4f60\u4ee3\u7801\u540c\u6b65 GitHub \u548c Gitee<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/mqyqingfeng\/Blog\/issues\/237\" data-hovercard-type=\"issue\" data-hovercard-url=\"\/mqyqingfeng\/Blog\/issues\/237\/hovercard\">\u8fd8\u4e0d\u4f1a\u7528 GitHub Actions \uff1f\u770b\u770b\u8fd9\u7bc7<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/mqyqingfeng\/Blog\/issues\/238\" data-hovercard-type=\"issue\" data-hovercard-url=\"\/mqyqingfeng\/Blog\/issues\/238\/hovercard\">Gitee \u5982\u4f55\u81ea\u52a8\u90e8\u7f72 Pages\uff1f\u8fd8\u662f\u7528 GitHub Actions!<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/mqyqingfeng\/Blog\/issues\/239\" data-hovercard-type=\"issue\" data-hovercard-url=\"\/mqyqingfeng\/Blog\/issues\/239\/hovercard\">\u4e00\u4efd\u524d\u7aef\u591f\u7528\u7684 Linux \u547d\u4ee4<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/mqyqingfeng\/Blog\/issues\/242\" data-hovercard-type=\"issue\" data-hovercard-url=\"\/mqyqingfeng\/Blog\/issues\/242\/hovercard\">\u4e00\u4efd\u7b80\u5355\u591f\u7528\u7684 Nginx Location \u914d\u7f6e\u8bb2\u89e3<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/mqyqingfeng\/Blog\/issues\/243\" data-hovercard-type=\"issue\" data-hovercard-url=\"\/mqyqingfeng\/Blog\/issues\/243\/hovercard\">\u4e00\u7bc7\u6559\u4f60\u535a\u5ba2\u5982\u4f55\u90e8\u7f72\u5230\u81ea\u5df1\u7684\u670d\u52a1\u5668<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/mqyqingfeng\/Blog\/issues\/244\" data-hovercard-type=\"issue\" data-hovercard-url=\"\/mqyqingfeng\/Blog\/issues\/244\/hovercard\">VuePress \u535a\u5ba2\u4f18\u5316\u4e4b last updated \u6700\u540e\u66f4\u65b0\u65f6\u95f4\u5982\u4f55\u8bbe\u7f6e<\/a><\/li>\n<\/ol>\n<p dir=\"auto\">\u5fae\u4fe1\uff1a\u300cmqyqingfeng\u300d\uff0c\u52a0\u6211\u8fdb\u51b4\u7fbd\u552f\u4e00\u7684\u8bfb\u8005\u7fa4\u3002<\/p>\n<p dir=\"auto\">\u5982\u679c\u6709\u9519\u8bef\u6216\u8005\u4e0d\u4e25\u8c28\u7684\u5730\u65b9\uff0c\u8bf7\u52a1\u5fc5\u7ed9\u4e88\u6307\u6b63\uff0c\u5341\u5206\u611f\u8c22\u3002\u5982\u679c\u559c\u6b22\u6216\u8005 \u6709\u6240\u542f\u53d1\uff0c\u6b22\u8fce star\uff0c\u5bf9\u4f5c\u8005\u4e5f\u662f\u4e00\u79cd\u9f13\u52b1\u3002<\/p>\n<\/td>\n<p>\u6587\u7ae0\u8f6c\u8f7d\u81ea<a href='https:\/\/github.com\/mqyqingfeng\/Blog\/issues\/245'>https:\/\/github.com\/mqyqingfeng\/Blog\/issues\/245<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u524d\u8a00 \u5728 \u300a\u4e00\u7bc7\u5e26\u4f60\u7528 VuePress + Github Pages \u642d\u5efa\u535a\u5ba2\u300b\u4e2d\uff0c\u6211\u4eec\u4f7f\u7528 VuePress \u642d\u5efa\u4e86\u4e00\u4e2a\u535a\u5ba2\uff0c\u6700\u7ec8\u7684\u6548\u679c\u70b9\u51fb\u67e5\u770b\uff1aTypeS&#8230;<\/p>\n<p class=\"read-more\"><a class=\"btn btn-default\" href=\"https:\/\/www.lccc.top\/?p=1402\"> Read More<span class=\"screen-reader-text\">  Read More<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-1402","post","type-post","status-publish","format-standard","hentry","category-learn"],"_links":{"self":[{"href":"https:\/\/www.lccc.top\/index.php?rest_route=\/wp\/v2\/posts\/1402"}],"collection":[{"href":"https:\/\/www.lccc.top\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.lccc.top\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.lccc.top\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.lccc.top\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1402"}],"version-history":[{"count":1,"href":"https:\/\/www.lccc.top\/index.php?rest_route=\/wp\/v2\/posts\/1402\/revisions"}],"predecessor-version":[{"id":2392,"href":"https:\/\/www.lccc.top\/index.php?rest_route=\/wp\/v2\/posts\/1402\/revisions\/2392"}],"wp:attachment":[{"href":"https:\/\/www.lccc.top\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1402"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.lccc.top\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1402"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.lccc.top\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1402"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}