ÔõÑùʹÓÃgithub pages´î½¨Ð¡ÎÒ˽¼Ò²©¿Í
×÷Ϊһ¸ö³ÌÐòÔ±£¬ÓµÓÐÒ»¸öСÎÒ˽¼Ò²©¿ÍÊǺÜÊÇÓÐÐëÒªµÄ¡£³ýÁË¿ÉÒԼͼ×Ô¼ºµÄÉú³¤Àú³ÌºÍÊÖÒÕÐĵ㬻¹¿ÉÒÔÓë¿í´óµÄÊÖÒÕϲ»¶Õß·ÖÏí×Ô¼ºµÄÂÄÀúºÍ˼Ë÷¡£¶øÏÖÔÚ£¬´î½¨Ò»¸öСÎÒ˽¼Ò²©¿ÍÒѾ±äµÃºÜÊǼòÆӺͱã½ÝÁË£¬ÓÉÓÚÏÖÔÚÓÐÐí¶àµÄ¾²Ì¬²©¿ÍÌìÉú¹¤¾ß£¬ÃâÈ¥ÁËÐí¶àµÄ·±ËöÊÂÇé¡£¶øÆäÖУ¬Ê¹ÓÃgithub pages´î½¨Ð¡ÎÒ˽¼Ò²©¿Í¸üÊDZ¸ÊÜÍÆÐí¡£ÏÂÃ棬ÎÒÃǽ«ÏêϸµØÏÈÈÝÔõÑùʹÓÃgithub pages´î½¨Ð¡ÎÒ˽¼Ò²©¿Í¡£
Ò»¡¢×¢²ágithubÕË»§
Ê×ÏÈ£¬ÎÒÃÇÐèҪע²áÒ»¸ögithubÕË»§¡£githubÊÇÒ»¸öºÜÊÇÖøÃûµÄ´úÂëÍйÜƽ̨£¬¶øgithub pagesÊÇgithubÌṩµÄÒ»ÏîÃâ·ÑµÄ¾²Ì¬ÍøÒ³ÍйÜЧÀÍ£¬¿ÉÒÔÓÃÀ´´î½¨Ð¡ÎÒ˽¼Ò²©¿Í»òչʾ×Ô¼ºµÄ×÷Æ·µÈ¡£×¢²ágithubÕË»§ºÜÊǼòÆÓ£¬Ö»ÐèÒªÔÚ¹ÙÍøÉÏÌîдСÎÒ˽¼ÒÐÅÏ¢ºÍÓÊÏä¼´¿É¡£
¶þ¡¢½¨ÉèÒ»¸öRepository
×¢²áÍêgithubÕË»§Ö®ºó£¬ÎÒÃÇÐèÒªÔÚgithubÉϽ¨ÉèÒ»¸öRepository×÷ΪСÎÒ˽¼Ò²©¿ÍµÄ´úÂë¿ÍÕ»¡£ÔÚgithubÒ³ÃæÉϵã»÷ÓÒÉϽǵġ°+¡±°´Å¥£¬Ñ¡Ôñ¡°New repository¡±£¬ÌîдRepositoryµÄÃû³ÆºÍÐÎò£¬Ñ¡ÔñÊÇ·ñ¹ûÕæ»ò˽ÓУ¬È»ºóµã»÷¡°Create repository¡±°´Å¥¼´¿É½¨ÉèÒ»¸öеÄRepository¡£
Èý¡¢Ñ¡ÔñÒ»¸ö¾²Ì¬²©¿ÍÌìÉú¹¤¾ß
ÔÚgithubÉϽ¨ÉèºÃ´úÂë¿ÍÕ»Ö®ºó£¬½ÓÏÂÀ´ÎÒÃÇÐèҪѡÔñÒ»¸ö¾²Ì¬²©¿ÍÌìÉú¹¤¾ß¡£³£Óõľ²Ì¬²©¿ÍÌìÉú¹¤¾ßÓÐJekyll¡¢Hexo¡¢HugoµÈ¡£ÕâÀïÎÒÃÇÒÔJekyllΪÀý¾ÙÐÐÏÈÈÝ¡£JekyllÊÇÒ»¸öºÜÊÇÊ¢Ðеľ²Ì¬ÍøÕ¾ÌìÉúÆ÷£¬Ò²ÊÇgithub¹Ù·½Ö§³ÖµÄ¡£ËüʹÓÃLiquidÄ£°åÓïÑÔ£¬¿ÉÒÔ×ÊÖúÎÒÃÇ¿ìËÙ½¨ÉèÒ»¸ö¾«Á·¡¢ÑŹ۵ÄСÎÒ˽¼Ò²©¿Í¡£
JekyllµÄ×°ÖúÜÊǼòÆÓ£¬Ö»ÐèÔÚÏÂÁîÐÐÖÐÖ´ÐÐÒÔÏÂÏÂÁ
gem install jekyll bundler
µÇ¼ºó¸´ÖÆ
×°ÖÃÍê³Éºó£¬ÎÒÃǾͿÉÒÔʹÓÃJekyllÀ´½¨ÉèÒ»¸öеIJ©¿ÍÁË¡£ÔÚÍâµØµÄij¸öĿ¼Ï£¬Ö´ÐÐÒÔÏÂÏÂÁ
jekyll new myblog
µÇ¼ºó¸´ÖÆ
ÆäÖУ¬¡°myblog¡±ÊÇСÎÒ˽¼Ò²©¿ÍµÄÃû³Æ£¬¿ÉÒÔ×Ô½ç˵¡£Ö´ÐÐÒÔÉÏÏÂÁîºó£¬Jekyll»á×Ô¶¯ÌìÉúÒ»¸öĬÈϵIJ©¿ÍÄ£°å£¬ÎÒÃÇ¿ÉÒÔ½«ËüÀÈ¡µ½githubÉÏ×÷Ϊ×Ô¼ºµÄ²©¿Í´úÂë¡£
Ïêϸ²Ù×÷°ì·¨ÈçÏ£º
½«ÍâµØµÄ²©¿ÍÎļþ¼ÐÉÏ´«µ½githubÉϵÄRepository
ÔÚÍâµØÖ´ÐÐÒÔÏÂÏÂÁ
cd myblog git init git add . git commit -m "first commit" git remote add origin https://github.com/yourusername/yourusername.github.io.git git push -u origin master
µÇ¼ºó¸´ÖÆ
ÆäÖУ¬¡°yourusername¡±ÊÇÄãÔÚgithubÉϵÄÕË»§Ãû£¬ÐèÒªÌæ»»³É×Ô¼ºµÄÕË»§Ãû¡£
½øÈëgithubÒ³Ã棬ÕÒµ½RepositoryµÄÉèÖÃ
ÔÚRepositoryµÄÉèÖÃÖУ¬ÕÒµ½¡°GitHub Pages¡±²¿·Ö£¬Ñ¡Ôñ¡°master branch¡±×÷ΪSource£¬ÈôÊÇÄúµÄ²©¿ÍÎļþ¼ÐÃû³Æ²»ÊÇyourusername.github.io£¬ÔòÐèÒªÊÖ¶¯ÉèÖá£
ÆÚ´ý¼¸·ÖÖÓ£¬»á¼ûСÎÒ˽¼Ò²©¿Í
ÔÚRepositoryµÄ¡°GitHub Pages¡±²¿·Ö£¬»áÏÔʾÄúµÄСÎÒ˽¼Ò²©¿ÍµÄÁ´½Ó¡£ÆÚ´ý¼¸·ÖÖӺ󣬾ͿÉÒÔͨ¹ýÕâ¸öÁ´½Ó»á¼ûÄúµÄСÎÒ˽¼Ò²©¿ÍÁË¡£
ËÄ¡¢Ñ¡Ôñ²©¿ÍÖ÷Ìâ
Jekyll×Ô¼ºÌṩÁËһЩĬÈϵÄÖ÷Ì⣬¿ÉÒÔÔÚ_config.ymlÎļþÖоÙÐÐÉèÖᣲ»¹ý£¬ÕâЩĬÈϵÄÖ÷Ìâ¿ÉÄÜÓÐЩ¼òª£¬²»Ì«ÇкÏ×ðÁú¿Ê±ÒªÇó¡£Òò´Ë£¬ÎÒÃÇ¿ÉÒÔÑ¡ÔñһЩÓÅÒìµÄµÚÈý·½Ö÷Ì⣬²¢½«ÆäÓ¦Óõ½×ðÁú¿Ê±²©¿ÍÉÏ¡£
JekyllµÄµÚÈý·½Ö÷Ìâ¿ÉÒÔÔÚGithubÉϾÙÐÐËÑË÷ºÍÏÂÔØ¡£ÏÂÔغ󣬽«Ö÷ÌâÎļþ¼Ð¸´ÖƵ½×ðÁú¿Ê±²©¿ÍÎļþ¼ÐÖУ¬È»ºóÔÚ_config.ymlÎļþÖоÙÐÐÉèÖü´¿É¡£
Îå¡¢Ðû²¼²©¿ÍÎÄÕÂ
ÔÚ²©¿ÍÎļþ¼ÐÖУ¬ÎÒÃÇ¿ÉÒÔʹÓÃMarkdownÓï·¨À´±àд²©¿ÍÎÄÕ¡£ÐµIJ©¿ÍÎÄÕÂÓ¦¸Ã°²ÅÅÔÚ_postsÎļþ¼ÐÖУ¬ÎļþÃûµÄÃûÌÃÓ¦¸ÃÊÇ¡°Äê-ÔÂ-ÈÕ-ÎÄÕÂÎÊÌâ.md¡±¡£ÀýÈ磬ÎÒÃÇ¿ÉÒÔÔÚ_postsĿ¼Ï±àдһƪÃûΪ¡°hello-world¡±µÄ²©¿ÍÎÄÕ¡£
--- layout: post title: "Hello World" date: 2021-09-01 00:00:00 +0800 categories: jekyll update --- # Hello World ÕâÊÇÎҵĵÚһƪ²©¿ÍÎÄÕ¡£
µÇ¼ºó¸´ÖÆ
ÆäÖУ¬µÚÒ»²¿·ÖÊÇÎÄÕµÄÔªÐÅÏ¢£¬ÓÃÀ´ÐÎòÎÄÕµÄÎÊÌ⡢ʱ¼ä¡¢·ÖÀàµÈÐÅÏ¢£¬µÚ¶þ²¿·ÖÊÇÎÄÕµÄÕýÎÄÄÚÈÝ£¬Ê¹ÓÃMarkdownÓï·¨¾ÙÐÐÅÅ°æ¡£
Áù¡¢×ܽá
ͨ¹ýÒÔÉÏ°ì·¨£¬ÎÒÃǾͿÉÒÔÔÚgithubÉÏ¿ìËٴһ¸öСÎÒ˽¼Ò²©¿Í£¬²¢Ðû²¼×Ô¼ºµÄ²©¿ÍÎÄÕÂÁË¡£Ê¹ÓÃgithub pages´î½¨Ð¡ÎÒ˽¼Ò²©¿Í²»µ«¼òÆÓÀû±ã£¬²¢ÇÒÃâ·ÑÇÒÎȹ̡£Ï£ÍûÕâƪÎÄÕÂÄܹ»×ÊÖúµ½ÄÇЩÏëÒª´î½¨Ð¡ÎÒ˽¼Ò²©¿ÍµÄ³ÌÐòÔ±ÃÇ¡£
ÒÔÉϾÍÊÇÔõÑùʹÓÃgithub pages´î½¨Ð¡ÎÒ˽¼Ò²©¿ÍµÄÏêϸÄÚÈÝ£¬¸ü¶àÇë¹Ø×¢±¾ÍøÄÚÆäËüÏà¹ØÎÄÕ£¡