{"id":3992,"date":"2019-12-15T17:00:20","date_gmt":"2019-12-15T09:00:20","guid":{"rendered":"https:\/\/blog.naibabiji.com\/?p=3992"},"modified":"2019-12-21T17:20:05","modified_gmt":"2019-12-21T09:20:05","slug":"wordpress-jsdelivr-github","status":"publish","type":"post","link":"https:\/\/blog.naibabiji.com\/skill\/wordpress-jsdelivr-github.html","title":{"rendered":"WordPress\u6700\u4f73\u514d\u8d39CDN\uff1ajsDelivr + Github"},"content":{"rendered":"<p>\u5927\u5bb6\u597d\uff0c\u6211\u662f\u96f7\u950b\u54e5\u3002\u6700\u8fd1\u96f7\u950b\u54e5\u7684\u535a\u5ba2\u642d\u5efa\u5728\u5783\u573e\u4e3b\u673a\u4e0a\uff0c\u5ef6\u8fdf\u975e\u5e38\u9ad8\uff0c\u6ca1\u6709\u5907\u6848\u7684\u539f\u56e0\uff0c\u6ca1\u529e\u6cd5\u7528\u56fd\u5185\u7684CDN\uff0c\u8bd5\u8fc7\u300ccloudflare\u300d\u7684\u514d\u8d39CDN\uff0c\u6548\u679c\u4e5f\u4e0d\u662f\u5f88\u7406\u60f3\uff0c\u540e\u6765\u53d1\u73b0\u4e86jsDelivr + Github\u624d\u662f\u514d\u8d39\u7684\u6700\u4f73CDN\u3002<\/p>\n<h2>jsDelivr\u4ecb\u7ecd<\/h2>\n<p>jsDelivr\u662f\u4e00\u4e2a\u63d0\u4f9b\u6570\u5343\u79cdJavascript\u3001CSS\u7b49\u8d85\u8fc71650\u591a\u79cd Libraries \u52a0\u901f\u7684\u514d\u8d39CDN\u670d\u52a1\uff0c\u652f\u6301\u7ed9Github\u3001WordPress\u3001NPM\u514d\u8d39\u63d0\u4f9bCDN\u52a0\u901f\u3002\u800c\u4e14\u56fd\u5185\u4e5f\u6709 CDN \u8282\u70b9\uff0c\u901f\u5ea6\u975e\u5e38\u5feb\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-4007\" src=\"https:\/\/edgeone.naibabiji.com\/wp-content\/uploads\/2019\/12\/20191215040903.png\" alt=\"\" width=\"619\" height=\"131\" \/><\/p>\n<p><strong>jsDelivr\u5b98\u65b9\uff1a<\/strong>https:\/\/www.jsdelivr.com\/<\/p>\n<h2>Github\u4ecb\u7ecd<\/h2>\n<p>Github\u76ee\u524d\u6700\u597d\u7528\u7684\u514d\u8d39\u5f00\u6e90\u9879\u76ee\u6258\u7ba1\u7ad9\u70b9\uff0c\u4f17\u591a\u5f00\u6e90\u9879\u76ee\u90fd\u6258\u7ba1\u5728Github\uff0c\u76ee\u524dGithub\u5df2\u88ab\u5fae\u8f6f\u6536\u8d2d\u4e86\u3002<\/p>\n<p><strong>Github\u5b98\u65b9\uff1a<\/strong>https:\/\/github.com\/<\/p>\n<h2>\u5229\u7528 jsDelivr + Github \u7ed9 WordPress \u514d\u8d39\u52a0\u901f<\/h2>\n<p>1.\u6ce8\u518c Github\u00a0 \u8d26\u53f7<\/p>\n<p>2.\u65b0\u5efaGithub\u4ed3\u5e93\uff0cRepository name\uff1a\u8f93\u5165\u4ed3\u5e93\u540d\u79f0\uff0c\u7136\u540e\u70b9\u51fb\u300cCreate repository\u300d\u5f00\u59cb\u521b\u5efa\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-3993\" src=\"https:\/\/edgeone.naibabiji.com\/wp-content\/uploads\/2019\/12\/wordpress-jsdelivr-github.png\" alt=\"\" width=\"751\" height=\"651\" \/><\/p>\n<p>3.\u70b9\u51fb\u300cUpload files\u300d\u4e0a\u4f20\u4f60\u8981CDN\u7684\u6587\u4ef6\uff0c\u5982CSS\u3001JS\u3001\u56fe\u7247\u7b49\u2026\u2026<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-4000\" src=\"https:\/\/edgeone.naibabiji.com\/wp-content\/uploads\/2019\/12\/wordpress-jsdelivr-2.png\" alt=\"\" width=\"1001\" height=\"529\" \/><\/p>\n<p>4.\u53d1\u5e03\u4ed3\u5e93\uff0c\u70b9\u51fb\u300crelease\u300d\u53d1\u5e03\uff0c\u8f93\u5165\u81ea\u5b9a\u4e49\u53d1\u5e03\u7248\u672c\u53f7\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-4001\" src=\"https:\/\/edgeone.naibabiji.com\/wp-content\/uploads\/2019\/12\/wordpress-jsdelivr-3.png\" alt=\"\" width=\"763\" height=\"593\" \/><\/p>\n<p>5.\u4f7f\u7528 jsDelivr \u6765\u5f15\u7528\u8d44\u6e90<\/p>\n<p>https:\/\/cdn.jsdelivr.net\/gh\/<span style=\"color: #ff0000;\">\u4f60\u7684\u7528\u6237\u540d<\/span>\/<span style=\"color: #ff0000;\">\u4f60\u7684\u4ed3\u5e93\u540d@\u53d1\u5e03\u7684\u7248\u672c\u53f7<\/span>\/<span style=\"color: #ff0000;\">\u6587\u4ef6\u8def\u5f84<\/span><\/p>\n<p>\u4f8b\u5982\uff1ahttps:\/\/cdn.jsdelivr.net\/gh\/woshileifeng1\/wordpresscdn@1.0\/aplayer.min.js<\/p>\n<p>\u5982\u679c\u4e0d\u9700\u8981\u7248\u672c\u53f7\u533a\u5206\uff0c\u4e5f\u53ef\u4ee5\u76f4\u63a5\uff1a<\/p>\n<p>https:\/\/cdn.jsdelivr.net\/gh\/woshileifeng1\/wordpresscdn\/aplayer.min.js<\/p>\n<p>6.\u63a5\u4e0b\u6765\u628aCDN\u597d\u7684CSS\u548cJS\u7b49\u6587\u4ef6\u5730\u5740\uff0c\u90fd\u66ff\u6362\u5230\u4f60\u4e3b\u9898\u91cc\u9762\u53bb\u3002<\/p>\n<p>7.\u53ef\u4ee5\u5728\u4f60\u4e3b\u9898\u7684\u5934\u90e8\u6587\u4ef6\u52a0\u5165 &lt;link rel=&#8217;dns-prefetch&#8217; href=&#8217;\/\/cdn.jsdelivr.net&#8217; \/&gt; \u9884\u8bfbDNS\uff0c\u52a0\u5feb\u89e3\u6790<\/p>\n<h2>GitHub+jsDelivr+PicGo\u642d\u5efa\u514d\u8d39\u56fe\u5e8a<\/h2>\n<p>1.\u65b0\u5efa\u7acb\u4e00\u4e2agithub\u4ed3\u5e93\uff0c\u4e13\u95e8\u5b58\u653e\u4e0a\u4f20\u7684\u56fe\u7247\u3002<\/p>\n<p>2.\u751f\u6210Access token<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-4003\" src=\"https:\/\/edgeone.naibabiji.com\/wp-content\/uploads\/2019\/12\/wordpress-jsdelivr-5.png\" alt=\"\" width=\"1427\" height=\"704\" \/><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-4004\" src=\"https:\/\/edgeone.naibabiji.com\/wp-content\/uploads\/2019\/12\/wordpress-jsdelivr-6.png\" alt=\"\" width=\"1420\" height=\"748\" \/><\/p>\n<p>3.\u4e0b\u8f7dPicGo\u8f6f\u4ef6\uff1ahttps:\/\/github.com\/Molunerfinn\/picgo\/releases<\/p>\n<p>4.\u586b\u5165\u521a\u624d\u5728Github\u521b\u5efa\u7684\u4fe1\u606f\uff0c\u6307\u5b9a\u5b58\u50a8\u6587\u4ef6\u5939\u7684\u8def\u5f84\uff0cPicGo\u4e0a\u4f20\u6587\u4ef6\u7684\u65f6\u5019\uff0c\u5c06\u81ea\u52a8\u5728github\u4ed3\u5e93\u4e2d\u521b\u5efa\u6b64\u6587\u4ef6\u5939\u3002<\/p>\n<p>\u81ea\u5b9a\u4e49\u57df\u540d\uff1ahttps:\/\/cdn.jsdelivr.net\/gh\/\u7528\u6237\u540d\/\u56fe\u5e8a\u4ed3\u5e93\u540d<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-4005\" src=\"https:\/\/edgeone.naibabiji.com\/wp-content\/uploads\/2019\/12\/wordpress-jsdelivr-7.png\" alt=\"\" width=\"796\" height=\"451\" \/><\/p>\n<p>5.\u53ef\u4ee5\u5f00\u59cb\u4e0a\u4f20\u56fe\u7247\u5566\uff0c\u5728\u4e0a\u4f20\u56fe\u7247\u4e4b\u540e\u81ea\u52a8\u4f1a\u5c06\u56fe\u7247\u94fe\u63a5\u590d\u5236\u5230\u4f60\u7684\u526a\u8d34\u677f\u91cc\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-4006\" src=\"https:\/\/edgeone.naibabiji.com\/wp-content\/uploads\/2019\/12\/wordpress-jsdelivr-8.png\" alt=\"\" width=\"790\" height=\"448\" \/><\/p>\n<h2>\u603b\u7ed3<\/h2>\n<p>\u867d\u7136\u8fd9\u79cd\u514d\u8d39CDN\u6298\u817e\u8d77\u6765\u6709\u70b9\u9ebb\u70e6\uff0c\u4e0d\u8fc7\u6bd5\u7adf\u514d\u8d39\uff0c\u8fd8\u53ef\u4ee5\u4f5c\u4e3a\u56fe\u5e8a\u7528\u80fd\u8282\u7701\u4f60\u7684\u4e3b\u673a\u6d41\u91cf\uff0c\u52a0\u4e0ajsDelivr \u548c Github \u90fd\u662f\u5927\u5382\u8fd8\u662f\u6bd4\u8f83\u653e\u5fc3\u7684\u3002\u559c\u6b22\u778e\u6298\u817e\u7684\uff0c\u53ef\u4ee5\u628a\u6574\u7ad9\u90fd\u4e22\u5230 Github \u4e0a\u9762\uff0c\u7136\u540e\u901a\u8fc7\u63d2\u4ef6\u300c<a href=\"https:\/\/blog.naibabiji.com\/skill\/wp-super-cache.html\">WP Super Cache<\/a>\u300d\u91cc\u9762\u7684CDN\u529f\u80fd\u6765\u5904\u7406\u9759\u6001\u8d44\u6e90\uff0c\u8fd9\u91cc\u5c31\u4e0d\u7ed9\u5927\u5bb6\u6f14\u793a\u4e86\uff0c\u6709\u5174\u8da3\u81ea\u5df1\u6298\u817e\u3002<\/p>\n<p>\u6700\u540e\u4e0d\u60f3\u8fd9\u4e48\u9ebb\u70e6\u7684\uff0c\u53ef\u4ee5\u770b\u8fd9\u7bc7 # <a href=\"https:\/\/blog.naibabiji.com\/skill\/pan-duan-cdn.html\">\u6700\u7b80\u5355\u5224\u65ad\u7f51\u7ad9\u7528\u6ca1\u7528CDN\u52a0\u901f\u7684\u529e\u6cd5_\u514d\u8d39CDN\u670d\u52a1\u63a8\u8350<\/a><\/p>\n\n\n<div class=\"kk-star-ratings kksr-auto kksr-align-center kksr-valign-bottom\"\n    data-payload='{&quot;align&quot;:&quot;center&quot;,&quot;id&quot;:&quot;3992&quot;,&quot;slug&quot;:&quot;default&quot;,&quot;valign&quot;:&quot;bottom&quot;,&quot;ignore&quot;:&quot;&quot;,&quot;reference&quot;:&quot;auto&quot;,&quot;class&quot;:&quot;&quot;,&quot;count&quot;:&quot;5&quot;,&quot;legendonly&quot;:&quot;&quot;,&quot;readonly&quot;:&quot;&quot;,&quot;score&quot;:&quot;5&quot;,&quot;starsonly&quot;:&quot;&quot;,&quot;best&quot;:&quot;5&quot;,&quot;gap&quot;:&quot;4&quot;,&quot;greet&quot;:&quot;\u7ed9\u672c\u6587\u6253\u5206 post&quot;,&quot;legend&quot;:&quot;5\\\/5 - (5 votes)&quot;,&quot;size&quot;:&quot;24&quot;,&quot;title&quot;:&quot;WordPress\u6700\u4f73\u514d\u8d39CDN\uff1ajsDelivr + Github&quot;,&quot;width&quot;:&quot;138&quot;,&quot;_legend&quot;:&quot;{score}\\\/{best} - ({count} {votes})&quot;,&quot;font_factor&quot;:&quot;1.25&quot;}'>\n            \n<div class=\"kksr-stars\">\n    \n<div class=\"kksr-stars-inactive\">\n            <div class=\"kksr-star\" data-star=\"1\" style=\"padding-right: 4px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n        <\/div>\n            <div class=\"kksr-star\" data-star=\"2\" style=\"padding-right: 4px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n        <\/div>\n            <div class=\"kksr-star\" data-star=\"3\" style=\"padding-right: 4px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n        <\/div>\n            <div class=\"kksr-star\" data-star=\"4\" style=\"padding-right: 4px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n        <\/div>\n            <div class=\"kksr-star\" data-star=\"5\" style=\"padding-right: 4px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n        <\/div>\n    <\/div>\n    \n<div class=\"kksr-stars-active\" style=\"width: 138px;\">\n            <div class=\"kksr-star\" style=\"padding-right: 4px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n        <\/div>\n            <div class=\"kksr-star\" style=\"padding-right: 4px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n        <\/div>\n            <div class=\"kksr-star\" style=\"padding-right: 4px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n        <\/div>\n            <div class=\"kksr-star\" style=\"padding-right: 4px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n        <\/div>\n            <div class=\"kksr-star\" style=\"padding-right: 4px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n        <\/div>\n    <\/div>\n<\/div>\n                \n\n<div class=\"kksr-legend\" style=\"font-size: 19.2px;\">\n            5\/5 - (5 votes)    <\/div>\n    <\/div>\n","protected":false},"excerpt":{"rendered":"<p>\u5927\u5bb6\u597d\uff0c\u6211\u662f\u96f7\u950b\u54e5\u3002\u6700\u8fd1\u96f7\u950b\u54e5\u7684\u535a\u5ba2\u642d\u5efa\u5728\u5783\u573e\u4e3b\u673a\u4e0a\uff0c\u5ef6\u8fdf\u975e\u5e38\u9ad8\uff0c\u6ca1\u6709\u5907\u6848\u7684\u539f\u56e0\uff0c\u6ca1\u529e\u6cd5\u7528\u56fd\u5185\u7684CDN\uff0c\u8bd5\u8fc7\u300c [&hellip;]<\/p>\n","protected":false},"author":63,"featured_media":4008,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"slim_seo":{"title":"WordPress\u6700\u4f73\u514d\u8d39CDN\uff1ajsDelivr + Github - \u5976\u7238\u5efa\u7ad9\u7b14\u8bb0","description":"\u5927\u5bb6\u597d\uff0c\u6211\u662f\u96f7\u950b\u54e5\u3002\u6700\u8fd1\u96f7\u950b\u54e5\u7684\u535a\u5ba2\u642d\u5efa\u5728\u5783\u573e\u4e3b\u673a\u4e0a\uff0c\u5ef6\u8fdf\u975e\u5e38\u9ad8\uff0c\u6ca1\u6709\u5907\u6848\u7684\u539f\u56e0\uff0c\u6ca1\u529e\u6cd5\u7528\u56fd\u5185\u7684CDN\uff0c\u8bd5\u8fc7\u300ccloudflare\u300d\u7684\u514d\u8d39CDN\uff0c\u6548\u679c\u4e5f\u4e0d\u662f\u5f88\u7406\u60f3\uff0c\u540e\u6765\u53d1\u73b0\u4e86jsDelivr + Github\u624d\u662f\u514d\u8d39\u7684\u6700\u4f73CDN\u3002 jsDelivr\u4ecb\u7ecd jsDelivr\u662f\u4e00\u4e2a\u63d0\u4f9b\u6570\u5343\u79cdJavascript\u3001CSS\u7b49\u8d85\u8fc7"},"footnotes":""},"categories":[142],"tags":[],"class_list":["post-3992","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-skill"],"_links":{"self":[{"href":"https:\/\/blog.naibabiji.com\/wp-json\/wp\/v2\/posts\/3992","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.naibabiji.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.naibabiji.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.naibabiji.com\/wp-json\/wp\/v2\/users\/63"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.naibabiji.com\/wp-json\/wp\/v2\/comments?post=3992"}],"version-history":[{"count":0,"href":"https:\/\/blog.naibabiji.com\/wp-json\/wp\/v2\/posts\/3992\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blog.naibabiji.com\/wp-json\/wp\/v2\/media\/4008"}],"wp:attachment":[{"href":"https:\/\/blog.naibabiji.com\/wp-json\/wp\/v2\/media?parent=3992"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.naibabiji.com\/wp-json\/wp\/v2\/categories?post=3992"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.naibabiji.com\/wp-json\/wp\/v2\/tags?post=3992"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}