{"id":1397,"date":"2024-06-02T22:41:29","date_gmt":"2024-06-02T22:41:29","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%e5%a2%9e%e5%8a%a0-valine-%e8%af%84%e8%ae%ba%e5%8a%9f%e8%83%bd","status":"publish","type":"post","link":"https:\/\/www.lccc.top\/?p=1397","title":{"rendered":"VuePress \u535a\u5ba2\u4f18\u5316\u4e4b\u589e\u52a0 Valine \u8bc4\u8bba\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\u67e5\u770b\uff1a<a href=\"http:\/\/ts.yayujs.com\/\" rel=\"nofollow\">TypeScript \u4e2d\u6587\u6587\u6863<\/a>\u3002<\/p>\n<p dir=\"auto\">\u672c\u7bc7\u8bb2\u8bb2\u5982\u4f55\u4f7f\u7528 Valine \u5feb\u901f\u7684\u5b9e\u73b0\u8bc4\u8bba\u529f\u80fd\u3002<\/p>\n<h2 dir=\"auto\">\u4e3b\u9898\u5185\u7f6e<\/h2>\n<p dir=\"auto\">\u56e0\u4e3a\u6211\u7528\u7684\u662f <code class=\"notranslate\">vuepress-theme-reco<\/code> \u4e3b\u9898\uff0c\u4e3b\u9898\u5185\u7f6e\u8bc4\u8bba\u63d2\u4ef6 <code class=\"notranslate\">@vuepress-reco\/vuepress-plugin-comments<\/code>\uff0c\u53ef\u4ee5\u6839\u636e\u81ea\u5df1\u7684\u559c\u597d\u9009\u62e9 Valine \u6216\u8005 Vssue\u3002\u672c\u7bc7\u8bb2\u8bb2\u4f7f\u7528 Valine \u5b9e\u73b0\u8bc4\u8bba\u529f\u80fd\u7684\u5168\u8fc7\u7a0b\u3002<\/p>\n<h2 dir=\"auto\">Valine<\/h2>\n<p dir=\"auto\">\u5b98\u7f51\uff1a<a href=\"https:\/\/valine.js.org\/\" rel=\"nofollow\">https:\/\/valine.js.org\/<\/a><\/p>\n<p dir=\"auto\">Valine \u8bde\u751f\u4e8e2017\u5e748\u67087\u65e5\uff0c\u662f\u4e00\u6b3e\u57fa\u4e8e LeanCloud \u7684\u5feb\u901f\u3001\u7b80\u6d01\u4e14\u9ad8\u6548\u7684\u65e0\u540e\u7aef\u8bc4\u8bba\u7cfb\u7edf\u3002<\/p>\n<p dir=\"auto\">\u7279\u70b9\u662f\u5b89\u5168\u3001\u5feb\u901f\u3001\u652f\u6301 Emoji\u3001\u65e0\u540e\u7aef\u5b9e\u73b0\u3001MarkDown \u5168\u8bed\u6cd5\u652f\u6301\u3001\u8f7b\u91cf\u6613\u7528\u7b49\u3002<\/p>\n<h2 dir=\"auto\">LeanCloud<\/h2>\n<p dir=\"auto\">Valine \u662f\u57fa\u4e8e LeanCloud \u7684\uff0cLeanCloud \u5b98\u7f51\uff1a<a href=\"https:\/\/www.leancloud.cn\/\" rel=\"nofollow\">https:\/\/www.leancloud.cn\/<\/a><\/p>\n<p dir=\"auto\">LeanCloud \u662f\u4e00\u79cd Serverless \u4e91\u670d\u52a1\uff0c\u63d0\u4f9b\u4e86\u4e00\u7ad9\u5f0f\u7684\u540e\u7aef\u670d\u52a1\uff0c\u5982\u6570\u636e\u5b58\u50a8\u3001\u5373\u65f6\u901a\u8baf\u7b49\u7b49\uff0c\u7b80\u5355\u7684\u6765\u8bf4\uff0c\u6bd4\u5982\u6211\u8981\u5b9e\u73b0\u4e00\u4e2a\u6570\u636e\u5b58\u50a8\u529f\u80fd\uff0c\u6211\u53ea\u7528\u5728 LeanCloud \u6ce8\u518c\u4e00\u4e2a\u8d26\u53f7\uff0c\u83b7\u5f97\u5bf9\u5e94\u7684 App ID \u548c App Key\uff0c\u7136\u540e\u8c03\u7528\u63d0\u4f9b\u7684 API \u5373\u53ef\u8fdb\u884c\u6570\u636e\u5b58\u50a8\uff0c\u4ee5\u4e0b\u662f\u4e00\u4e2a\u4f7f\u7528 JavaScript \u8bed\u6cd5\u7684\u65b9\u5f0f\uff1a<\/p>\n<p dir=\"auto\"><a target=\"_blank\" rel=\"noopener noreferrer nofollow\" href=\"\/\/www.lccc.top\/wp-content\/uploads\/pic\/mqyqingfen\/33ea25aea1b9742f6636da37e1cc22e725390926.jpg\"><img decoding=\"async\" src=\"\/\/www.lccc.top\/wp-content\/uploads\/pic\/mqyqingfen\/33ea25aea1b9742f6636da37e1cc22e725390926.jpg\" alt=\"\" data-canonical-src=\"https:\/\/p3-juejin.byteimg.com\/tos-cn-i-k3u1fbpfcp\/46067b5923264d58a9130dbe7b4f4538~tplv-k3u1fbpfcp-zoom-1.image\" style=\"max-width: 100%;\"><\/a><\/p>\n<h2 dir=\"auto\">\u5f00\u59cb<\/h2>\n<p dir=\"auto\">\u6709\u4e86\u4e00\u4e2a\u57fa\u672c\u7684\u4e86\u89e3\uff0c\u6211\u4eec\u5f00\u59cb\u5427\u3002<\/p>\n<h3 dir=\"auto\">1. \u6ce8\u518c<\/h3>\n<p dir=\"auto\">\u6ce8\u518c LeanCloud\uff1a<a href=\"https:\/\/leancloud.cn\/dashboard\/login.html#\/signup\" rel=\"nofollow\">https:\/\/leancloud.cn\/dashboard\/login.html#\/signup<\/a><\/p>\n<p dir=\"auto\">\u6ce8\u610f\u8981\u4f7f\u7528 LeanCloud \u7684\u670d\u52a1\uff0c\u9700\u8981\u5b8c\u6210\u5b9e\u540d\u8ba4\u8bc1\uff0c\u5728\u586b\u5199\u5b8c\u59d3\u540d\u548c\u8eab\u4efd\u8bc1\u53f7\u540e\uff0c\u9700\u8981\u4f7f\u7528\u5bf9\u5e94\u540d\u5b57\u7684\u652f\u4ed8\u5b9d\u8d26\u53f7\u626b\u7801\u8fdb\u884c\u8ba4\u8bc1\uff0c\u626b\u7801\u5b8c\u540e\u5373\u53ef\u5b8c\u6210\u5b9e\u540d\u8ba4\u8bc1\u3002<\/p>\n<h3 dir=\"auto\">2. \u521b\u5efa\u5e94\u7528<\/h3>\n<p dir=\"auto\"><a href=\"https:\/\/leancloud.cn\/dashboard\/login.html#\/signin\" rel=\"nofollow\">\u767b\u5f55<\/a>\u540e, \u8fdb\u5165<a href=\"https:\/\/leancloud.cn\/dashboard\/applist.html#\/apps\" rel=\"nofollow\">\u63a7\u5236\u53f0<\/a>\u540e\u70b9\u51fb\u5de6\u4e0b\u89d2\u300c\u521b\u5efa\u5e94\u7528\u300d\uff1a<\/p>\n<p dir=\"auto\"><a target=\"_blank\" rel=\"noopener noreferrer nofollow\" href=\"\/\/www.lccc.top\/wp-content\/uploads\/pic\/mqyqingfen\/e7bb29d7209fcfbed1c87f10df8a4ed2b0e87eb2.jpg\"><img decoding=\"async\" src=\"\/\/www.lccc.top\/wp-content\/uploads\/pic\/mqyqingfen\/e7bb29d7209fcfbed1c87f10df8a4ed2b0e87eb2.jpg\" alt=\"\" data-canonical-src=\"https:\/\/p3-juejin.byteimg.com\/tos-cn-i-k3u1fbpfcp\/6c292eae66494da58accb14666e162c2~tplv-k3u1fbpfcp-zoom-1.image\" style=\"max-width: 100%;\"><\/a><\/p>\n<p dir=\"auto\">\u521b\u5efa\u5e94\u7528\u91cc\uff0c\u8fd9\u91cc\u6211\u4eec\u9009\u62e9\u5f00\u53d1\u7248\uff0c\u5f00\u53d1\u7248\u6709\u7528\u91cf\u9650\u5236\uff0c\u6bd4\u5982 API \u8bf7\u6c42 3W \u6b21\u6bcf\u5929\uff0c\u6570\u636e\u5b58\u50a8\u7a7a\u95f4 1GB\uff0c\u5bf9\u4e8e\u4e2a\u4eba\u9879\u76ee\u662f\u591f\u7528\u7684\uff1a<\/p>\n<p dir=\"auto\"><a target=\"_blank\" rel=\"noopener noreferrer nofollow\" href=\"\/\/www.lccc.top\/wp-content\/uploads\/pic\/mqyqingfen\/9e43535f32904424ebf205e99c37d54d223aefde.jpg\"><img decoding=\"async\" src=\"\/\/www.lccc.top\/wp-content\/uploads\/pic\/mqyqingfen\/9e43535f32904424ebf205e99c37d54d223aefde.jpg\" alt=\"\" data-canonical-src=\"https:\/\/p3-juejin.byteimg.com\/tos-cn-i-k3u1fbpfcp\/623907f3550e4a1db25b5ba26ae33f7b~tplv-k3u1fbpfcp-zoom-1.image\" style=\"max-width: 100%;\"><\/a><\/p>\n<h3 dir=\"auto\">3. \u67e5\u770b\u5e94\u7528\u51ed\u8bc1<\/h3>\n<p dir=\"auto\">\u521b\u5efa\u5b8c\u540e\uff0c\u70b9\u51fb\u8fdb\u5165\u5e94\u7528\u7684\u7ba1\u7406\u540e\u53f0\uff0c\u9009\u62e9 \u300c\u8bbe\u7f6e \u300d- \u300c\u5e94\u7528\u51ed\u8bc1\u300d\uff0c\u7136\u540e\u5c31\u80fd\u770b\u5230\u4f60\u7684 APP ID \u548c APP Key\u4e86\uff1a<\/p>\n<p dir=\"auto\"><a target=\"_blank\" rel=\"noopener noreferrer nofollow\" href=\"\/\/www.lccc.top\/wp-content\/uploads\/pic\/mqyqingfen\/d85ba8c62a6d4c661b1e892bf98f202693f4e976.jpg\"><img decoding=\"async\" src=\"\/\/www.lccc.top\/wp-content\/uploads\/pic\/mqyqingfen\/d85ba8c62a6d4c661b1e892bf98f202693f4e976.jpg\" alt=\"\" data-canonical-src=\"https:\/\/p3-juejin.byteimg.com\/tos-cn-i-k3u1fbpfcp\/607ae11dc3e04d9296ebff6c78e867cc~tplv-k3u1fbpfcp-zoom-1.image\" style=\"max-width: 100%;\"><\/a><\/p>\n<h3 dir=\"auto\">4. VuePress \u5f15\u5165<\/h3>\n<p dir=\"auto\">\u4fee\u6539 config.js\uff1a<\/p>\n<div class=\"highlight highlight-source-js notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"module.exports = {\n  theme: 'reco',\n  themeConfig: {\n    valineConfig: {\n      appId: '...',\/\/ your appId\n      appKey: '...', \/\/ your appKey\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\">theme<\/span>: <span class=\"pl-s\">'reco'<\/span><span class=\"pl-kos\">,<\/span>\n  <span class=\"pl-c1\">themeConfig<\/span>: <span class=\"pl-kos\">{<\/span>\n    <span class=\"pl-c1\">valineConfig<\/span>: <span class=\"pl-kos\">{<\/span>\n      <span class=\"pl-c1\">appId<\/span>: <span class=\"pl-s\">'...'<\/span><span class=\"pl-kos\">,<\/span><span class=\"pl-c\">\/\/ your appId<\/span>\n      <span class=\"pl-c1\">appKey<\/span>: <span class=\"pl-s\">'...'<\/span><span class=\"pl-kos\">,<\/span> <span class=\"pl-c\">\/\/ your appKey<\/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\">5. \u6548\u679c\u5c55\u793a<\/h3>\n<p dir=\"auto\">\u5728\u6bcf\u7bc7\u6587\u7ae0\u7684\u5e95\u90e8\u5c31\u4f1a\u51fa\u73b0\u4e00\u4e2a\u8bc4\u8bba\u680f\uff1a<\/p>\n<p dir=\"auto\"><a target=\"_blank\" rel=\"noopener noreferrer nofollow\" href=\"\/\/www.lccc.top\/wp-content\/uploads\/pic\/mqyqingfen\/a7f68120d7460c934f771432a0a365a41329dd7f.jpg\"><img decoding=\"async\" src=\"\/\/www.lccc.top\/wp-content\/uploads\/pic\/mqyqingfen\/a7f68120d7460c934f771432a0a365a41329dd7f.jpg\" alt=\"\" data-canonical-src=\"https:\/\/p3-juejin.byteimg.com\/tos-cn-i-k3u1fbpfcp\/d0fd9c414c034a9cb2e4f16c4f53214e~tplv-k3u1fbpfcp-zoom-1.image\" style=\"max-width: 100%;\"><\/a><\/p>\n<h3 dir=\"auto\">6. \u4e0d\u5c55\u793a\u8bc4\u8bba<\/h3>\n<p dir=\"auto\">\u5982\u679c\u4f60\u60f3\u9ed8\u8ba4\u4e0d\u52a0\u8f7d\u8bc4\u8bba\uff0c\u800c\u53ea\u5728\u67d0\u4e9b\u9875\u9762\u663e\u793a\u8bc4\u8bba\u529f\u80fd\uff0c\u53ef\u4ee5\u5728 <code class=\"notranslate\">valineConfig<\/code> \u6216 <code class=\"notranslate\">vssueConfig<\/code> \u4e2d\u8bbe\u7f6e <code class=\"notranslate\">showComment: false<\/code>\uff0c\u5e76\u5728\u9700\u8981\u5c55\u793a\u8bc4\u8bba\u7684\u9875\u9762 \u8bbe\u7f6e <code class=\"notranslate\">isShowComments: true<\/code>\u3002<\/p>\n<p dir=\"auto\">\u5982\u679c\u4ec5\u662f\u67d0\u7bc7\u6587\u7ae0\u4e0d\u60f3\u8bbe\u7f6e\u5f00\u542f\u8bc4\u8bba\u529f\u80fd\uff0c\u53ef\u4ee5\u5728 <code class=\"notranslate\">front-matter<\/code> \u8bbe\u7f6e <code class=\"notranslate\">isShowComments: false<\/code>\u3002<\/p>\n<p dir=\"auto\">\u66f4\u591a\u7684\u914d\u7f6e\u548c\u6ce8\u610f\u7ec6\u8282\uff0c\u53c2\u8003\uff1a<\/p>\n<ol dir=\"auto\">\n<li><a href=\"https:\/\/vuepress-theme-reco.recoluan.com\/views\/1.x\/valine.html\" rel=\"nofollow\">vuepress-theme-reco \u8bc4\u8bba\u529f\u80fd<\/a><\/li>\n<li><a href=\"https:\/\/valine.js.org\/configuration.html\" rel=\"nofollow\">Valine \u914d\u7f6e\u9879<\/a><\/li>\n<\/ol>\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\u9884\u8ba1 20 \u7bc7\u5de6\u53f3\uff0c\u8bb2\u89e3\u5982\u4f55\u4f7f\u7528 VuePress \u642d\u5efa\u3001\u4f18\u5316\u535a\u5ba2\uff0c\u5e76\u90e8\u7f72\u5230 GitHub\u3001Gitee\u3001\u79c1\u6709\u670d\u52a1\u5668\u7b49\u5e73\u53f0\u3002\u672c\u7bc7\u4e3a\u7b2c 25 \u7bc7\uff0c\u5168\u7cfb\u5217\u6587\u7ae0\u5730\u5740\uff1a<a href=\"https:\/\/github.com\/mqyqingfeng\/Blog\">https:\/\/github.com\/mqyqingfeng\/Blog<\/a><\/p>\n<p dir=\"auto\">\u5fae\u4fe1\uff1a\u300cmqyqingfeng\u300d\uff0c\u52a0\u6211\u8fdb\u51b4\u7fbd\u552f\u4e00\u7684\u8bfb\u8005\u7fa4\u3002<\/p>\n<\/td>\n<p>\u6587\u7ae0\u8f6c\u8f7d\u81ea<a href='https:\/\/github.com\/mqyqingfeng\/Blog\/issues\/268'>https:\/\/github.com\/mqyqingfeng\/Blog\/issues\/268<\/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\u67e5\u770b\uff1aTypeScr&#8230;<\/p>\n<p class=\"read-more\"><a class=\"btn btn-default\" href=\"https:\/\/www.lccc.top\/?p=1397\"> 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-1397","post","type-post","status-publish","format-standard","hentry","category-learn"],"_links":{"self":[{"href":"https:\/\/www.lccc.top\/index.php?rest_route=\/wp\/v2\/posts\/1397"}],"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=1397"}],"version-history":[{"count":1,"href":"https:\/\/www.lccc.top\/index.php?rest_route=\/wp\/v2\/posts\/1397\/revisions"}],"predecessor-version":[{"id":1484,"href":"https:\/\/www.lccc.top\/index.php?rest_route=\/wp\/v2\/posts\/1397\/revisions\/1484"}],"wp:attachment":[{"href":"https:\/\/www.lccc.top\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1397"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.lccc.top\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1397"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.lccc.top\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1397"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}