\u5728\u672c\u5730\u6d4b\u8bd5\u4e2d\uff0c\u6709\u65f6\u9700\u8981\u8986\u76d6\u914d\u7f6e\u9009\u9879\u3002\u6211\u7684\u7f51\u7ad9\u7684\u00a0\u5f53\u524d _config.yml\u00a0\u6709\u4ee5\u4e0b\u8bbe\u7f6e\uff1a<\/p>\n
# Jekyll Configuration\r\n\u00a0\r\n# Site Settings\r\nurl: \"https:\/\/notes.ayushsharma.in\"\r\nwebsite_url: \"https:\/\/notes.ayushsharma.in\/\"\r\ntitle: ayush sharma's notes ☕ + 🎧 + 🕹️\r\nemail: ayush@ayushsharma.in\r\nimages-path: \/static\/images\/\r\nvideos-path: \/static\/videos\/\r\njs-path: \/static\/js\/\r\nbaseurl: \"\" # the subpath of your site, e.g. \/blog<\/pre>\n\u7531\u4e8e\u672c\u5730\u7684 jekyll serve URL \u662f http:\/\/localhost:4000\uff0c\u4e0a\u9762\u5b9a\u4e49\u7684 URL \u5c31\u4e0d\u80fd\u7528\u4e86\u3002\u6211\u53ef\u4ee5\u521b\u5efa\u4e00\u4e2a _config.yml \u7684\u526f\u672c _config-local.yml \u5e76\u66ff\u6362\u6240\u6709\u7684\u503c\u3002\u4f46\u8fd8\u6709\u4e00\u4e2a\u66f4\u7b80\u5355\u7684\u9009\u62e9\u3002<\/p>\n
Jekyll \u5141\u8bb8\u6307\u5b9a\u591a\u4e2a\u914d\u7f6e\u6587\u4ef6\uff0c\u540e\u9762\u7684\u58f0\u660e\u8986\u76d6\u524d\u9762\u7684\u58f0\u660e\u3002\u8fd9\u610f\u5473\u7740\u6211\u53ef\u4ee5\u7528\u4ee5\u4e0b\u4ee3\u7801\u5b9a\u4e49\u4e00\u4e2a\u65b0\u7684 _config-local.yml\uff1a<\/p>\n
url:\"\"<\/pre>\n\u7136\u540e\u6211\u53ef\u4ee5\u628a\u4e0a\u8ff0\u6587\u4ef6\u548c\u6211\u7684\u4e3b\u00a0_config.yml\u00a0\u7ed3\u5408\u8d77\u6765\uff0c\u50cf\u8fd9\u6837\uff1a<\/p>\n
bundle exec jekyll serve --incremental --config _config.yml,_config-local.yml<\/pre>\n\u901a\u8fc7\u5408\u5e76\u8fd9\u4e24\u4e2a\u6587\u4ef6\uff0c\u8fd9\u4e2a\u00a0jekyll serve\u00a0\u7684\u00a0url\u00a0\u7684\u6700\u7ec8\u503c\u5c06\u662f\u7a7a\u767d\u3002\u8fd9\u5c31\u628a\u6211\u7f51\u7ad9\u4e2d\u5b9a\u4e49\u7684\u6240\u6709 URL \u53d8\u6210\u4e86\u76f8\u5bf9\u7684 URL\uff0c\u5e76\u4f7f\u5b83\u4eec\u5728\u6211\u7684\u672c\u5730\u7b14\u8bb0\u672c\u7535\u8111\u4e0a\u5de5\u4f5c\u3002<\/p>\n
C\u7ed3\u5408\u52a8\u6001\u914d\u7f6e\u6587\u4ef6<\/strong><\/div>\n\u4e00\u4e2a\u7b80\u5355\u7684\u4f8b\u5b50\uff0c\u5047\u8bbe\u4f60\u60f3\u5728\u4f60\u7684\u7f51\u7ad9\u4e0a\u663e\u793a\u5f53\u524d\u65e5\u671f\u3002\u5b83\u7684 bash \u547d\u4ee4\u662f\uff1a<\/p>\n
> date '+%A, %d %B %Y'\r\nSaturday, 16 October 2021<\/pre>\n\u6211\u77e5\u9053\u6211\u4e5f\u53ef\u4ee5 \u4f7f\u7528 Jekyll \u7684 _config.yml \u7684\u81ea\u5b9a\u4e49\u5185\u5bb9\u3002\u6211\u5c06\u4e0a\u8ff0\u65e5\u671f\u8f93\u51fa\u5230\u4e00\u4e2a\u65b0\u7684 Jekyll \u914d\u7f6e\u6587\u4ef6\u4e2d\u3002<\/p>\n
my_date=`date '+%A, %d %B %Y'`; echo 'my_date: \"'$my_date'\"' > _config-data.yml<\/pre>\n\u73b0\u5728\u00a0_config-data.yml\u00a0\u5305\u542b\uff1a<\/p>\n
my_date: \"Saturday, 16 October 2021\"<\/pre>\n\u6211\u53ef\u4ee5\u628a\u6211\u7684\u65b0\u914d\u7f6e\u6587\u4ef6\u548c\u5176\u4ed6\u6587\u4ef6\u7ed3\u5408\u8d77\u6765\uff0c\u5728\u6211\u7684\u7f51\u7ad9\u4e0a\u4f7f\u7528\u00a0my_date\u00a0\u53d8\u91cf\u3002<\/p>\n
bundle exec jekyll serve --incremental --config _config.yml,_config-local.yml,_config-data.yml<\/pre>\n\u5728\u8fd0\u884c\u4e0a\u8ff0\u547d\u4ee4\u65f6\uff0c{{ site.my_date }}\u00a0\u8f93\u51fa\u5176\u914d\u7f6e\u7684\u503c\u3002<\/p>\n
\u7ed3\u8bba<\/strong><\/div>\n\u4e0a\u9762\u7684\u4f8b\u5b50\u5f88\u7b80\u5355\uff0c\u4f46\u53ef\u80fd\u6027\u662f\u65e0\u7a77\u7684\u3002Bash\u3001Python \u548c\u5176\u4ed6\u7f16\u7a0b\u8bed\u8a00\u53ef\u4ee5\u52a8\u6001\u5730\u751f\u6210 Jekyll \u914d\u7f6e\u6587\u4ef6\u3002\u7136\u540e\u6211\u53ef\u4ee5\u5728\u00a0build\u00a0\u6216\u00a0serve\u00a0\u8fc7\u7a0b\u4e2d\u7ed3\u5408\u8fd9\u4e9b\u6587\u4ef6\u3002<\/p>\n
\u5bf9\u4e8e\u00a0findmymastodon.com\uff0c\u6211\u4f7f\u7528 Python \u6765\u83b7\u53d6 Mastodon \u7684\u7528\u6237\u7edf\u8ba1\u6570\u636e\u3002\u7136\u540e\u6211\u628a\u8fd9\u4e9b\u5199\u8fdb\u4e00\u4e2a\u65b0\u7684\u00a0_config-data.yml \u6587\u4ef6\uff08\u76ee\u524d\u662f\u624b\u52a8\uff09\u3002\u6700\u540e\uff0c\u4e3b\u9875\u548c\u5176\u4ed6\u9875\u9762\u4ece\u914d\u7f6e\u6587\u4ef6\u4e2d\u663e\u793a\u8fd9\u4e9b\u3002\u8fd9\u6837\uff0c\u6211\u5c31\u53ef\u4ee5\u5229\u7528\u4e00\u4e2a\u52a8\u6001\u7684\u540e\u53f0\uff0c\u5e76\u4e14\u4ecd\u7136\u4fdd\u6301\u6211\u6240\u559c\u6b22\u7684\u6240\u6709\u9759\u6001\u7f51\u7ad9\u7684\u4f18\u70b9\u3002<\/p>\n
\u6211\u5e0c\u671b\u8fd9\u80fd\u4e3a\u4f60\u81ea\u5df1\u7684\u9759\u6001\u7f51\u7ad9\u6fc0\u53d1\u4e00\u4e9b\u60f3\u6cd5\u3002Jamstack \u5bf9\u4e8e\u9759\u6001\u7f51\u7ad9\u662f\u5f88\u597d\u7684\uff0c\u4f46\u4f60\u53ef\u4ee5\u907f\u514d\u4e3a\u52a8\u6001\u5185\u5bb9\u521b\u5efa\u6574\u4e2a API \u540e\u53f0\u3002\u4e3a\u4ec0\u4e48\u4e0d\u4f7f\u7528\u4e00\u4e2a\u6784\u5efa\u4f5c\u4e1a\u6765\u521b\u5efa\u5e26\u6709\u66f4\u65b0\u5185\u5bb9\u7684\u914d\u7f6e\u6587\u4ef6\u5462\uff1f\u8fd9\u53ef\u80fd\u4e0d\u9002\u5408\u6bcf\u4e00\u79cd\u60c5\u51b5\uff0c\u4f46\u5c11\u4e00\u4e2a API \u610f\u5473\u7740\u66f4\u5c11\u7684\u57fa\u7840\u8bbe\u65bd\u79fb\u52a8\u90e8\u4ef6\u3002<\/p>\n
\u6211\u5e0c\u671b\u8fd9\u80fd\u5728\u4f60\u7684\u4e0b\u4e00\u4e2a\u9759\u6001\u7f51\u7ad9\u9879\u76ee\u4e2d\u7ed9\u4f60\u4e00\u4e9b\u5e2e\u52a9\u3002\u7ee7\u7eed\u9605\u8bfb\uff0c\u5e76\u795d\u4f60\u7f16\u7801\u6109\u5feb\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"
\u9759\u6001\u7f51\u7ad9\u751f\u6210\u5668\u00a0Jekyll \u4f7f\u7528\u00a0_config.yml\u00a0\u8fdb\u884c\u914d\u7f6e\u3002\u8fd9\u4e9b\u914d\u7f6e\u90fd\u662f Jekyll \u7279\u6709\u7684\u3002\u4f46\u4f60 […]<\/p>\n","protected":false},"author":323,"featured_media":198116,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[55],"tags":[],"class_list":["post-229927","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-thread"],"acf":[],"_links":{"self":[{"href":"https:\/\/gulass.cn\/wp-json\/wp\/v2\/posts\/229927","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/gulass.cn\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/gulass.cn\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/gulass.cn\/wp-json\/wp\/v2\/users\/323"}],"replies":[{"embeddable":true,"href":"https:\/\/gulass.cn\/wp-json\/wp\/v2\/comments?post=229927"}],"version-history":[{"count":3,"href":"https:\/\/gulass.cn\/wp-json\/wp\/v2\/posts\/229927\/revisions"}],"predecessor-version":[{"id":229929,"href":"https:\/\/gulass.cn\/wp-json\/wp\/v2\/posts\/229927\/revisions\/229929"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/gulass.cn\/wp-json\/wp\/v2\/media\/198116"}],"wp:attachment":[{"href":"https:\/\/gulass.cn\/wp-json\/wp\/v2\/media?parent=229927"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/gulass.cn\/wp-json\/wp\/v2\/categories?post=229927"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/gulass.cn\/wp-json\/wp\/v2\/tags?post=229927"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}