½ÌÄ㽫Hexo°²Åŵ½GithubÉÏ
hexoÊÇÒ»ÖÖ¼òÖÊÆÓÓõľ²Ì¬²©¿ÍÌìÉúÆ÷£¬ÎÒÃÇ¿ÉÒÔʹÓÃËüÀ´¿ìËÙ½¨É販¿Í£¬ËüÖ§³Ö¶àÖÖÖ÷Ìâ¡¢²å¼þ£¬¿ÉÒÔÇáËÉ´¦Àí markdown¡¢´úÂë¸ßÁÁµÈ³£¼ûÐèÇó¡£ÔÚ±àдÍ격¿Íºó£¬ÎÒÃÇÐèÒª½«Æä°²Åŵ½»¥ÁªÍøÉÏչʾ¸ø¸ü¶àÈËԢĿ£¬¶øgithubÊǸö²»´íµÄÑ¡Ôñ¡£ÏÂÃ棬ÎÒÃÇÀ´Ïêϸ½â˵һÏÂÔõÑù½« hexo °²Åŵ½ github ÉÏ¡£
µÚÒ»²½£º½¨ÉèÒ»¸ö Github ¿ÍÕ»
Ê×ÏÈ£¬ÎÒÃÇÐèҪǰÍù Github ¹ÙÍø½¨ÉèÒ»¸ö¿ÍÕ»£¬ÃüÃûÃûÌÃÒÔ¡°Óû§Ãû.github.io¡±Îª×¼¡£
µÚ¶þ²½£º×°Öà Git
ÔÚ°²ÅÅ֮ǰ£¬ÏÈÈ·±£ÍâµØÒѾװÖÃÁË Git£¬ÈôÊÇûÓпÉÒÔÔÚ¹ÙÍø¾ÙÐÐÏÂÔØ×°Öá£
µÚÈý²½£º³õʼ»¯ Hexo
½ÓÏÂÀ´£¬ÔÚÍâµØ½¨ÉèÒ»¸öÎļþ¼Ð£¬Èç¡°blog¡±£¬ÒÔ±ã´æ·Å Hexo µÄËùÓÐÎļþºÍĿ¼¡£ÔËÐÐÒÔÏÂÏÂÁî¾ÙÐгõʼ»¯£º
hexo init blog
µÇ¼ºó¸´ÖÆ
´ËÏÂÁî»áÔÚÄ¿½ñĿ¼Ï½¨ÉèÒ»¸öÃûΪ¡°blog¡±µÄÎļþ¼Ð£¬ÄÚÀï°üÀ¨ÁË Hexo µÄ»ù´¡Ä¿Â¼¡£
µÚËIJ½£º±à¼ÉèÖÃÎļþ
ÔÚ Hexo µÄ»ù´¡Ä¿Â¼Ï£¬ÓÐÒ»¸öÃûΪ¡°_config.yml¡±µÄÉèÖÃÎļþ£¬ÎÒÃÇÐèÒª¶Ô´ËÎļþ¾ÙÐбà¼ÉèÖá£ÐÞ¸ÄÎļþÄÚÈÝÈçÏ£º
# Site title: your-blog-title subtitle: your-blog-subtitle description: your-blog-description keywords: your-blog-keywords author: your-name language: zh-CN timezone: Asia/Shanghai # URL url: https://your-username.github.io root: / # Deployment deploy: type: git repository: https://github.com/your-username/your-username.github.io.git branch: master
µÇ¼ºó¸´ÖÆ
ÐèҪעÖصÄÊÇ£¬ÆäÖеġ°your-blog-title¡±¡¢¡°your-blog-subtitle¡±µÈÄÚÈÝÐèÒª¸ÄΪÄã×Ô¼º²©¿ÍµÄÐÅÏ¢¡£
µÚÎå²½£º×°ÖÃÒÀÀµÏî
ÔÚ Hexo µÄ»ù´¡Ä¿Â¼ÏÂÔËÐÐÒÔÏÂÏÂÁî×°ÖÃÒÀÀµÏ
npm install
µÇ¼ºó¸´ÖÆ
µÚÁù²½£ºÌìÉú¾²Ì¬Îļþ
ÔÚ Hexo µÄ»ù´¡Ä¿Â¼ÏÂÖ´ÐÐÒÔÏÂÏÂÁÌìÉú¾²Ì¬Îļþ£º
hexo clean && hexo g
µÇ¼ºó¸´ÖÆ
´ËÏÂÁ»áÌìÉúÒ»¸ö¡°public¡±Ä¿Â¼£¬ÆäÖаüÀ¨ÁËËùÓеľ²Ì¬Îļþ¡£
µÚÆß²½£º½«¾²Ì¬ÎļþÌá½»µ½ Github
ÔÚ Hexo µÄ»ù´¡Ä¿Â¼ÏÂÖ´ÐÐÒÔÏÂÏÂÁ½«¾²Ì¬ÎļþÌá½»µ½ Github£º
hexo d
µÇ¼ºó¸´ÖÆ
´ËÏÂÁ»á°Ñ¡°public¡±Ä¿Â¼ÏµÄËùÓо²Ì¬ÎļþÉÏ´«µ½ Github ÉÏ¡£
µÚ°Ë²½£º»á¼û²©¿Í
×îºó£¬ÔÚä¯ÀÀÆ÷ÖÐÊäÈëÒÔÏÂÍøÖ·£¬¼´¿É»á¼û²©¿Í£º
https://your-username.github.io
µÇ¼ºó¸´ÖÆ
×ܽá
ÖÁ´Ë£¬ÎÒÃÇÒѾ½« Hexo °²Åŵ½ Github ÉÏÍê³É¡£ÔÚÏÖʵʹÓÃÖУ¬ÈôÊÇÎÒÃÇÐÞ¸ÄÁ˲©¿ÍÄÚÈÝ£¬Ö»ÐèÒªÔÙ´ÎÖ´ÐеÚÁù²½ºÍµÚÆß²½µÄÏÂÁ¼´¿É½«¸üкóµÄ²©¿ÍÌá½»µ½ Github ÉÏ¡£ÕâÖÖ·½·¨Ê®·Ö¼òÆÓÀû±ã£¬ÊʺÏÓÚСÎÒ˽È˲©¿ÍµÄ¿ìËٴ¡£
ÒÔÉϾÍÊǽÌÄ㽫Hexo°²Åŵ½GithubÉϵÄÏêϸÄÚÈÝ£¬¸ü¶àÇë¹Ø×¢±¾ÍøÄÚÆäËüÏà¹ØÎÄÕ£¡