ÔõÑùʹÓÃ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ÎļþÖоÙÐÐÉèÖᣲ»¹ý£¬ÕâЩĬÈϵÄÖ÷Ìâ¿ÉÄÜÓÐЩ¼òª£¬²»Ì«ÇкÏÎÒÃǵÄÒªÇó¡£Òò´Ë£¬ÎÒÃÇ¿ÉÒÔÑ¡ÔñһЩÓÅÒìµÄµÚÈý·½Ö÷Ì⣬²¢½«ÆäÓ¦Óõ½ÎÒÃǵIJ©¿ÍÉÏ¡£
JekyllµÄµÚÈý·½Ö÷Ìâ¿ÉÒÔÔÚGithubÉϾÙÐÐËÑË÷ºÍÏÂÔØ¡£ÏÂÔغ󣬽«Ö÷ÌâÎļþ¼Ð¸´ÖƵ½ÎÒÃǵIJ©¿ÍÎļþ¼ÐÖУ¬È»ºóÔÚ_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´î½¨Ð¡ÎÒ˽È˲©¿ÍµÄÏêϸÄÚÈÝ£¬¸ü¶àÇë¹Ø×¢±¾ÍøÄÚÆäËüÏà¹ØÎÄÕ£¡