index.html 90.4 KB
Newer Older
T
TRHX 已提交
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
<!--         ___           ___           ___           ___           ___                    ___           ___       ___           ___     
         /\  \         /\  \         /\__\         |\__\         /\  \                  /\  \         /\__\     /\  \         /\  \    
         \:\  \       /::\  \       /:/  /         |:|  |       /::\  \                /::\  \       /:/  /    /::\  \       /::\  \   
              \:\  \     /:/\:\  \     /:/__/          |:|  |      /:/\ \  \              /:/\:\  \     /:/  /    /:/\:\  \     /:/\:\  \  
              /::\  \   /::\~\:\  \   /::\  \ ___      |:|__|__   _\:\~\ \  \            /::\~\:\__\   /:/  /    /:/  \:\  \   /:/  \:\  \ 
             /:/\:\__\ /:/\:\ \:\__\ /:/\:\  /\__\ ____/::::\__\ /\ \:\ \ \__\          /:/\:\ \:|__| /:/__/    /:/__/ \:\__\ /:/__/_\:\__\
            /:/  \/__/ \/_|::\/:/  / \/__\:\/:/  / \::::/~~/~    \:\ \:\ \/__/          \:\~\:\/:/  / \:\  \    \:\  \ /:/  / \:\  /\ \/__/
           /:/  /         |:|::/  /       \::/  /   ~~|:|~~|      \:\ \:\__\             \:\ \::/  /   \:\  \    \:\  /:/  /   \:\ \:\__\  
           \/__/          |:|\/__/        /:/  /      |:|  |       \:\/:/  /              \:\/:/  /     \:\  \    \:\/:/  /     \:\/:/  /  
                          |:|  |         /:/  /       |:|  |        \::/  /                \::/__/       \:\__\    \::/  /       \::/  /   
                           \|__|         \/__/         \|__|         \/__/                  ~~            \/__/     \/__/         \/__/    

   ┌───┐   ┌───┬───┬───┬───┐   ┌───┬───┬───┬───┐   ┌───┬───┬───┬───┐  ┌───┬───┬───┐
   │ Esc  │   │  F1  │  F2  │  F3  │  F4  │   │  F5  │  F6  │  F7  │  F8  │   │  F9  │ F10  │ F11  │ F12  │  │ P/S  │ S L  │ P/B  │
   └───┘   └───┴───┴───┴───┘   └───┴───┴───┴───┘   └───┴───┴───┴───┘  └───┴───┴───┘
   ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ ┌───┬───┬───┐
   │ ~ `  │ ! 1  │ @ 2  │ # 3  │ $ 4  │ % 5  │ ^ 6  │ & 7  │ * 8  │ ( 9  │ ) 0  │ _ -  │ + =  │    BacSp     │ │ Ins  │ Hom  │ PUp  │
   ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ ├───┼───┼───┤
   │   Tab    │  Q   │  W   │  E   │  R   │  T   │  Y   │  U   │  I   │  O   │  P   │ { [  │ } ]  │   | \    │ │ Del  │ End  │ PDn  │
   ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ └───┴───┴───┘
   │    Caps    │  A   │  S   │  D   │  F   │  G   │  H   │  J   │  K   │  L   │ : ;  │ " '  │     Enter      │
   ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────────┤         ┌───┐
   │     Shift      │  Z   │  X   │  C   │  V   │  B   │  N   │  M   │ < ,  │ > .  │ ? /  │       Shift        │         │  ↑  │
   ├─────┬──┴─┬─┴──┬┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ ┌───┼───┼───┐
   │   Ctrl   │        │  Alt   │                     Space                    │   Alt  │   Fn   │   =   │  Ctrl  │ │  ←  │  ↓  │  →  │
   └─────┴────┴────┴───────────────────────┴────┴────┴────┴────┘ └───┴───┴───┘

              写字楼里写字间,写字间里程序员;程序人员写程序,又拿程序换酒钱。酒醒只在网上坐,酒醉还来网下眠;酒醉酒醒日复日,网上网下年复年。
              但愿老死电脑间,不愿鞠躬老板前;奔驰宝马贵者趣,公交自行程序员。别人笑我忒疯癫,我笑自己命太贱;不见满街漂亮妹,哪个归得程序员?
-->
T
TRHX 已提交
31 32 33 34 35 36 37 38
<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge" />
  
  <title>使用 Github Pages 和 Hexo 搭建自己的独立博客 | TRHX&#39;S BLOG</title>
  
T
TRHX 已提交
39
  <meta name="keywords" content="Python爬虫,数据分析,数据可视化,web前端,Java,Python,HTML,软件工程,大学生,hexo,GitHubPages,CodingPages">
T
TRHX 已提交
40 41
  
  
T
TRHX 已提交
42
  <meta name="description" content="TRHX 的个人博客;主攻 Python、爬虫、WEB前端、大数据、数据分析、数据可视化;求知若饥,虚心若愚,一入 IT 深似海,从此学习无绝期,记录毕生所学!">
T
TRHX 已提交
43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58
  

  
  <link rel="alternate" href="/atom.xml" title="TRHX'S BLOG">
  

  <meta name="HandheldFriendly" content="True" />
  <meta name="apple-mobile-web-app-capable" content="yes">
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  <!-- meta -->
  
  
  <meta name='theme-color' content='#f24e32'>
  <meta name='msapplication-TileColor' content='#f24e32'>
  <meta name='msapplication-config' content='https://cdn.jsdelivr.net/gh/xaoxuu/assets@master/favicon/favicons/browserconfig.xml'>
  
T
TRHX 已提交
59 60
  <!-- 360 -->
  <meta name="360-site-verification" content="d98acd5dccc92e495179410dd58186be" />
T
TRHX 已提交
61 62
  <!-- 360自动收录 -->
  <script>
T
TRHX 已提交
63 64 65
    (function () {
      var src = "https://jspassport.ssl.qhimg.com/11.0.1.js?d182b3f28525f2db83acfaaf6e696dba";
      document.write('<script src="' + src + '" id="sozz"><\/script>');
T
TRHX 已提交
66 67
    })();
  </script>
T
TRHX 已提交
68
  <!-- sogou -->
T
TRHX 已提交
69
  <meta name="sogou_site_verification" content="l0yGeAV56W" />
T
TRHX 已提交
70 71 72 73 74 75 76 77
  <!-- link -->
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/fancyapps/fancybox@3.5.7/dist/jquery.fancybox.min.css" />
  
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/node-waves@0.7.6/dist/waves.min.css">
  
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@5.6.3/css/all.min.css">
  
  
T
TRHX 已提交
78 79 80 81
  <link rel='shortcut icon' type='image/x-icon' href='https://cdn.jsdelivr.net/gh/TRHX/CDN-for-itrhx.com@3.0.4/images/favicon.ico'>
  <link rel='icon' type='image/x-icon' sizes='32x32' href='https://cdn.jsdelivr.net/gh/TRHX/CDN-for-itrhx.com@3.0.4/images/favicon-32x32.png'>
  <link rel='apple-touch-icon' type='image/png' sizes='180x180' href='https://cdn.jsdelivr.net/gh/TRHX/CDN-for-itrhx.com@3.0.4/images/apple-touch-icon.png'>
  <link rel='mask-icon' color='#f24e32' href='https://cdn.jsdelivr.net/gh/TRHX/CDN-for-itrhx.com@3.0.4/images/safari-pinned-tab.svg'>
T
TRHX 已提交
82
  <link rel='manifest' href='https://cdn.jsdelivr.net/gh/xaoxuu/cdn-favicon@19.9.7/site.webmanifest'>
T
TRHX 已提交
83 84 85
  

  
T
TRHX 已提交
86
  <link rel="shortcut icon" type='image/x-icon' href="https://cdn.jsdelivr.net/gh/TRHX/CDN-for-itrhx.com@3.0.4/images/favicon.ico">
T
TRHX 已提交
87
  
T
TRHX 已提交
88 89

  
T
TRHX 已提交
90
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/TRHX/CDN-for-itrhx.com@3.1.0/css/style.css">
T
TRHX 已提交
91 92 93 94
  

  <script>
    function setLoadingBarProgress(num) {
T
TRHX 已提交
95
      document.getElementById('loading-bar').style.width = num + "%";
T
TRHX 已提交
96 97 98 99 100
    }
  </script>

  
  
T
TRHX 已提交
101 102
  <!-- ba -->
  <script>
T
TRHX 已提交
103
    var _hmt = _hmt || [];
T
TRHX 已提交
104
    (function () {
T
TRHX 已提交
105 106 107 108 109
      var hm = document.createElement("script");
      hm.src = "https://hm.baidu.com/hm.js?df0bc7c6bdbd80356ba4db429724ccad";
      var s = document.getElementsByTagName("script")[0];
      s.parentNode.insertBefore(hm, s);
    })();
T
TRHX 已提交
110
  </script>
T
TRHX 已提交
111
  
T
TRHX 已提交
112
  <!-- Google Adsense -->
T
TRHX 已提交
113
  <!--<script data-ad-client="ca-pub-1913211097936916" async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>-->
T
TRHX 已提交
114 115 116 117
</head>
<body>
  
  
T
TRHX 已提交
118 119 120 121
<div class="cover-wrapper">
  <cover class='cover post half'>
    
    
T
TRHX 已提交
122
  <img class='logo' src='https://cdn.jsdelivr.net/gh/TRHX/CDN-for-itrhx.com@3.1.0/images/logo.png'/>
T
TRHX 已提交
123 124 125 126


  <div class="m_search">
    <form name="searchform" class="form u-search-form">
T
TRHX 已提交
127
      <input type="text" class="input u-search-input" placeholder="世界之大,探索一下!" />
T
TRHX 已提交
128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171
      <i class="icon fas fa-search fa-fw"></i>
    </form>
  </div>

<div class='menu navgation'>
  <ul class='h-list'>
    
      
        <li>
          <a class="nav home" href="/"
            
            
            id="home">
            <i class='fas fa-home fa-fw'></i>&nbsp;主页
          </a>
        </li>
      
        <li>
          <a class="nav home" href="/categories/"
            
            
            id="categories">
            <i class='fas fa-folder-open fa-fw'></i>&nbsp;分类
          </a>
        </li>
      
        <li>
          <a class="nav home" href="/tags/"
            
            
            id="tags">
            <i class='fas fa-tags fa-fw'></i>&nbsp;标签
          </a>
        </li>
      
        <li>
          <a class="nav home" href="/friends/"
            
            
            id="friends">
            <i class='fas fa-users fa-fw'></i>&nbsp;朋友
          </a>
        </li>
      
T
TRHX 已提交
172
        <li>
T
TRHX 已提交
173
          <a class="nav home" href="/comments/"
T
TRHX 已提交
174 175
            
            
T
TRHX 已提交
176 177
            id="comments">
            <i class='fas fa-comments fa-fw'></i>&nbsp;留言
T
TRHX 已提交
178 179 180
          </a>
        </li>
      
T
TRHX 已提交
181 182 183 184
    
  </ul>
</div>

T
TRHX 已提交
185 186 187 188
    
    <br>
    <!-- Hitokoto 一言 -->
    <!--<p id="hitokoto"></p>
T
TRHX 已提交
189 190
			<script src="https://cdn.jsdelivr.net/npm/bluebird@3/js/browser/bluebird.min.js"></script>
			<script src="https://cdn.jsdelivr.net/npm/whatwg-fetch@2.0.3/fetch.min.js"></script>
T
TRHX 已提交
191 192 193 194 195 196 197 198 199
      <script src="https://v1.hitokoto.cn/?encode=js&select=%23hitokoto" defer></script>-->
    <!-- 打字特效 -->
    <script src="https://cdn.jsdelivr.net/npm/typed.js@2.0.11"></script>
    <div style="text-align: center;font-weight: bold;color: #1BC3FB;">
      <span id="subtitle"></span>
      <span id="typed-cursor"></span>
    </div>
    <script>
      var typed = new Typed("#subtitle", { strings: ["Live a good life, write some good code !!!", "愿自己的努力终将获得回报。", "花开不是为了花落,而是为了开的更加灿烂。", "没有伞的孩子必须努力奔跑!", "欲望以提升热忱,毅力以磨平高山。", "如果放弃太早,你永远都不知道自己会错过什么。", "没有礁石,就没有美丽的浪花;没有挫折,就没有壮丽的人生。"], startDelay: 1000, typeSpeed: 100, loop: !0, backSpeed: 60, backDelay: 2000, showCursor: !0 })
T
TRHX 已提交
200
    </script>
T
TRHX 已提交
201 202
  </cover>
  <header class="l_header pure">
T
TRHX 已提交
203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245
  <div id="loading-bar-wrapper">
    <div id="loading-bar" class="pure"></div>
  </div>

	<div class='wrapper'>
		<div class="nav-main container container--flex">
      <a class="logo flat-box" href='/' >
        
          TRHX'S BLOG
        
      </a>
			<div class='menu navgation'>
				<ul class='h-list'>
          
  					
  						<li>
								<a class="nav flat-box" href="/"
                  
                  
                  id="home">
									<i class='fas fa-home fa-fw'></i>&nbsp;主页
								</a>
							</li>
      			
  						<li>
								<a class="nav flat-box" href="/archives/"
                  
                  
                  id="archives">
									<i class='fas fa-archive fa-fw'></i>&nbsp;归档
								</a>
							</li>
      			
  						<li>
								<a class="nav flat-box" href="/friends/"
                  
                  
                  id="friends">
									<i class='fas fa-users fa-fw'></i>&nbsp;朋友
								</a>
							</li>
      			
  						<li>
T
TRHX 已提交
246
								<a class="nav flat-box" href="/comments/"
T
TRHX 已提交
247 248
                  
                  
T
TRHX 已提交
249 250
                  id="comments">
									<i class='fas fa-comments fa-fw'></i>&nbsp;留言
T
TRHX 已提交
251 252 253 254
								</a>
							</li>
      			
  						<li>
T
TRHX 已提交
255
								<a class="nav flat-box" href="/about/"
T
TRHX 已提交
256 257 258 259
                  
                  
                    target="_blank"
                  
T
TRHX 已提交
260 261
                  id="about">
									<i class='fas fa-info-circle fa-fw'></i>&nbsp;关于
T
TRHX 已提交
262 263 264 265
								</a>
							</li>
      			
  						<li>
T
TRHX 已提交
266
								<a class="nav flat-box" href="/box/"
T
TRHX 已提交
267 268 269 270
                  
                  
                    target="_blank"
                  
T
TRHX 已提交
271 272
                  id="box">
									<i class='fas fa-tools fa-fw'></i>&nbsp;百宝箱
T
TRHX 已提交
273 274 275
								</a>
							</li>
      			
T
TRHX 已提交
276
  						<li>
T
TRHX 已提交
277
								<a class="nav flat-box" href="https://mi.aliyun.com/shop/40012"
T
TRHX 已提交
278 279
                  
                  
T
TRHX 已提交
280 281 282 283
                    target="_blank"
                  
                  id="https:mi.aliyun.comshop40012">
									<i class='fas fa-link fa-fw'></i>&nbsp;米店
T
TRHX 已提交
284 285 286
								</a>
							</li>
      			
T
TRHX 已提交
287 288 289 290 291 292 293 294 295 296 297
  						<li>
								<a class="nav flat-box" href="/2019-nCoV/"
                  
                  
                    target="_blank"
                  
                  id="2019-nCoV">
									<i class='fas fa-heart fa-fw'></i>&nbsp;肺炎疫情图
								</a>
							</li>
      			
T
TRHX 已提交
298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361
      		
				</ul>
			</div>

			
				<div class="m_search">
					<form name="searchform" class="form u-search-form">
						<input type="text" class="input u-search-input" placeholder="搜索" />
						<i class="icon fas fa-search fa-fw"></i>
					</form>
				</div>
			
			<ul class='switcher h-list'>
				
					<li class='s-search'><a class="fas fa-search fa-fw" href='javascript:void(0)'></a></li>
				
				<li class='s-menu'><a class="fas fa-bars fa-fw" href='javascript:void(0)'></a></li>
			</ul>
		</div>

		<div class='nav-sub container container--flex'>
			<a class="logo flat-box"></a>
			<ul class='switcher h-list'>
				<li class='s-comment'><a class="flat-btn fas fa-comments fa-fw" href='javascript:void(0)'></a></li>
        
          <li class='s-toc'><a class="flat-btn fas fa-list fa-fw" href='javascript:void(0)'></a></li>
        
			</ul>
		</div>
	</div>
</header>
	<aside class="menu-phone">
    <header>
		<nav class="menu navgation">
      <ul>
        
          
            <li>
							<a class="nav flat-box" href="/"
                
                
                id="home">
								<i class='fas fa-home fa-fw'></i>&nbsp;主页
							</a>
            </li>
          
            <li>
							<a class="nav flat-box" href="/archives/"
                
                
                id="archives">
								<i class='fas fa-archive fa-fw'></i>&nbsp;归档
							</a>
            </li>
          
            <li>
							<a class="nav flat-box" href="/friends/"
                
                
                id="friends">
								<i class='fas fa-users fa-fw'></i>&nbsp;朋友
							</a>
            </li>
          
T
TRHX 已提交
362 363 364 365 366 367 368 369 370
            <li>
							<a class="nav flat-box" href="/comments/"
                
                
                id="comments">
								<i class='fas fa-comments fa-fw'></i>&nbsp;留言
							</a>
            </li>
          
T
TRHX 已提交
371 372 373 374 375 376 377 378 379
            <li>
							<a class="nav flat-box" href="https://mi.aliyun.com/shop/40012"
                
                
                id="https:mi.aliyun.comshop40012">
								<i class='fas fa-link fa-fw'></i>&nbsp;米店
							</a>
            </li>
          
T
TRHX 已提交
380
            <li>
T
TRHX 已提交
381
							<a class="nav flat-box" href="/box/"
T
TRHX 已提交
382 383
                
                
T
TRHX 已提交
384 385
                id="box">
								<i class='fas fa-tools fa-fw'></i>&nbsp;百宝箱
T
TRHX 已提交
386 387 388 389
							</a>
            </li>
          
            <li>
T
TRHX 已提交
390
							<a class="nav flat-box" href="https://itrhx.blog.csdn.net/"
T
TRHX 已提交
391 392
                
                
T
TRHX 已提交
393
                id="https:itrhx.blog.csdn.net">
T
TRHX 已提交
394 395 396 397
								<i class='fab fa-cuttlefish fa-fw'></i>&nbsp;CSDN
							</a>
            </li>
          
T
TRHX 已提交
398 399 400 401 402 403 404 405 406
            <li>
							<a class="nav flat-box" href="/2019-nCoV/"
                
                
                id="2019-nCoV">
								<i class='fas fa-heart fa-fw'></i>&nbsp;肺炎疫情图
							</a>
            </li>
          
T
TRHX 已提交
407 408 409 410 411 412 413
       
      </ul>
		</nav>
    </header>
	</aside>
<script>setLoadingBarProgress(40);</script>

T
TRHX 已提交
414
</div>
T
TRHX 已提交
415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432

  <div class="l_body">
    <div class='body-wrapper'>
      <div class='l_main'>
  

  
    <article id="post" class="post white-box article-type-post" itemscope itemprop="blogPost">
      


  <section class='meta'>
    
      
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/aplayer@1.7.0/dist/APlayer.min.css">
  <div class="aplayer"
    data-theme=""
    data-mini=true 
T
TRHX 已提交
433
    data-autoplay=true 
T
TRHX 已提交
434 435 436
    data-mode="circulation"
    data-server="netease"
    data-type="song"
T
TRHX 已提交
437
    data-id="441552"
T
TRHX 已提交
438 439 440 441 442 443 444 445
    data-volume="0.7">
  </div>
  <script src="https://cdn.jsdelivr.net/npm/aplayer@1.7.0/dist/APlayer.min.js"></script>
  <script src="https://cdn.jsdelivr.net/npm/meting@1.1.0/dist/Meting.min.js"></script>


    
    
T
TRHX 已提交
446 447
      <a title='使用 Github Pages 和 Hexo 搭建自己的独立博客' href='/2018/08/15/A02-hexo-blog/'><img class='thumbnail' src='https://cdn.jsdelivr.net/gh/TRHX/ImageHosting/ITRHX-PIC/thumbnail/hexo.png'></a>
    
T
TRHX 已提交
448 449 450 451 452
    <div class="meta" id="header-meta">
      
        
  
    <h1 class="title">
T
TRHX 已提交
453
      <a href="/2018/08/15/A02-hexo-blog/">
T
TRHX 已提交
454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469
        使用 Github Pages 和 Hexo 搭建自己的独立博客
      </a>
    </h1>
  


      
      <div class='new-meta-box'>
        
          
        
          
            
  <div class='new-meta-item author'>
    <a href="https://www.itrhx.com" rel="nofollow">
      
T
TRHX 已提交
470
        <img src="https://cdn.jsdelivr.net/gh/TRHX/CDN-for-itrhx.com@2.1.9/images/trhx.png">
T
TRHX 已提交
471
      
T
TRHX 已提交
472
      <p>TRHX</p>
T
TRHX 已提交
473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521
    </a>
  </div>


          
        
          
            <div class="new-meta-item date">
  <a class='notlink'>
    <i class="fas fa-calendar-alt" aria-hidden="true"></i>
    <p>2018-08-15</p>
  </a>
</div>

          
        
          
            
  
  <div class='new-meta-item category'>
    <a href='/categories/Hexo/' rel="nofollow">
      <i class="fas fa-folder-open" aria-hidden="true"></i>
      <p>Hexo</p>
    </a>
  </div>


          
        
          
            
  
    <div class="new-meta-item browse busuanzi">
      <a class='notlink'>
        <i class="fas fa-eye" aria-hidden="true"></i>
        <p>
          <span id="busuanzi_value_page_pv">
            <i class="fas fa-spinner fa-spin fa-fw" aria-hidden="true"></i>
          </span>
        </p>
      </a>
    </div>
  


          
        
          
            
T
TRHX 已提交
522
  
T
TRHX 已提交
523 524
    <div class="new-meta-item wordcount">
      <a class='notlink'>
T
TRHX 已提交
525
        <i class="fas fa-keyboard" aria-hidden="true"></i>
T
TRHX 已提交
526
        <p>字数统计:</p>
T
TRHX 已提交
527
        <p>3,782字</p>
T
TRHX 已提交
528 529 530 531
      </a>
    </div>
    <div class="new-meta-item readtime">
      <a class='notlink'>
T
TRHX 已提交
532
        <i class="fas fa-hourglass-half" aria-hidden="true"></i>
T
TRHX 已提交
533 534 535
        <p>阅读时长≈</p>
        <p>14分</p>
      </a>
T
TRHX 已提交
536 537 538 539 540 541 542
    </div>
  

          
        
          
            
T
TRHX 已提交
543 544 545 546 547 548 549 550 551 552 553 554 555

          
        
      </div>
      
        <hr>
      
    </div>
  </section>


      <section class="article typo">
        <div class="article-entry" itemprop="articleBody">
T
TRHX 已提交
556
          <p><img src="https://cdn.jsdelivr.net/gh/TRHX/ImageHosting/ITRHX-PIC/A02/01.png" alt="01"></p>
T
TRHX 已提交
557
<a id="more"></a>
T
TRHX 已提交
558 559 560
<blockquote>
<p>加入 Hexo 博客交流群:924812033,有问题互相交流学习!<a target="_blank" href="//shang.qq.com/wpa/qunwpa?idkey=4bb493ed9bd2ff3682bed3389fbb9ff0963528688d8f5ac5dadc1f1dc735b9fb"><img border="0" src="//pub.idqqimg.com/wpa/images/group.png" alt="Hexo 博客交流群" title="Hexo 博客交流群"></a></p>
</blockquote>
T
TRHX 已提交
561 562 563 564 565 566 567 568 569 570 571 572 573
<h1 id="–-前言"><a href="#–-前言" class="headerlink" title="– 前言"></a><font color="#FF000">– 前言</font></h1><blockquote>
<p>首先感谢您能访问我的博客:<a href="https://trhx.github.io" target="_blank" rel="noopener">TRHX’S BLOG</a></p>
</blockquote>
<p>这是一篇有关如何使用 <font color="#DC143C">Github Pages</font><font color="#DC143C">Hexo</font> 搭建属于自己独立博客的详尽教程,本人是软件工程专业本科生,目前只学习了C和C++编程语言,对网站开发的有关知识几乎为零,这也是我搭建好自己的博客之后写的第一篇博客,刚开始搭建博客的时候自己也是网上各种百度,由于自己属于<font color="#DC143C">小白</font>那种,历经了千辛万苦才弄好,所以借这个机会写一篇小白真正能看懂的博客搭建教程,教你一步一步走向成功的彼岸!</p>
<p>推荐文章: <a href="http://www.cnblogs.com/jhzhu/p/3893297.html" target="_blank" rel="noopener">《我为什么写博客》</a> (By 知明所以)<br>      <a href="http://mindhacks.cn/2009/02/15/why-you-should-start-blogging-now/" target="_blank" rel="noopener">《为什么你应该(从现在开始就)写博客》</a>  (By 刘未鹏 | Mind Hacks)</p>
<h1 id="–-入门"><a href="#–-入门" class="headerlink" title="– 入门"></a><font color="#FF000">– 入门</font></h1><blockquote>
<p><strong>Github Pages</strong></p>
</blockquote>
<p>Github Pages可以被认为是用户编写的、托管在github上的静态网页。使用Github Pages可以为你提供一个免费的服务器,免去了自己搭建服务器和写数据库的麻烦。此外还可以绑定自己的域名。</p>
<blockquote>
<p><strong>Hexo</strong></p>
</blockquote>
<p>Hexo 是一个快速、简洁且高效的博客框架。Hexo 使用 Markdown(或其他渲染引擎)解析文章,在几秒内,即可利用靓丽的主题生成静态网页。</p>
T
TRHX 已提交
574
<h1 id="–-安装-Node-js"><a href="#–-安装-Node-js" class="headerlink" title="– 安装 Node.js"></a><font color="#FF000">– 安装 Node.js</font></h1><p><a href="https://nodejs.org/en/download/" target="_blank" rel="noopener">点击此处</a>访问官网,按需下载相应版本,默认安装可以了</p>
T
TRHX 已提交
575
<p><img src="https://cdn.jsdelivr.net/gh/TRHX/ImageHosting/ITRHX-PIC/A02/02.jpg" alt="02"></p>
T
TRHX 已提交
576
<p>注:本人在安装过程中出现了Warning 1909,无法创建快捷方式,这种情况很少出现,如果在安装过程中也有这种情况请参考百度文库(win10系统实测可行):<a href="https://wenku.baidu.com/view/4ad59110964bcf84b9d57ba5.html" target="_blank" rel="noopener">《Win7安装程序警告1909无法创建快捷方式》</a></p>
T
TRHX 已提交
577
<p><img src="https://cdn.jsdelivr.net/gh/TRHX/ImageHosting/ITRHX-PIC/A02/03.jpg" alt="03"></p>
T
TRHX 已提交
578 579
<h1 id="–-安装-Git"><a href="#–-安装-Git" class="headerlink" title="– 安装 Git"></a><font color="#FF000">– 安装 Git</font></h1><p><a href="https://git-scm.com/download/win" target="_blank" rel="noopener">点击此处</a>访问官网,按需下载相应版本,默认安装即可<br>参考资料:<a href="https://www.cnblogs.com/jytx/p/5602927.html" target="_blank" rel="noopener">《如何在windows下安装GIT》</a>  (By 俊雨廷休)<br>     <a href="http://git.oschina.net/progit/" target="_blank" rel="noopener">《Pro Git(中文版)》</a></p>
<h1 id="–-检验软件是否安装成功"><a href="#–-检验软件是否安装成功" class="headerlink" title="– 检验软件是否安装成功"></a><font color="#FF000">– 检验软件是否安装成功</font></h1><p>同时按下 Win 键和 R 键打开运行窗口,输入 <font color="#DC143C">cmd</font> ,然后输入以下命令,有相应版本信息显示则安装成功,若不正确可以卸载软件重新安装,此外若安装成功,在桌面右键鼠标,可以看到菜单里多了 <font color="#DC143C">Git GUI Here</font><font color="#DC143C">Git Bash Here</font>两个选项,第一个是<font color="#DC143C">图形界面的Git操作</font>,另一个是<font color="#DC143C">命令行</font><br><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">$ git --version</span><br><span class="line">$ node -v</span><br><span class="line">$ npm -v</span><br></pre></td></tr></table></figure></p>
T
TRHX 已提交
580 581
<p><img src="https://cdn.jsdelivr.net/gh/TRHX/ImageHosting/ITRHX-PIC/A02/04.jpg" alt="04"></p>
<p><img src="https://cdn.jsdelivr.net/gh/TRHX/ImageHosting/ITRHX-PIC/A02/05.jpg" alt="05"></p>
T
TRHX 已提交
582
<h1 id="–-Hexo-安装"><a href="#–-Hexo-安装" class="headerlink" title="– Hexo 安装"></a><font color="#FF000">– Hexo 安装</font></h1><p>选择一个磁盘,新建一个文件夹,自己重命名文件夹(如:我的文件夹为:<font color="#DC143C">E\TRHX_Blog</font>),博客相关文件将储存在此文件夹下,在该文件夹下右键鼠标,点击 <font color="#DC143C">Git Bash Here</font>,输入以下 npm 命令即可安装,第一个命令表示安装 hexo,第二个命令表示安装 hexo 部署到 git page 的 deployer,如图所示即为安装成功<br><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">$ npm install hexo-cli -g</span><br><span class="line">$ npm install hexo-deployer-git --save</span><br></pre></td></tr></table></figure></p>
T
TRHX 已提交
583
<p><img src="https://cdn.jsdelivr.net/gh/TRHX/ImageHosting/ITRHX-PIC/A02/06.png" alt="06"></p>
T
TRHX 已提交
584
<h1 id="–-Hexo-初始化配置"><a href="#–-Hexo-初始化配置" class="headerlink" title="– Hexo 初始化配置"></a><font color="#FF000">– Hexo 初始化配置</font></h1><p>在刚才新建的文件夹里面再次新建一个 <font color="#DC143C">Hexo</font> 文件夹(如:我的文件夹为:<font color="#DC143C">E\TRHX_Blog\Hexo</font>),进入该 <font color="#DC143C">Hexo</font> 文件夹右键鼠标,点击 <font color="#DC143C">Git Bash Here</font>,输入以下命令,如图所示则安装成功<br><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">$ hexo init</span><br></pre></td></tr></table></figure></p>
T
TRHX 已提交
585
<p><img src="https://cdn.jsdelivr.net/gh/TRHX/ImageHosting/ITRHX-PIC/A02/07.png" alt="07"></p>
T
TRHX 已提交
586
<p>Hexo 安装完成后,将会在指定文件夹中新建所需要的文件,Hexo 文件夹下的目录如下:<br><img src="https://cdn.jsdelivr.net/gh/TRHX/ImageHosting/ITRHX-PIC/A02/08.jpg" alt="08"></p>
T
TRHX 已提交
587 588
<h1 id="–-本地查看效果"><a href="#–-本地查看效果" class="headerlink" title="– 本地查看效果"></a><font color="#FF000">– 本地查看效果</font></h1><p>执行以下命令,执行完即可登录 <a href="http://localhost:4000/" target="_blank" rel="noopener">http://localhost:4000/</a> 查看效果<br><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">$ hexo generate</span><br><span class="line">$ hexo server</span><br></pre></td></tr></table></figure></p>
<p>显示以下信息说明操作成功:<br><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">INFO Hexo is running at http://0.0.0.0:4000/. Press Ctrl+C to stop.</span><br></pre></td></tr></table></figure></p>
T
TRHX 已提交
589
<p>登录 <a href="http://localhost:4000/" target="_blank" rel="noopener">http://localhost:4000/</a> 查看效果:<br><img src="https://cdn.jsdelivr.net/gh/TRHX/ImageHosting/ITRHX-PIC/A02/09.jpg" alt="09"></p>
T
TRHX 已提交
590 591
<h1 id="–-将博客部署到-Github-Pages-上"><a href="#–-将博客部署到-Github-Pages-上" class="headerlink" title="– 将博客部署到 Github Pages 上"></a><font color="#FF000">– 将博客部署到 Github Pages 上</font></h1><p>到目前为止,我们的本地博客就成功搭建了,但是现在我们只能通过本地连接查看博客,我们要做的是让其他人也能够访问我们的博客,这就需要我们将博客部署到Github Pages上</p>
<p>一、注册 Github 账户:<a href="https://github.com" target="_blank" rel="noopener">点击此处</a>访问 Github 官网,点击 Sign Up 注册账户</p>
T
TRHX 已提交
592
<p>二、创建项目代码库:点击 <font color="#DC143C">New repository</font> 开始创建,步骤及注意事项见图:<br><img src="https://cdn.jsdelivr.net/gh/TRHX/ImageHosting/ITRHX-PIC/A02/10.jpg" alt="10"></p>
T
TRHX 已提交
593 594 595 596 597 598
<p>三、配置 <font color="#DC143C">SSH</font> 密钥:只有配置好 <font color="#DC143C">SSH</font> 密钥后,我们才可以通过 git 操作实现本地代码库与 Github 代码库同步,在你第一次新建的文件夹里面(如:我的文件夹为:<font color="#DC143C">E\TRHX_Blog</font><font color="#DC143C">Git Bash Here</font> 输入以下命令:<br><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">$ ssh-keygen -t rsa -C &quot;your email@example.com&quot;</span><br><span class="line">//引号里面填写你的邮箱地址,比如我的是tanrenhou@126.com</span><br></pre></td></tr></table></figure></p>
<p>之后会出现:<br><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">Generating public/private rsa key pair.</span><br><span class="line">Enter file in which to save the key (/c/Users/you/.ssh/id_rsa):</span><br><span class="line">//到这里可以直接回车将密钥按默认文件进行存储</span><br></pre></td></tr></table></figure></p>
<p>然后会出现:<br><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">Enter passphrase (empty for no passphrase):</span><br><span class="line">//这里是要你输入密码,其实不需要输什么密码,直接回车就行</span><br><span class="line">Enter same passphrase again:</span><br></pre></td></tr></table></figure></p>
<p>接下来屏幕会显示:<br><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br></pre></td><td class="code"><pre><span class="line">Your identification has been saved in /c/Users/you/.ssh/id_rsa.</span><br><span class="line">Your public key has been saved in /c/Users/you/.ssh/id_rsa.pub.</span><br><span class="line">The key fingerprint is:</span><br><span class="line">这里是各种字母数字组成的字符串,结尾是你的邮箱</span><br><span class="line">The key&apos;s randomart image is:</span><br><span class="line">这里也是各种字母数字符号组成的字符串</span><br></pre></td></tr></table></figure></p>
<p>运行以下命令,将公钥的内容复制到系统粘贴板上<br><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">$ clip &lt; ~/.ssh/id_rsa.pub</span><br></pre></td></tr></table></figure></p>
<p>四、在 GitHub 账户中添加你的公钥</p>
T
TRHX 已提交
599 600 601 602
<p>1.登陆 GitHub,进入 <font color="#DC143C">Settings</font><br><img src="https://cdn.jsdelivr.net/gh/TRHX/ImageHosting/ITRHX-PIC/A02/11.jpg" alt="11"></p>
<p>2.点击 <font color="#DC143C">SSH and GPG Keys</font><br><img src="https://cdn.jsdelivr.net/gh/TRHX/ImageHosting/ITRHX-PIC/A02/12.jpg" alt="12"></p>
<p>3.选择 <font color="#DC143C">New SSH key</font><br><img src="https://cdn.jsdelivr.net/gh/TRHX/ImageHosting/ITRHX-PIC/A02/13.jpg" alt="13"></p>
<p>4.粘贴密钥:<br><img src="https://cdn.jsdelivr.net/gh/TRHX/ImageHosting/ITRHX-PIC/A02/14.jpg" alt="14"></p>
T
TRHX 已提交
603 604
<p>五、测试</p>
<p>输入以下命令:<font color="#DC143C">注意:<a href="mailto:git@github.com" target="_blank" rel="noopener">git@github.com</a>不要做任何更改!</font><br><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">$ ssh -T git@github.com</span><br></pre></td></tr></table></figure></p>
T
TRHX 已提交
605 606
<p>之后会显示:<br><img src="https://cdn.jsdelivr.net/gh/TRHX/ImageHosting/ITRHX-PIC/A02/15.png" alt="15"></p>
<p>输入 <font color="#DC143C">yes</font> 后会显示:<br><img src="https://cdn.jsdelivr.net/gh/TRHX/ImageHosting/ITRHX-PIC/A02/16.png" alt="16"><br>此时表示设置正确</p>
T
TRHX 已提交
607 608 609
<p>六、配置 Git 个人信息</p>
<p>Git 会根据用户的名字和邮箱来记录提交,GitHub 也是用这些信息来做权限的处理,输入以下命令进行个人信息的设置,把名称和邮箱替换成你自己的,名字可以不是 GitHub 的昵称,但为了方便记忆,建议与 GitHub  一致<br><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">$ git config --global user.name &quot;此处填你的用户名&quot;</span><br><span class="line">$ git config --global user.email &quot;此处填你的邮箱&quot;</span><br></pre></td></tr></table></figure></p>
<p>到此为止 SSH Key 配置成功,本机已成功连接到 Github</p>
T
TRHX 已提交
610 611 612 613
<h1 id="–-将本地的-Hexo-文件更新到-Github-的库中"><a href="#–-将本地的-Hexo-文件更新到-Github-的库中" class="headerlink" title="– 将本地的 Hexo 文件更新到 Github 的库中"></a><font color="#FF000">– 将本地的 Hexo 文件更新到 Github 的库中</font></h1><p>一、登录 Github 打开自己的项目 <font color="#DC143C">yourname.github.io</font><br><img src="https://cdn.jsdelivr.net/gh/TRHX/ImageHosting/ITRHX-PIC/A02/17.jpg" alt="17"></p>
<p>二、鼠标移到 <font color="#DC143C">Clone or download</font> 按钮,选择 <font color="#DC143C">Use SSH</font><br><img src="https://cdn.jsdelivr.net/gh/TRHX/ImageHosting/ITRHX-PIC/A02/18.jpg" alt="18"></p>
<p>三、一键复制地址<br><img src="https://cdn.jsdelivr.net/gh/TRHX/ImageHosting/ITRHX-PIC/A02/19.jpg" alt="19"></p>
<p>四、打开你创建的 <font color="#DC143C">Hexo</font> 文件夹(如:<font color="#DC143C">E:\TRHX_Blog\Hexo</font>),右键用记事本(或者Notepad++、Vs Code等)打开该文件夹下的 <font color="#DC143C">_config.yml</font> 文件<br><img src="https://cdn.jsdelivr.net/gh/TRHX/ImageHosting/ITRHX-PIC/A02/20.jpg" alt="20"></p>
T
TRHX 已提交
614
<p>五、按下图修改 <font color="#DC143C">_config.yml</font> 文件并保存<br><img src="https://cdn.jsdelivr.net/gh/TRHX/ImageHosting/ITRHX-PIC/A02/21.png" alt="21"></p>
T
TRHX 已提交
615 616 617 618 619 620 621 622 623 624 625
<p>六、在 <font color="#DC143C">Hexo</font> 文件夹下分别执行以下命令<br><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">$ hexo g</span><br><span class="line">$ hexo d</span><br></pre></td></tr></table></figure></p>
<p>或者直接执行<br><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">$ hexo g -d</span><br></pre></td></tr></table></figure></p>
<p>执行完之后会让你输入你的 Github 的账号和密码,如果此时报以下错误,说明你的 deployer 没有安装成功<br><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">ERROR Deployer not found: git</span><br></pre></td></tr></table></figure></p>
<p>需要执行以下命令再安装一次:<br><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">npm install hexo-deployer-git --save</span><br></pre></td></tr></table></figure></p>
<p>再执行 <font color="#DC143C"><code>hexo g -d</code></font>,你的博客就会部署到 Github 上了</p>
<p>七、访问博客</p>
<p>你的博客地址:<font color="#DC143C">https://你的用户名.github.io</font>,比如我的是:<font color="#DC143C"><a href="https://trhx.github.io" target="_blank" rel="noopener">https://trhx.github.io</a></font> ,现在每个人都可以通过此链接访问你的博客了</p>
<h1 id="–-如何在博客上发表文章"><a href="#–-如何在博客上发表文章" class="headerlink" title="– 如何在博客上发表文章"></a><font color="#FF000">– 如何在博客上发表文章</font></h1><p>博客已经成功搭建了,但是我们该怎么写博客呢?</p>
<p>一、新建一个空文章,输入以下命令,会在项目 <font color="#DC143C">\Hexo\source\_posts</font> 中生成 <font color="#DC143C">文章标题.md</font> 文件,文章标题根据需要命名<br><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">$ hexo n &quot;文章标题&quot;</span><br></pre></td></tr></table></figure></p>
<p>也可以直接在 <font color="#DC143C">\Hexo\source\_posts</font> 目录下右键鼠标新建文本文档,改后缀为 <font color="#DC143C">.md</font> 即可,这种方法比较方便</p>
<p>二、用编辑器编写文章</p>
T
TRHX 已提交
626
<font color="#DC143C">md</font> 全称 Markdown, Markdown 是 2004 年由 John Gruberis 设计和开发的纯文本格式的语法,非常的简单实用,常用的标记符号屈指可数,几分钟即可学会, <font color="#DC143C">.md</font> 文件可以使用支持 Markdown 语法的编辑器编辑,然后将写好的文章(.md文件)保存到 <font color="#DC143C">\Hexo\source\_posts</font> 文件夹下即可<br><br>推荐 Windows 上使用 <font color="#DC143C">MarkdownPad2</font> 或者 <font color="#DC143C">小书匠</font> 编辑器,macOS 上使用 <font color="#DC143C">Mou</font> 编辑器,Linux 上使用 <font color="#DC143C">Remarkable</font> 编辑器,Web 端上使用<font color="#DC143C"> 简书</font> ,另外可以参考我的另一篇文章:<a href="https://www.itrhx.com/2018/08/29/A05-Markdown-editor-recommendation/">《主流 Markdown 编辑器推荐》</a><br>当我们用编辑器写好文章后,可以使用以下命令将其推送到服务器上<br><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">$ hexo g</span><br><span class="line">$ hexo d</span><br></pre></td></tr></table></figure><br><br>或者将两个命令合二为一输入以下命令:<br><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">$ hexo d -g</span><br></pre></td></tr></table></figure><br><br>现在访问你的博客就可以看见写好的文章啦!<br>参考资料:<a href="https://blog.csdn.net/jinhui157/article/details/73872795" target="_blank" rel="noopener">《10款流行的Markdown编辑器》</a> (By xiaoxiao_engineer)<br>     <a href="https://www.jianshu.com/p/q81RER/" target="_blank" rel="noopener">《献给写作者的 Markdown 新手指南》</a> (By 简书)<br>     <a href="https://sspai.com/post/25137" target="_blank" rel="noopener">《认识与入门 Markdown》</a> (By Te_Lee)<br>     <a href="http://ibruce.info/2013/11/26/markdown/" target="_blank" rel="noopener">《markdown简明语法》</a> (By 不如)<br>     <a href="https://www.jianshu.com/p/191d1e21f7ed" target="_blank" rel="noopener">《markdown基本语法》</a> (By 高鸿祥)<br>     <a href="http://www.liuhaihua.cn/archives/143443.html" target="_blank" rel="noopener">《Markdown 公式指导手册》</a> (By Harries)<br><br><br># <font color="#FF000">– 如何为博客更换自己喜欢的主题</font>
T
TRHX 已提交
627 628

<p>博客也搭建好了,文章也会写了,但是!!!默认的主题并不喜欢怎么办?现在,我们就来为自己的博客更换自己喜欢的主题</p>
T
TRHX 已提交
629 630
<p><a href="https://hexo.io/themes/" target="_blank" rel="noopener">点击此处</a>进入 Hexo 官网的主题专栏,我们可以看见有许多的主题供我们选择<br><img src="https://cdn.jsdelivr.net/gh/TRHX/ImageHosting/ITRHX-PIC/A02/22.jpg" alt="22"></p>
<p>我们要做的就是把主题克隆过来,在此我们以主题 <font color="#DC143C">Aero-Dual</font> 为例,点进去我们就可以看见该主题作者的博客,鼠标滑到底,我们可以看见 <font color="#DC143C">Theme By Levblanc</font> 的字样(其他主题类似),点击作者 <font color="#DC143C">Levblanc</font> ,页面就会跳转到该主题所有的相关文件在 Github 上的地址,复制该地址<br><img src="https://cdn.jsdelivr.net/gh/TRHX/ImageHosting/ITRHX-PIC/A02/23.png" alt="23"><br><img src="https://cdn.jsdelivr.net/gh/TRHX/ImageHosting/ITRHX-PIC/A02/24.jpg" alt="24"><br><img src="https://cdn.jsdelivr.net/gh/TRHX/ImageHosting/ITRHX-PIC/A02/25.jpg" alt="25"></p>
T
TRHX 已提交
631 632
<p>再打开 <font color="#DC143C">Hexo</font> 文件夹下的 <font color="#DC143C">themes</font> 目录(如:<font color="#DC143C">E:\TRHX_Blog\Hexo\themes</font>),右键 <font color="#DC143C">Git Bash Here</font>,输入以下命令:<br><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">$ git clone 此处填写你刚才复制的主题地址</span><br></pre></td></tr></table></figure></p>
<p>比如要安装 <font color="#DC143C">Aero-Dual</font> 主题,则输入命令:<br><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">$ git clone https://github.com/levblanc/hexo-theme-aero-dual</span><br></pre></td></tr></table></figure></p>
T
TRHX 已提交
633
<p>等待下载完成后即可在 <font color="#DC143C">themes</font> 目录下生成 <font color="#DC143C">hexo-theme-aero-dual</font> 文件夹,然后打开 <font color="#DC143C">Hexo</font> 文件夹下的配置文件 <font color="#DC143C">_config.yml</font> ,找到关键字 <font color="#DC143C">theme</font>,修改参数为:<font color="#DC143C">theme:hexo-theme-aero-dual</font> (其他主题修改成相应名称即可),再次注意冒号后面有一个空格!<br><img src="https://cdn.jsdelivr.net/gh/TRHX/ImageHosting/ITRHX-PIC/A02/26.jpg" alt="26"></p>
T
TRHX 已提交
634 635 636 637 638 639
<p>返回 <font color="#DC143C">Hexo</font> 目录,右键 <font color="#DC143C">Git Bash Here</font> ,输入以下命令开始部署主题:<br><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">$ hexo g   </span><br><span class="line">$ hexo s</span><br></pre></td></tr></table></figure></p>
<p>此时打开浏览器,访问 <a href="http://localhost:4000/" target="_blank" rel="noopener">http://localhost:4000/</a>  就可看见我们的主题已经更换了,如果感觉效果满意,我们就可以把它部署到Github上了</p>
<p>打开 <font color="#DC143C">Hexo</font> 文件夹,右键 <font color="#DC143C">Git Bash Here</font> ,输入以下命令:<br><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">$ hexo clean  </span><br><span class="line">//该命令的作用是清除缓存,若不输入此命令,服务器有可能更新不了主题</span><br><span class="line">$ hexo g -d</span><br></pre></td></tr></table></figure></p>
<p>此时访问自己的博客即可看见更换后的主题,但我们仍然需要对主题的相关配置进行修改,比如网站标题,图标等等,Hexo 中有两份主要的配置文件,名称都是  <font color="#DC143C">_config.yml</font> ,它们均是用于站点配置使用的。其中,一份位于站点根目录下(比如我的:<font color="#DC143C">E:\TRHX_Blog\Hexo\_config.yml</font>),主要包含 Hexo 本身整站的配置;另一份位于主题目录下(比如我的:<font color="#DC143C">E:\TRHX_Blog\Hexo\themes\hexo-theme-aero-dual\_config.yml</font>),这份配置由主题作者提供,主要用于配置主题相关的选项,一般  <font color="#DC143C">_config.yml</font>  文件里都有相关注释,按需修改即可</p>
<p>参考资料:<a href="https://www.zhihu.com/question/24422335" target="_blank" rel="noopener">《有哪些好看的 Hexo 主题?》</a> (知乎)<br>     <a href="https://hexo.io/zh-cn/docs/configuration.html" target="_blank" rel="noopener">《Hexo | 配置》</a> (Hexo官方文档)<br>     <a href="https://segmentfault.com/a/1190000002632530" target="_blank" rel="noopener">《hexo常用命令笔记》</a> (By 小弟调调)</p>
<h1 id="–-为你的-Hexo-博客配置个性域名"><a href="#–-为你的-Hexo-博客配置个性域名" class="headerlink" title="– 为你的 Hexo 博客配置个性域名"></a><font color="#FF000">– 为你的 Hexo 博客配置个性域名</font></h1><p>本人在配置域名的时候问题百出,百度的各种方法都不管用,打开网站总是 404,可能是我太笨了  o(╥﹏╥)o ,不过好在后来终于解决了这个问题</p>
T
TRHX 已提交
640 641
<p>首先我们要购买域名,<a href="https://www.aliyun.com" target="_blank" rel="noopener">阿里云</a><a href="https://cloud.tencent.com" target="_blank" rel="noopener">腾讯云</a>都可以,也不贵,一年几十块钱,最便宜几块钱也能买到,以阿里云为例,我购买的域名是 <a href="https://www.itrhx.com">itrhx.com</a>,购买过程就不赘述了,选择阿里云的解析平台,来到阿里云的管理控制台,点击进入域名解析列表或者直接点击域名后面的解析<br><img src="https://cdn.jsdelivr.net/gh/TRHX/ImageHosting/ITRHX-PIC/A02/27.jpg" alt="27"></p>
<p>方法一:点击添加记录,需要添加两个记录,两个记录类型都是 <font color="#DC143C">CNAME</font> ,第一个主机记录为 <font color="#DC143C">@</font> ,第二个主机记录为 <font color="#DC143C">www</font>,记录值都是填你自己的博客地址(比如我的是:<font color="#DC143C"><a href="http://trhx.github.io" target="_blank" rel="noopener">trhx.github.io</a></font>),保存之后域名解析就完成了!<br><img src="https://cdn.jsdelivr.net/gh/TRHX/ImageHosting/ITRHX-PIC/A02/28.jpg" alt="28"><br>方法二:两个记录类型为 <font color="#DC143C">A</font> ,第一个主机记录为 <font color="#DC143C">@</font> ,第二个主机记录为 <font color="#DC143C">www</font>,记录值都为博客的 <font color="#DC143C">IP</font> 地址,<font color="#DC143C">IP</font> 地址可以 <font color="#DC143C">cmd</font> 中输入 <font color="#DC143C">ping 你的博客地址</font> 获得(比如我的:<font color="#DC143C">ping trhx.github.io</font>),保存之后域名解析就完成了!<br><img src="https://cdn.jsdelivr.net/gh/TRHX/ImageHosting/ITRHX-PIC/A02/29.jpg" alt=""><br>有关解析记录类型的区别可以参考<a href="https://blog.csdn.net/it_man/article/details/9017307" target="_blank" rel="noopener">《域名解析中A记录、CNAME、MX记录、NS记录的区别和联系》</a> </p>
T
TRHX 已提交
642 643 644 645 646 647 648 649
<p>为了使 GitHub 接收我们的域名,还需要在博客的根目录下添加一个名为 <font color="#DC143C">CNAME</font> 的文件(<font color="#DC143C">注意不要加.txt,没有任何后缀名!</font>),这个文件放到 <font color="#DC143C">Hexo</font> 文件夹的 <font color="#DC143C">source</font> 里面,(比如我的是:<font color="#DC143C">E:\TRHX_Blog\Hexo\source</font>),文件里面填写你的域名(<font color="#DC143C">加不加www都行</font>),比如要填写我的域名,文件里面就写:<font color="#DC143C"><a href="http://www.itrhx.com">www.itrhx.com</a></font> 或者 <font color="#DC143C">itrhx.com</font>,经过以上操作,别人就可以通过 <a href="http://www.itrhx.com">www.itrhx.com</a><a href="https://itrhx.com" target="_blank" rel="noopener">itrhx.com</a><a href="https://trhx.github.io" target="_blank" rel="noopener">trhx.github.io</a> 三个当中任意一个访问我的博客了!你的也一样!</p>
<p>有关加不加www的问题有以下区别:</p>
<blockquote>
<p>如果你填写的是没有www的,比如 itrhx.com,那么无论是访问 <a href="https://www.itrhx.com">https://www.itrhx.com</a> 还是 <a href="https://itrhx.com" target="_blank" rel="noopener">https://itrhx.com</a> ,都会自动跳转到 <a href="https://itrhx.com" target="_blank" rel="noopener">https://itrhx.com</a></p>
</blockquote>
<blockquote>
<p>如果你填写的是带www的,比如 <a href="http://www.itrhx.com">www.itrhx.com</a> ,那么无论是访问 <a href="https://www.itrhx.com">https://www.itrhx.com</a> 还是 <a href="https://itrhx.com" target="_blank" rel="noopener">https://itrhx.com</a> ,都会自动跳转到 <a href="http://www.itrhx.com">http://www.itrhx.com</a></p>
</blockquote>
T
TRHX 已提交
650
<p><img src="https://cdn.jsdelivr.net/gh/TRHX/ImageHosting/ITRHX-PIC/A02/30.jpg" alt="30"></p>
T
TRHX 已提交
651 652 653 654 655
<p>如果你在其他平台购买域名,或者选择 <a href="https://www.dnspod.cn" target="_blank" rel="noopener">DNSPod</a> 等其他域名解析,操作方法大同小异,遇到问题可自行百度解决!</p>
<p>参考资料:<a href="https://zhuanlan.zhihu.com/p/27349039" target="_blank" rel="noopener">《推荐几家域名注册服务商》</a>  (By Jelly Bool)<br>     <a href="http://www.chinaz.com/web/2015/0122/380042.shtml" target="_blank" rel="noopener">《盘点十大免费DNS域名解析服务:稳定、可靠》</a></p>
<h1 id="–-结语"><a href="#–-结语" class="headerlink" title="– 结语"></a><font color="#FF000">– 结语</font></h1><p>一顿操作下来虽然有点儿累,但看见拥有了自己的博客还是非常有成就感的,人生就是需要折腾,那么现在就开始你的创作之旅吧!文章的不断积累,你会从中受益很多的!另外,这是一篇小白写的适用于小白的博客搭建教程,比较详细,有这方面基础的可以百度有简略一点儿的教程,文中如有错误还请大佬指出改正!文中涉及参考资料如有侵权请联系我删除!</p>

        </div>
T
TRHX 已提交
656
        <hr /><br>
T
TRHX 已提交
657
        
T
TRHX 已提交
658 659 660
          <div class="img_container"><a href="https://www.courseduck.com/programming/python/" target="_blank"><img src="https://www.courseduck.com/global/images/Python_header.jpg" class="img-responsive" alt="CourseDuck Python Banner"></a></div>
        
        
T
TRHX 已提交
661 662 663 664 665 666 667 668 669
          <div id="reward">
  
  <div>您的喜欢是作者写作最大的动力!❤️</div>
  
  <div class="reward">
    <a href="https://github.com/Kaiyuan/donate-page" target="_blank" class=" tr3" title="Github"><span
        id="github"></span></a>
    <ul id="RewardBox" class="list pos-f tr3">
      
T
TRHX 已提交
670
      <li id="PayPal" title="PayPal打赏"><a href="https://paypal.me/trhx" target="_blank">PayPal</a></li>
T
TRHX 已提交
671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692
      
      
      <li id="AliPayOR" title="支付宝打赏">AliPay</li>
      
      
      <li id="WeChatPayOR" title="微信打赏">WeChatPay</li>
      
      
      <li id="QQPayOR" title="QQ打赏">QQPay</li>
      
    </ul>
    <div id="RewardText" class="tr3">Donate</div>
    <div id="QRBox" class="pos-f left-100">
      <div id="MainBox"></div>
    </div>
  </div>
</div>
<script src="https://ajax.aspnetcdn.com/ajax/jQuery/jquery-2.0.3.min.js"></script>
<script>
  jQuery(document).ready(function () {
    var QRBox = $('#QRBox');
    var MainBox = $('#MainBox');
T
TRHX 已提交
693 694 695
    var AliPayOR = 'https://cdn.jsdelivr.net/gh/TRHX/CDN-for-itrhx.com@3.1.0/images/reward/AliPayQR.png';
    var WeChatPayOR = 'https://cdn.jsdelivr.net/gh/TRHX/CDN-for-itrhx.com@3.1.0/images/reward/WeChatQR.png';
    var QQPayOR = 'https://cdn.jsdelivr.net/gh/TRHX/CDN-for-itrhx.com@3.1.0/images/reward/QQPayQR.png';
T
TRHX 已提交
696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732

    function showQR(QR) {
      if (QR) {
        MainBox.css('background-image', 'url(' + QR + ')');
      }
      $('#RewardText,#RewardBox,#github').addClass('blur');
      QRBox.fadeIn(300, function (argument) {
        MainBox.addClass('showQR');
      });
    }

    $('#RewardBox>li').click(function (event) {
      var thisID = $(this).attr('id');
      if (thisID === 'AliPayOR') {
        showQR(AliPayOR);
      } else if (thisID === 'WeChatPayOR') {
        showQR(WeChatPayOR);
      } else if (thisID === 'QQPayOR') {
        showQR(QQPayOR);
      }
    });

    MainBox.click(function (event) {
      MainBox.removeClass('showQR').addClass('hideQR');
      setTimeout(function (a) {
        QRBox.fadeOut(300, function (argument) {
          MainBox.removeClass('hideQR');
        });
        $('#RewardText,#RewardBox,#github').removeClass('blur');
      }, 600);

    });
  });
</script>

        
        
T
TRHX 已提交
733 734 735 736 737 738 739 740
          


  <section class='meta' id="footer-meta">
    <hr>
    <div class='new-meta-box'>
      
        
T
TRHX 已提交
741
          <div class="new-meta-item date" itemprop="dateUpdated" datetime="2020-04-26T12:01:45+08:00">
T
TRHX 已提交
742 743
  <a class='notlink'>
    <i class="fas fa-clock" aria-hidden="true"></i>
T
TRHX 已提交
744
    <p>最后更新于 2020年4月26日</p>
T
TRHX 已提交
745 746 747 748 749 750 751
  </a>
</div>

        
      
        
          
T
TRHX 已提交
752
  
T
TRHX 已提交
753
  <div class="new-meta-item meta-tags"><a class="tag" href="/tags/Github-Pages/" rel="nofollow"><i class="fas fa-tags" aria-hidden="true"></i>&nbsp;<p>Github Pages</p></a></div> <div class="new-meta-item meta-tags"><a class="tag" href="/tags/Hexo/" rel="nofollow"><i class="fas fa-tags" aria-hidden="true"></i>&nbsp;<p>Hexo</p></a></div>
T
TRHX 已提交
754 755 756 757 758 759


        
      
        
          
T
TRHX 已提交
760 761 762 763 764 765
  <div class="new-meta-item share -mob-share-list">
  <div class="-mob-share-list share-body">
    
      
        <a class="-mob-share-qq" title="QQ好友" rel="external nofollow noopener noreferrer"
          
T
TRHX 已提交
766
          href="http://connect.qq.com/widget/shareqq/index.html?url=https://www.itrhx.com/2018/08/15/A02-hexo-blog/&title=使用 Github Pages 和 Hexo 搭建自己的独立博客 | TRHX'S BLOG&pics=https://cdn.jsdelivr.net/gh/TRHX/CDN-for-itrhx.com@3.0.4/images/trhx.png&summary="
T
TRHX 已提交
767 768 769 770 771 772 773 774 775 776 777
          
          >
          
            <img src="https://cdn.jsdelivr.net/gh/xaoxuu/assets@19.1.9/logo/128/qq.png">
          
        </a>
      
    
      
        <a class="-mob-share-qzone" title="QQ空间" rel="external nofollow noopener noreferrer"
          
T
TRHX 已提交
778
          href="https://sns.qzone.qq.com/cgi-bin/qzshare/cgi_qzshare_onekey?url=https://www.itrhx.com/2018/08/15/A02-hexo-blog/&title=使用 Github Pages 和 Hexo 搭建自己的独立博客 | TRHX'S BLOG&pics=https://cdn.jsdelivr.net/gh/TRHX/CDN-for-itrhx.com@3.0.4/images/trhx.png&summary="
T
TRHX 已提交
779 780 781 782 783 784 785 786 787
          
          >
          
            <img src="https://cdn.jsdelivr.net/gh/xaoxuu/assets@19.1.9/logo/128/qzone.png">
          
        </a>
      
    
      
T
TRHX 已提交
788
        <a class='qrcode' rel="external nofollow noopener noreferrer" href='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMYAAADGCAAAAACs8KCBAAACKklEQVR42u3aMXYDIQxFUe9/05M2RSDvS7gY8ah8MmPMpVCQ0OeDx7MY+6e/31nNRv5+bMiQIeO1DLKI2uJWM+yfFjdIhgwZFzBWy1q9Q6beL538FnlfhgwZMvrBkQRfvn0yZMiQkTL2M+zzzc7MMmTIuJNxKlzuF7Q/RJLgfiAXlyFDxgsZ/RD5vc9fud+QIUPGqxhPOMgFJA+atTX8MY8MGTJGM3iA4wey2sGRJNX/zCBDhoyhDHL1WGu/qJXkSCiXIUPGbYza9SEPkaRsxxdKeDJkyJjKSMNumsrWtiO+AJAhQ8ZQRnopyAMr+W4tlUV3sDJkyBjEIMEubdXiiW56QAyCrwwZMi5g8HCZ/lj/W+h/iAwZMi5gdBojjlX+aimuDBkyxjH2PvI0qOqBDSomzDJkyLiA0Wm54Mln3DCBD6YyZMiYzUjPjyQI8pJZvzAXnHBlyJDxWgZPO9Pyff/YFwRiGTJkjGb0rxLTN09RZciQcScjLY3xa8Vac0a6fTJkyJjN4EqedvItqAXoZe1QhgwZFzBO1fDIZ74dwS2HDBkyRjNqS6ktq9aogW42ZMiQMY7xhOMbhblO65gMGTJuYNTCHG/wSjclDfQxTIYMGa9l9INsrSRX27IgiZUhQ8Y4RtrWQKi1p0WkDBkyZDSCb9psUaTKkCFDRpi4ktYKHmrJ4VWGDBk3MEgSS4r7HNxptpAhQ8ZtDJ46dsr9JICmiasMGTIuYPwAcX2TYdbPhR0AAAAASUVORK5CYII='>
T
TRHX 已提交
789 790 791 792 793 794 795 796 797
        
          <img src="https://cdn.jsdelivr.net/gh/xaoxuu/assets@19.1.9/logo/128/wechat.png">
        
        </a>
      
    
      
        <a class="-mob-share-weibo" title="微博" rel="external nofollow noopener noreferrer"
          
T
TRHX 已提交
798
          href="http://service.weibo.com/share/share.php?url=https://www.itrhx.com/2018/08/15/A02-hexo-blog/&title=使用 Github Pages 和 Hexo 搭建自己的独立博客 | TRHX'S BLOG&pics=https://cdn.jsdelivr.net/gh/TRHX/CDN-for-itrhx.com@3.0.4/images/trhx.png&summary="
T
TRHX 已提交
799 800 801 802 803 804 805 806 807
          
          >
          
            <img src="https://cdn.jsdelivr.net/gh/xaoxuu/assets@19.1.9/logo/128/weibo.png">
          
        </a>
      
    
      
T
TRHX 已提交
808
        <a class='qrcode' rel="external nofollow noopener noreferrer" href='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMYAAADGCAAAAACs8KCBAAACKklEQVR42u3aMXYDIQxFUe9/05M2RSDvS7gY8ah8MmPMpVCQ0OeDx7MY+6e/31nNRv5+bMiQIeO1DLKI2uJWM+yfFjdIhgwZFzBWy1q9Q6beL538FnlfhgwZMvrBkQRfvn0yZMiQkTL2M+zzzc7MMmTIuJNxKlzuF7Q/RJLgfiAXlyFDxgsZ/RD5vc9fud+QIUPGqxhPOMgFJA+atTX8MY8MGTJGM3iA4wey2sGRJNX/zCBDhoyhDHL1WGu/qJXkSCiXIUPGbYza9SEPkaRsxxdKeDJkyJjKSMNumsrWtiO+AJAhQ8ZQRnopyAMr+W4tlUV3sDJkyBjEIMEubdXiiW56QAyCrwwZMi5g8HCZ/lj/W+h/iAwZMi5gdBojjlX+aimuDBkyxjH2PvI0qOqBDSomzDJkyLiA0Wm54Mln3DCBD6YyZMiYzUjPjyQI8pJZvzAXnHBlyJDxWgZPO9Pyff/YFwRiGTJkjGb0rxLTN09RZciQcScjLY3xa8Vac0a6fTJkyJjN4EqedvItqAXoZe1QhgwZFzBO1fDIZ74dwS2HDBkyRjNqS6ktq9aogW42ZMiQMY7xhOMbhblO65gMGTJuYNTCHG/wSjclDfQxTIYMGa9l9INsrSRX27IgiZUhQ8Y4RtrWQKi1p0WkDBkyZDSCb9psUaTKkCFDRpi4ktYKHmrJ4VWGDBk3MEgSS4r7HNxptpAhQ8ZtDJ46dsr9JICmiasMGTIuYPwAcX2TYdbPhR0AAAAASUVORK5CYII='>
T
TRHX 已提交
809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833
        
          <img src="https://cdn.jsdelivr.net/gh/xaoxuu/assets@19.1.9/logo/128/qrcode.png">
        
        </a>
      
    
  </div>
</div>



        
      
    </div>
  </section>


        
        
            <div class="prev-next">
                
                    <section class="prev">
                        <span class="art-item-left">
                            <h6><i class="fas fa-chevron-left" aria-hidden="true"></i>&nbsp;上一页</h6>
                            <h4>
T
TRHX 已提交
834
                                <a href="/2018/08/25/A03-markdown/" rel="prev" title="Markdown 语法&amp;技巧总结">
T
TRHX 已提交
835 836 837 838 839 840 841 842
                                  
                                      Markdown 语法&amp;技巧总结
                                  
                                </a>
                            </h4>
                            
                                
                                <h6 class="tags">
T
TRHX 已提交
843
                                    <a class="tag" href="/tags/Markdown/"><i class="fas fa-tags fa-fw" aria-hidden="true"></i>&nbsp;Markdown</a> <a class="tag" href="/tags/技巧/"><i class="fas fa-tags fa-fw" aria-hidden="true"></i>&nbsp;技巧</a>
T
TRHX 已提交
844 845 846 847 848 849 850 851 852 853
                                </h6>
                            
                        </span>
                    </section>
                
                
                    <section class="next">
                        <span class="art-item-right" aria-hidden="true">
                            <h6>下一页&nbsp;<i class="fas fa-chevron-right" aria-hidden="true"></i></h6>
                            <h4>
T
TRHX 已提交
854
                                <a href="/2018/08/10/A01-hello-world/" rel="prev" title="Hello World!">
T
TRHX 已提交
855 856 857 858 859 860 861 862
                                    
                                        Hello World!
                                    
                                </a>
                            </h4>
                            
                                
                                <h6 class="tags">
T
TRHX 已提交
863
                                    <a class="tag" href="/tags/BLOG/"><i class="fas fa-tags fa-fw" aria-hidden="true"></i>&nbsp;BLOG</a>
T
TRHX 已提交
864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923
                                </h6>
                            
                        </span>
                    </section>
                
            </div>
        
      </section>
    </article>
  

  
    <!-- 显示推荐文章和评论 -->



  <article class="post white-box comments">
    <section class="article typo">
      <h4><i class="fas fa-comments fa-fw" aria-hidden="true"></i>&nbsp;评论</h4>
      
      
      
        <section id="comments">
          <div id="gitalk-container"></div>
        </section>
      
      
    </section>
  </article>


  




<!-- 根据页面mathjax变量决定是否加载MathJax数学公式js -->



  <script>
    window.subData = {
      title: '使用 Github Pages 和 Hexo 搭建自己的独立博客',
      tools: true
    }
  </script>


</div>
<aside class='l_side'>
  
    
    
      
        
          
          
            <section class='widget author'>
  <div class='content pure'>
    
T
TRHX 已提交
924 925 926 927
      <div class='avatar'>
        <img class='avatar' src='https://cdn.jsdelivr.net/gh/TRHX/CDN-for-itrhx.com@3.1.0/images/trhx.png'/>
      </div>
    
T
TRHX 已提交
928 929 930
    
      <div class='text'>
        
T
TRHX 已提交
931
          <h2>๑۩ﺴ&nbsp;&nbsp;TRHX&nbsp;&nbsp;ﺴ۩๑</h2>
T
TRHX 已提交
932 933 934 935 936
        
        
        
      </div>
    
T
TRHX 已提交
937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979
    <!-- 彩色滚动字体 -->
    <div id="binft" align="center"></div>
    <script>
      var binft = function (r) {
        function t() {
          return b[Math.floor(Math.random() * b.length)]
        }  
        function e() {
          return String.fromCharCode(94 * Math.random() + 33)
        }
        function n(r) {
          for (var n = document.createDocumentFragment(), i = 0; r > i; i++) {
            var l = document.createElement("span");
            l.textContent = e(), l.style.color = t(), n.appendChild(l)
          }
          return n
        }
        function i() {
          var t = o[c.skillI];
          c.step ? c.step-- : (c.step = g, c.prefixP < l.length ? (c.prefixP >= 0 && (c.text += l[c.prefixP]), c.prefixP++) : "forward" === c.direction ? c.skillP < t.length ? (c.text += t[c.skillP], c.skillP++) : c.delay ? c.delay-- : (c.direction = "backward", c.delay = a) : c.skillP > 0 ? (c.text = c.text.slice(0, -1), c.skillP--) : (c.skillI = (c.skillI + 1) % o.length, c.direction = "forward")), r.textContent = c.text, r.appendChild(n(c.prefixP < l.length ? Math.min(s, s + c.prefixP) : Math.min(s, t.length - c.skillP))), setTimeout(i, d)
        }
        var l = "",
        o = ["Stay Hungry, Stay Foolish!"].map(function (r) {
        return r + ""
        }),
        a = 2,
        g = 1,
        s = 5,
        d = 75,
        b = ["rgb(110,64,170)", "rgb(150,61,179)", "rgb(191,60,175)", "rgb(228,65,157)", "rgb(254,75,131)", "rgb(255,94,99)", "rgb(255,120,71)", "rgb(251,150,51)", "rgb(226,183,47)", "rgb(198,214,60)", "rgb(175,240,91)", "rgb(127,246,88)", "rgb(82,246,103)", "rgb(48,239,130)", "rgb(29,223,163)", "rgb(26,199,194)", "rgb(35,171,216)", "rgb(54,140,225)", "rgb(76,110,219)", "rgb(96,84,200)"],
        c = {
          text: "",
          prefixP: -s,
          skillI: 0,
          skillP: 0,
          direction: "forward",
          delay: a,
          step: g
        };
        i()
        };
        binft(document.getElementById('binft'));
    </script>
T
TRHX 已提交
980 981 982 983 984 985 986 987 988 989 990 991
    
      <div class="social-wrapper">
        
          
            <a href="https://github.com/TRHX"
              class="social fab fa-github flat-btn"
              target="_blank"
              rel="external nofollow noopener noreferrer">
            </a>
          
        
          
T
TRHX 已提交
992
            <a href="https://itrhx.blog.csdn.net/"
T
TRHX 已提交
993 994 995 996 997 998 999
              class="social fab fa-cuttlefish flat-btn"
              target="_blank"
              rel="external nofollow noopener noreferrer">
            </a>
          
        
          
T
TRHX 已提交
1000
            <a href="https://www.zhihu.com/people/itrhx"
T
TRHX 已提交
1001 1002 1003 1004 1005 1006 1007
              class="social fab fa-zhihu flat-btn"
              target="_blank"
              rel="external nofollow noopener noreferrer">
            </a>
          
        
          
T
TRHX 已提交
1008
            <a href="mailto:admin@itrhx.com"
T
TRHX 已提交
1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055
              class="social fas fa-envelope flat-btn"
              target="_blank"
              rel="external nofollow noopener noreferrer">
            </a>
          
        
          
            <a href="http://wpa.qq.com/msgrd?v=3&uin=2273902448&site=qq&menu=yes"
              class="social fab fa-qq flat-btn"
              target="_blank"
              rel="external nofollow noopener noreferrer">
            </a>
          
        
      </div>
    
  </div>
</section>

          
        
      
        
          
          
            
  <section class='widget toc-wrapper'>
    
<header class='pure'>
  <div><i class="fas fa-list fa-fw" aria-hidden="true"></i>&nbsp;&nbsp;本文目录</div>
  
    <div class='wrapper'><a class="s-toc rightBtn" rel="external nofollow noopener noreferrer" href="javascript:void(0)"><i class="fas fa-thumbtack fa-fw"></i></a></div>
  
</header>

    <div class='content pure'>
      <ol class="toc"><li class="toc-item toc-level-1"><a class="toc-link" href="#–-前言"><span class="toc-text">– 前言</span></a></li><li class="toc-item toc-level-1"><a class="toc-link" href="#–-入门"><span class="toc-text">– 入门</span></a></li><li class="toc-item toc-level-1"><a class="toc-link" href="#–-安装-Node-js"><span class="toc-text">– 安装 Node.js</span></a></li><li class="toc-item toc-level-1"><a class="toc-link" href="#–-安装-Git"><span class="toc-text">– 安装 Git</span></a></li><li class="toc-item toc-level-1"><a class="toc-link" href="#–-检验软件是否安装成功"><span class="toc-text">– 检验软件是否安装成功</span></a></li><li class="toc-item toc-level-1"><a class="toc-link" href="#–-Hexo-安装"><span class="toc-text">– Hexo 安装</span></a></li><li class="toc-item toc-level-1"><a class="toc-link" href="#–-Hexo-初始化配置"><span class="toc-text">– Hexo 初始化配置</span></a></li><li class="toc-item toc-level-1"><a class="toc-link" href="#–-本地查看效果"><span class="toc-text">– 本地查看效果</span></a></li><li class="toc-item toc-level-1"><a class="toc-link" href="#–-将博客部署到-Github-Pages-上"><span class="toc-text">– 将博客部署到 Github Pages 上</span></a></li><li class="toc-item toc-level-1"><a class="toc-link" href="#–-将本地的-Hexo-文件更新到-Github-的库中"><span class="toc-text">– 将本地的 Hexo 文件更新到 Github 的库中</span></a></li><li class="toc-item toc-level-1"><a class="toc-link" href="#–-如何在博客上发表文章"><span class="toc-text">– 如何在博客上发表文章</span></a></li><li class="toc-item toc-level-1"><a class="toc-link" href="#–-为你的-Hexo-博客配置个性域名"><span class="toc-text">– 为你的 Hexo 博客配置个性域名</span></a></li><li class="toc-item toc-level-1"><a class="toc-link" href="#–-结语"><span class="toc-text">– 结语</span></a></li></ol>
    </div>
  </section>


          
        
      
        
          
          
T
TRHX 已提交
1056 1057 1058 1059 1060
            <section class='widget plain'>
  
<header class='pure'>
  <div><i class="fas fa-handshake fa-fw" aria-hidden="true"></i>&nbsp;&nbsp;欢迎光临</div>
  
T
TRHX 已提交
1061 1062
    <a class="rightBtn"
    
T
TRHX 已提交
1063
      rel="external nofollow noopener noreferrer"
T
TRHX 已提交
1064 1065 1066 1067
    
    
      target="_blank"
    
T
TRHX 已提交
1068 1069 1070
    href="https://www.revolvermaps.com/"
    title="https://www.revolvermaps.com/">
    <i class="fas fa-info-circle fa-fw"></i></a>
T
TRHX 已提交
1071 1072 1073 1074
  
</header>

  <div class='content pure'>
T
TRHX 已提交
1075
    <p><script type="text/javascript" src="//rf.revolvermaps.com/0/0/4.js?i=5eyl60h41k1&amp;m=6&amp;h=122&amp;c=ff0000&amp;r=30" async="async"></script><a id="goroups_button" class="goroups_button_new" target="_blank" href="https://jq.qq.com/?_wv=1027&k=5L7nNUS">Hexo QQ 交流群</a><a id="goroups_button" class="goroups_button_new" target="_blank" href="https://t.me/joinchat/Mro2h0uVt0DpDvOofWG65A">Telegram 交流群</a></p>
T
TRHX 已提交
1076

T
TRHX 已提交
1077 1078 1079 1080 1081 1082 1083 1084 1085
  </div>
</section>

          
        
      
        
          
          
T
TRHX 已提交
1086 1087 1088
            <section class='widget plain'>
  
<header class='pure'>
T
TRHX 已提交
1089
  <div><i class="fas fa-blog fa-fw" aria-hidden="true"></i>&nbsp;&nbsp;CSDN 内容合伙人</div>
T
TRHX 已提交
1090
  
T
TRHX 已提交
1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101
    <a class="rightBtn"
    
      rel="external nofollow noopener noreferrer"
    
    
      target="_blank"
    
    href="https://itrhx.blog.csdn.net/"
    title="https://itrhx.blog.csdn.net/">
    <i class="fas fa-info-circle fa-fw"></i></a>
  
T
TRHX 已提交
1102 1103 1104
</header>

  <div class='content pure'>
T
TRHX 已提交
1105
    <p><a href="https://itrhx.blog.csdn.net/" title="微信扫描二维码添加好友"><img src="https://img-blog.csdnimg.cn/20200610152107390.png"></a></p>
T
TRHX 已提交
1106 1107 1108 1109 1110 1111 1112 1113 1114 1115

  </div>
</section>

          
        
      
        
          
          
T
TRHX 已提交
1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135
            
  <section class='widget category'>
    
<header class='pure'>
  <div><i class="fas fa-folder-open fa-fw" aria-hidden="true"></i>&nbsp;&nbsp;文章分类</div>
  
    <a class="rightBtn"
    
      rel="nofollow"
    
    
    href="/categories/"
    title="categories/">
    <i class="fas fa-expand-arrows-alt fa-fw"></i></a>
  
</header>

    <div class='content pure'>
      <ul class="entry">
        
T
TRHX 已提交
1136
          <li><a class="flat-box" title="/categories/BLOG/" href="/categories/BLOG/"><div class='name'>BLOG</div><div class='badge'>(4)</div></a></li>
T
TRHX 已提交
1137
        
T
TRHX 已提交
1138
          <li><a class="flat-box" title="/categories/CDN/" href="/categories/CDN/"><div class='name'>CDN</div><div class='badge'>(1)</div></a></li>
T
TRHX 已提交
1139
        
T
TRHX 已提交
1140
          <li><a class="flat-box" title="/categories/Hexo/" href="/categories/Hexo/"><div class='name'>Hexo</div><div class='badge'>(9)</div></a></li>
T
TRHX 已提交
1141 1142 1143 1144
        
          <li><a class="flat-box" title="/categories/Java/" href="/categories/Java/"><div class='name'>Java</div><div class='badge'>(1)</div></a></li>
        
          <li><a class="flat-box" title="/categories/Linux/" href="/categories/Linux/"><div class='name'>Linux</div><div class='badge'>(2)</div></a></li>
T
TRHX 已提交
1145 1146 1147
        
          <li><a class="flat-box" title="/categories/Markdown/" href="/categories/Markdown/"><div class='name'>Markdown</div><div class='badge'>(2)</div></a></li>
        
T
TRHX 已提交
1148
          <li><a class="flat-box" title="/categories/Python3-学习笔记/" href="/categories/Python3-学习笔记/"><div class='name'>Python3 学习笔记</div><div class='badge'>(39)</div></a></li>
T
TRHX 已提交
1149
        
T
TRHX 已提交
1150
          <li><a class="flat-box child" title="/categories/Python3-学习笔记/基础学习/" href="/categories/Python3-学习笔记/基础学习/"><div class='name'>基础学习</div><div class='badge'>(9)</div></a></li>
T
TRHX 已提交
1151
        
T
TRHX 已提交
1152
          <li><a class="flat-box child" title="/categories/Python3-学习笔记/学习经验/" href="/categories/Python3-学习笔记/学习经验/"><div class='name'>学习经验</div><div class='badge'>(4)</div></a></li>
T
TRHX 已提交
1153
        
T
TRHX 已提交
1154 1155
          <li><a class="flat-box child" title="/categories/Python3-学习笔记/爬虫学习/" href="/categories/Python3-学习笔记/爬虫学习/"><div class='name'>爬虫学习</div><div class='badge'>(18)</div></a></li>
        
T
TRHX 已提交
1156
          <li><a class="flat-box child" title="/categories/Python3-学习笔记/爬虫实战/" href="/categories/Python3-学习笔记/爬虫实战/"><div class='name'>爬虫实战</div><div class='badge'>(8)</div></a></li>
T
TRHX 已提交
1157
        
T
TRHX 已提交
1158 1159
          <li><a class="flat-box" title="/categories/VPS/" href="/categories/VPS/"><div class='name'>VPS</div><div class='badge'>(1)</div></a></li>
        
T
TRHX 已提交
1160 1161
          <li><a class="flat-box" title="/categories/WEB前端/" href="/categories/WEB前端/"><div class='name'>WEB前端</div><div class='badge'>(2)</div></a></li>
        
T
TRHX 已提交
1162 1163
          <li><a class="flat-box" title="/categories/图床/" href="/categories/图床/"><div class='name'>图床</div><div class='badge'>(1)</div></a></li>
        
T
TRHX 已提交
1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192
      </ul>
    </div>
  </section>


          
        
      
        
          
          
            
  <section class='widget tagcloud'>
    
<header class='pure'>
  <div><i class="fas fa-fire fa-fw" aria-hidden="true"></i>&nbsp;&nbsp;热门标签</div>
  
    <a class="rightBtn"
    
      rel="nofollow"
    
    
    href="/tags/"
    title="tags/">
    <i class="fas fa-expand-arrows-alt fa-fw"></i></a>
  
</header>

    <div class='content pure'>
T
TRHX 已提交
1193
      <a href="/tags/12306/" style="font-size: 14px; color: #999">12306</a> <a href="/tags/58同城/" style="font-size: 14px; color: #999">58同城</a> <a href="/tags/Ajax/" style="font-size: 14px; color: #999">Ajax</a> <a href="/tags/BLOG/" style="font-size: 16.5px; color: #888">BLOG</a> <a href="/tags/Beautiful-Soup/" style="font-size: 14px; color: #999">Beautiful Soup</a> <a href="/tags/CDN/" style="font-size: 14px; color: #999">CDN</a> <a href="/tags/Coding-Pages/" style="font-size: 14px; color: #999">Coding Pages</a> <a href="/tags/Deepin/" style="font-size: 14px; color: #999">Deepin</a> <a href="/tags/Elicpse/" style="font-size: 14px; color: #999">Elicpse</a> <a href="/tags/GitHub-Pages/" style="font-size: 14px; color: #999">GitHub Pages</a> <a href="/tags/Github/" style="font-size: 14px; color: #999">Github</a> <a href="/tags/Github-Pages/" style="font-size: 14px; color: #999">Github Pages</a> <a href="/tags/HTTPS/" style="font-size: 16.5px; color: #888">HTTPS</a> <a href="/tags/Hexo/" style="font-size: 21.5px; color: #666">Hexo</a> <a href="/tags/ICP备案/" style="font-size: 14px; color: #999">ICP备案</a> <a href="/tags/JDBC/" style="font-size: 14px; color: #999">JDBC</a> <a href="/tags/JS-预加载/" style="font-size: 14px; color: #999">JS 预加载</a> <a href="/tags/Markdown/" style="font-size: 16.5px; color: #888">Markdown</a> <a href="/tags/Material-X/" style="font-size: 14px; color: #999">Material X</a> <a href="/tags/MongoDB/" style="font-size: 14px; color: #999">MongoDB</a> <a href="/tags/MySQL/" style="font-size: 14px; color: #999">MySQL</a> <a href="/tags/PEP8/" style="font-size: 14px; color: #999">PEP8</a> <a href="/tags/PicGo/" style="font-size: 14px; color: #999">PicGo</a> <a href="/tags/Pygame/" style="font-size: 14px; color: #999">Pygame</a> <a href="/tags/Python/" style="font-size: 16.5px; color: #888">Python</a> <a href="/tags/Redis/" style="font-size: 14px; color: #999">Redis</a> <a href="/tags/SEO/" style="font-size: 14px; color: #999">SEO</a> <a href="/tags/SQL-Server-2012/" style="font-size: 14px; color: #999">SQL Server 2012</a> <a href="/tags/SSR/" style="font-size: 14px; color: #999">SSR</a> <a href="/tags/Selenium/" style="font-size: 19px; color: #777">Selenium</a> <a href="/tags/Ubuntu/" style="font-size: 14px; color: #999">Ubuntu</a> <a href="/tags/User-Agent/" style="font-size: 14px; color: #999">User-Agent</a> <a href="/tags/VMware/" style="font-size: 16.5px; color: #888">VMware</a> <a href="/tags/VPS/" style="font-size: 14px; color: #999">VPS</a> <a href="/tags/XPath/" style="font-size: 14px; color: #999">XPath</a> <a href="/tags/if语句/" style="font-size: 14px; color: #999">if语句</a> <a href="/tags/input-函数/" style="font-size: 14px; color: #999">input()函数</a> <a href="/tags/instant-page/" style="font-size: 14px; color: #999">instant.page</a> <a href="/tags/jsDelivr/" style="font-size: 16.5px; color: #888">jsDelivr</a> <a href="/tags/lxml/" style="font-size: 14px; color: #999">lxml</a> <a href="/tags/pyspider/" style="font-size: 16.5px; color: #888">pyspider</a> <a href="/tags/requests/" style="font-size: 14px; color: #999">requests</a> <a href="/tags/spfk/" style="font-size: 14px; color: #999">spfk</a> <a href="/tags/urllib/" style="font-size: 14px; color: #999">urllib</a> <a href="/tags/while循环/" style="font-size: 14px; color: #999">while循环</a> <a href="/tags/主题个性化/" style="font-size: 14px; color: #999">主题个性化</a> <a href="/tags/代理/" style="font-size: 14px; color: #999">代理</a> <a href="/tags/公安备案/" style="font-size: 14px; color: #999">公安备案</a> <a href="/tags/函数/" style="font-size: 14px; color: #999">函数</a> <a href="/tags/列表/" style="font-size: 14px; color: #999">列表</a> <a href="/tags/变量/" style="font-size: 14px; color: #999">变量</a> <a href="/tags/哔哩哔哩/" style="font-size: 14px; color: #999">哔哩哔哩</a> <a href="/tags/图床/" style="font-size: 14px; color: #999">图床</a> <a href="/tags/图形验证码/" style="font-size: 14px; color: #999">图形验证码</a> <a href="/tags/垃圾/" style="font-size: 14px; color: #999">垃圾</a> <a href="/tags/备份/" style="font-size: 14px; color: #999">备份</a> <a href="/tags/字典/" style="font-size: 14px; color: #999">字典</a> <a href="/tags/安居客/" style="font-size: 14px; color: #999">安居客</a> <a href="/tags/年终总结/" style="font-size: 14px; color: #999">年终总结</a> <a href="/tags/异常/" style="font-size: 14px; color: #999">异常</a> <a href="/tags/技巧/" style="font-size: 14px; color: #999">技巧</a> <a href="/tags/操作列表/" style="font-size: 14px; color: #999">操作列表</a> <a href="/tags/数据类型/" style="font-size: 14px; color: #999">数据类型</a> <a href="/tags/文件/" style="font-size: 14px; color: #999">文件</a> <a href="/tags/文件储存/" style="font-size: 14px; color: #999">文件储存</a> <a href="/tags/无界面浏览器/" style="font-size: 14px; color: #999">无界面浏览器</a> <a href="/tags/模块/" style="font-size: 14px; color: #999">模块</a> <a href="/tags/正则表达式/" style="font-size: 14px; color: #999">正则表达式</a> <a href="/tags/滑动验证码/" style="font-size: 14px; color: #999">滑动验证码</a> <a href="/tags/点触验证码/" style="font-size: 14px; color: #999">点触验证码</a> <a href="/tags/爬虫/" style="font-size: 24px; color: #555">爬虫</a> <a href="/tags/猫眼电影/" style="font-size: 14px; color: #999">猫眼电影</a> <a href="/tags/瓜子二手车/" style="font-size: 14px; color: #999">瓜子二手车</a> <a href="/tags/类/" style="font-size: 14px; color: #999"></a> <a href="/tags/继承/" style="font-size: 14px; color: #999">继承</a> <a href="/tags/编辑器/" style="font-size: 14px; color: #999">编辑器</a> <a href="/tags/虎扑论坛/" style="font-size: 14px; color: #999">虎扑论坛</a> <a href="/tags/豆瓣电影/" style="font-size: 14px; color: #999">豆瓣电影</a>
T
TRHX 已提交
1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215
    </div>
  </section>

          
        
      
        
          
          
            



          
        
      
    

  
</aside>

<footer id="footer" class="clearfix">
T
TRHX 已提交
1216 1217 1218
    
    
      <div class="social-wrapper">
T
TRHX 已提交
1219
        
T
TRHX 已提交
1220 1221 1222 1223 1224 1225 1226
          
            <a href="https://github.com/TRHX"
              class="social fab fa-github flat-btn"
              target="_blank"
              rel="external nofollow noopener noreferrer">
            </a>
          
T
TRHX 已提交
1227
        
T
TRHX 已提交
1228 1229 1230 1231 1232 1233 1234
          
            <a href="https://itrhx.blog.csdn.net/"
              class="social fab fa-cuttlefish flat-btn"
              target="_blank"
              rel="external nofollow noopener noreferrer">
            </a>
          
T
TRHX 已提交
1235
        
T
TRHX 已提交
1236
          
T
TRHX 已提交
1237
            <a href="https://www.zhihu.com/people/itrhx"
T
TRHX 已提交
1238 1239 1240 1241 1242
              class="social fab fa-zhihu flat-btn"
              target="_blank"
              rel="external nofollow noopener noreferrer">
            </a>
          
T
TRHX 已提交
1243
        
T
TRHX 已提交
1244
          
T
TRHX 已提交
1245
            <a href="mailto:admin@itrhx.com"
T
TRHX 已提交
1246 1247 1248 1249 1250
              class="social fas fa-envelope flat-btn"
              target="_blank"
              rel="external nofollow noopener noreferrer">
            </a>
          
T
TRHX 已提交
1251
        
T
TRHX 已提交
1252 1253 1254 1255 1256 1257 1258
          
            <a href="http://wpa.qq.com/msgrd?v=3&amp;uin=2273902448&amp;site=qq&amp;menu=yes"
              class="social fab fa-qq flat-btn"
              target="_blank"
              rel="external nofollow noopener noreferrer">
            </a>
          
T
TRHX 已提交
1259
        
T
TRHX 已提交
1260 1261 1262
      </div>
    
    <br>
T
TRHX 已提交
1263
    Copyright <i class="far fa-copyright"></i> 2018-2020
T
TRHX 已提交
1264
    <a href="https://www.itrhx.com/" target="_blank"> TRHX&#39;S BLOG </a>
T
TRHX 已提交
1265 1266 1267 1268
    <img src="https://cdn.jsdelivr.net/gh/TRHX/CDN-for-itrhx.com@3.0.9/images/icp.png" style="width:18px;height:18px;margin-bottom:-2px" alt="ICP">
    <a href="http://www.beian.miit.gov.cn/" target="_blank">鄂ICP备19003281号-4</a>
    <img src="https://cdn.jsdelivr.net/gh/TRHX/CDN-for-itrhx.com@3.0.9/images/moeicp.png" style="width:18px;height:18px;margin-bottom:-3px" alt="MOE ICP">
    <a href="https://icp.gov.moe/" target="_blank">萌ICP备20202022号</a>
T
TRHX 已提交
1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281
    <!-- 网站运行时间 -->
    <span id="timeDate">正在载入...</span><span id="times"><span><i class="fa fa-spinner fa-spin"> </i></span></span>
    <script>
    var now = new Date(); 
    function createtime() {
      var grt= new Date("08/10/2018 17:38:00");//建站时间2018-08-10
      now.setTime(now.getTime()+250); 
      days = (now - grt ) / 1000 / 60 / 60 / 24; dnum = Math.floor(days); 
      hours = (now - grt ) / 1000 / 60 / 60 - (24 * dnum); hnum = Math.floor(hours); 
      if(String(hnum).length ==1 ){hnum = "0" + hnum;} minutes = (now - grt ) / 1000 /60 - (24 * 60 * dnum) - (60 * hnum); 
      mnum = Math.floor(minutes); if(String(mnum).length ==1 ){mnum = "0" + mnum;} 
      seconds = (now - grt ) / 1000 - (24 * 60 * 60 * dnum) - (60 * 60 * hnum) - (60 * mnum); 
      snum = Math.round(seconds); if(String(snum).length ==1 ){snum = "0" + snum;} 
T
TRHX 已提交
1282
      document.getElementById("timeDate").innerHTML = "本站已运行 "
T
TRHX 已提交
1283 1284 1285 1286
      document.getElementById("times").innerHTML = dnum +"" + hnum + " 小时 " + mnum + "" + snum + ""; 
      /*document.getElementById("times").style.color="#0056FF";*/
      }
      setInterval("createtime()",250);
T
TRHX 已提交
1287
    </script>
T
TRHX 已提交
1288
    <!--<a href="/sitemap.xml" target="_blank">站点地图</a>丨-->
T
TRHX 已提交
1289 1290
    <a href="https://tongji.baidu.com/web/welcome/ico?s=df0bc7c6bdbd80356ba4db429724ccad" target="_blank">百度统计</a>
    <script type="text/javascript">var cnzz_protocol = (("https:" == document.location.protocol) ? "https://" : "http://");document.write(unescape("%3Cspan id='cnzz_stat_icon_1275909280'%3E%3C/span%3E%3Cscript src='" + cnzz_protocol + "s23.cnzz.com/z_stat.php%3Fid%3D1275909280%26show%3Dpic' type='text/javascript'%3E%3C/script%3E"));</script><br><br>
T
TRHX 已提交
1291 1292 1293 1294 1295 1296 1297 1298 1299 1300
    <div class="github-badge">
      <a style="color: #fff" rel="license" href="https://hexo.io/" target="_blank" title="由 Hexo 强力驱动">
      <span class="badge-subject">Powered</span><span class="badge-value bg-blue">Hexo</span></a>
    </div>
    <div class="github-badge">
      <a style="color: #fff" rel="license" href="https://github.com/" target="_blank" title="静态网页托管于 GitHub Pages 和 Coding Pages">
      <span class="badge-subject">Hosted</span><span class="badge-value bg-brightgreen">GitHub & Coding</span></a>
    </div>
    <div class="github-badge">
      <a style="color: #fff" rel="license" href="https://www.aliyun.com/" target="_blank" title="阿里云提供域名相关服务">
T
TRHX 已提交
1301
      <span class="badge-subject">DNS</span><span class="badge-value bg-blueviolet">Aliyun</span></a>
T
TRHX 已提交
1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325
    </div>
    <div class="github-badge">
      <a style="color: #fff" rel="license" href="https://www.jsdelivr.com/" target="_blank" title="jsDelivr 提供 CDN 加速服务">
      <span class="badge-subject">CDN</span><span class="badge-value bg-orange">jsDelivr</span></a>
    </div>
    <div class="github-badge">
        <a style="color: #fff" rel="license" href="https://xaoxuu.com/wiki/material-x/" target="_blank" title="站点使用 Material X 主题">
      <span class="badge-subject">Theme</span><span class="badge-value bg-blue">Material X</span></a>
    </div>
    <div class="github-badge">
      <a style="color: #fff" rel="license" href="http://creativecommons.org/licenses/by-nc-sa/4.0/" target="_blank" title="本站点采用知识共享署名-非商业性使用-相同方式共享 4.0 国际许可协议进行许可">
      <span class="badge-subject"><i class="fa fa-copyright"></i></span><span class="badge-value bg-lightgrey">BY-NC-SA 4.0</span></a>
    </div>
    <div class="github-badge">
      <a style="color: #fff" rel="license" href="https://996.icu/" target="_blank" title="支持 996.ICU">
      <span class="badge-subject">Link</span><span class="badge-value bg-red">996.ICU</span></a>
    </div>
    <div class="github-badge">
      <span class="badge-subject">UV</span><span class="badge-value bg-orange" id="busuanzi_value_site_uv"></span>
    </div>
    <div class="github-badge">
      <span class="badge-subject">PV</span><span class="badge-value bg-brightgreen" id="busuanzi_value_site_pv"></span>
    </div>
    <div class="github-badge">
T
TRHX 已提交
1326
      <span class="badge-subject">WordCount</span><span class="badge-value bg-blueviolet">130.6k</span>
T
TRHX 已提交
1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391
    </div>
</footer>


      <script>setLoadingBarProgress(60);</script>
    </div>
    <a class="s-top fas fa-arrow-up fa-fw" href='javascript:void(0)'></a>
  </div>
  <script src="https://cdn.jsdelivr.net/npm/jquery@3.3.1/dist/jquery.min.js"></script>

  <script>
    var GOOGLE_CUSTOM_SEARCH_API_KEY = "";
    var GOOGLE_CUSTOM_SEARCH_ENGINE_ID = "";
    var ALGOLIA_API_KEY = "";
    var ALGOLIA_APP_ID = "";
    var ALGOLIA_INDEX_NAME = "";
    var AZURE_SERVICE_NAME = "";
    var AZURE_INDEX_NAME = "";
    var AZURE_QUERY_KEY = "";
    var BAIDU_API_ID = "";
    var SEARCH_SERVICE = "hexo" || "hexo";
    var ROOT = "/"||"/";
    if(!ROOT.endsWith('/'))ROOT += '/';
  </script>

<script src="//instant.page/1.2.2" type="module" integrity="sha384-2xV8M5griQmzyiY3CDqh1dn4z3llDVqZDqzjzcY+jCBCk/a5fXJmuZ/40JJAPeoU"></script>


  <script async src="https://cdn.jsdelivr.net/npm/scrollreveal@4.0.5/dist/scrollreveal.min.js"></script>
  <script type="text/javascript">
    $(function() {
      const $reveal = $('.reveal');
      if ($reveal.length === 0) return;
      const sr = ScrollReveal({ distance: 0 });
      sr.reveal('.reveal');
    });
  </script>


  <script src="https://cdn.jsdelivr.net/npm/node-waves@0.7.6/dist/waves.min.js"></script>
  <script type="text/javascript">
    $(function() {
      Waves.attach('.flat-btn', ['waves-button']);
      Waves.attach('.float-btn', ['waves-button', 'waves-float']);
      Waves.attach('.float-btn-light', ['waves-button', 'waves-float', 'waves-light']);
      Waves.attach('.flat-box', ['waves-block']);
      Waves.attach('.float-box', ['waves-block', 'waves-float']);
      Waves.attach('.waves-image');
      Waves.init();
    });
  </script>


  <script async src="https://cdn.jsdelivr.net/gh/xaoxuu/cdn-busuanzi@2.3/js/busuanzi.pure.mini.js"></script>










  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/gitalk@1/dist/gitalk.css">
T
TRHX 已提交
1392
  <script src="https://cdn.jsdelivr.net/npm/gitalk@1.5.2/dist/gitalk.min.js"></script>
T
TRHX 已提交
1393
  <script src="https://cdn.bootcss.com/blueimp-md5/2.10.0/js/md5.min.js"></script>
T
TRHX 已提交
1394 1395 1396 1397 1398
  <script type="text/javascript">
    var gitalk = new Gitalk({
      clientID: "d19a84b9d9a2ddb2c6b9",
      clientSecret: "cec9feae5129a6106edc68ce06d167be8eb06021",
      repo: "trhx.github.io",
T
TRHX 已提交
1399 1400
      owner: "TRHX",
      admin: "TRHX",
T
TRHX 已提交
1401
      
T
TRHX 已提交
1402
        id: md5(location.pathname),      // Ensure uniqueness and length less than 50
T
TRHX 已提交
1403 1404 1405 1406 1407 1408 1409 1410 1411 1412
      
      distractionFreeMode: false  // Facebook-like distraction free mode
    });
    gitalk.render('gitalk-container');
  </script>





T
TRHX 已提交
1413
  <script src="https://cdn.jsdelivr.net/gh/TRHX/CDN-for-itrhx.com@3.1.0/js/app.js"></script>
T
TRHX 已提交
1414 1415


T
TRHX 已提交
1416
  <script src="https://cdn.jsdelivr.net/gh/TRHX/CDN-for-itrhx.com@3.1.0/js/search.js"></script>
T
TRHX 已提交
1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531




<!-- 复制 -->
<script src="https://cdn.jsdelivr.net/npm/clipboard@2/dist/clipboard.min.js"></script>
<script>
  let COPY_SUCCESS = "复制成功";
  let COPY_FAILURE = "复制失败";
  /*页面载入完成后,创建复制按钮*/
  !function (e, t, a) {
    /* code */
    var initCopyCode = function(){
      var copyHtml = '';
      copyHtml += '<button class="btn-copy" data-clipboard-snippet="">';
      copyHtml += '  <i class="fa fa-copy"></i><span>复制</span>';
      copyHtml += '</button>';
      $(".highlight .code pre").before(copyHtml);
      var clipboard = new ClipboardJS('.btn-copy', {
        target: function(trigger) {
          return trigger.nextElementSibling;
        }
      });

      clipboard.on('success', function(e) {
        //您可以加入成功提示
        console.info('Action:', e.action);
        console.info('Text:', e.text);
        console.info('Trigger:', e.trigger);
        success_prompt(COPY_SUCCESS);
        e.clearSelection();
      });
      clipboard.on('error', function(e) {
        //您可以加入失败提示
        console.error('Action:', e.action);
        console.error('Trigger:', e.trigger);
        fail_prompt(COPY_FAILURE);
      });
    }
    initCopyCode();

  }(window, document);

  /**
   * 弹出式提示框,默认1.5秒自动消失
   * @param message 提示信息
   * @param style 提示样式,有alert-success、alert-danger、alert-warning、alert-info
   * @param time 消失时间
   */
  var prompt = function (message, style, time)
  {
      style = (style === undefined) ? 'alert-success' : style;
      time = (time === undefined) ? 1500 : time*1000;
      $('<div>')
          .appendTo('body')
          .addClass('alert ' + style)
          .html(message)
          .show()
          .delay(time)
          .fadeOut();
  };

  // 成功提示
  var success_prompt = function(message, time)
  {
      prompt(message, 'alert-success', time);
  };

  // 失败提示
  var fail_prompt = function(message, time)
  {
      prompt(message, 'alert-danger', time);
  };

  // 提醒
  var warning_prompt = function(message, time)
  {
      prompt(message, 'alert-warning', time);
  };

  // 信息提示
  var info_prompt = function(message, time)
  {
      prompt(message, 'alert-info', time);
  };

</script>


<!-- fancybox -->
<script src="https://cdn.jsdelivr.net/gh/fancyapps/fancybox@3.5.7/dist/jquery.fancybox.min.js"></script>
<script>
  let LAZY_LOAD_IMAGE = "";
  $(".article-entry").find("fancybox").find("img").each(function () {
      var element = document.createElement("a");
      $(element).attr("data-fancybox", "gallery");
      $(element).attr("href", $(this).attr("src"));
      /* 图片采用懒加载处理时,
       * 一般图片标签内会有个属性名来存放图片的真实地址,比如 data-original,
       * 那么此处将原本的属性名src替换为对应属性名data-original,
       * 修改如下
       */
       if (LAZY_LOAD_IMAGE) {
         $(element).attr("href", $(this).attr("data-original"));
       }
      $(this).wrap(element);
  });
</script>





  <script>setLoadingBarProgress(100);</script>
  <!-- 单击显示文字 -->
T
TRHX 已提交
1532
  <!-- <script type="text/javascript" src="https://cdn.jsdelivr.net/gh/TRHX/CDN-for-itrhx.com@3.0.8/js/ClickShowText.js"></script> -->
T
TRHX 已提交
1533 1534 1535 1536
  <!-- 点击冒点 -->
  <canvas width="1777" height="841" style="position: fixed; left: 0px; top: 0px; z-index: 2147483647; pointer-events: none;"></canvas><script src="https://cdn.jsdelivr.net/gh/TRHX/CDN-for-itrhx.com@3.0.8/js/maodian.js"></script>
  <!-- 浏览器搞笑标题 -->
  <script type="text/javascript" src="https://cdn.jsdelivr.net/gh/TRHX/CDN-for-itrhx.com@3.0.8/js/FunnyTitle.js"></script>
T
TRHX 已提交
1537 1538 1539 1540
  <!-- 样式一(鼠标点击更换样式) -->
  <!--<script src="https://g.joyinshare.com/hc/ribbon.min.js" type="text/javascript"></script>-->
  <!-- 样式二(飘动的彩带) -->
  <!--<script src="https://g.joyinshare.com/hc/piao.js" type="text/javascript"></script>-->
T
TRHX 已提交
1541
  <!-- 数字雨 -->
T
TRHX 已提交
1542
  <canvas id="canvas" width="1920" height="1080"></canvas>
T
TRHX 已提交
1543
  <script type="text/javascript" src="https://cdn.jsdelivr.net/gh/TRHX/CDN-for-itrhx.com@3.0.8/js/DigitalRain.js"></script>
T
TRHX 已提交
1544
  <!--动态线条背景-->
T
TRHX 已提交
1545
  <!--<script type="text/javascript" color="27,195,251" opacity='0.7' zIndex="-5" count="200" src="//cdn.bootcss.com/canvas-nest.js/1.0.0/canvas-nest.min.js"></script>-->
T
TRHX 已提交
1546
  <!-- 速度优化脚本 -->
T
TRHX 已提交
1547
  <script src="https://cdn.jsdelivr.net/gh/TRHX/CDN-for-itrhx.com@3.0.8/js/instantclick-1.2.2.js" type="module"></script>
T
TRHX 已提交
1548
  <!-- 悟空 -->
T
TRHX 已提交
1549
  <!--<div id="wukong"><marquee direction="right"><img src="https://cdn.jsdelivr.net/gh/TRHX/CDN-for-itrhx.com@3.0.8/images/wukong.gif"></marquee></div>-->
T
TRHX 已提交
1550
  <!-- 雪花 -->
T
TRHX 已提交
1551
  <!--<script src="https://cdn.jsdelivr.net/gh/TRHX/CDN-for-itrhx.com@3.0.8/js/snow1.js"></script> -->
T
TRHX 已提交
1552 1553
</body>
</html>