-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
231 lines (147 loc) · 9.2 KB
/
index.html
File metadata and controls
231 lines (147 loc) · 9.2 KB
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
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
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>第二个Hexo博客</title>
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<meta name="description" content="How to use Hexo to build blog">
<meta property="og:type" content="website">
<meta property="og:title" content="第二个Hexo博客">
<meta property="og:url" content="http://yoursite.com/index.html">
<meta property="og:site_name" content="第二个Hexo博客">
<meta property="og:description" content="How to use Hexo to build blog">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="第二个Hexo博客">
<meta name="twitter:description" content="How to use Hexo to build blog">
<link rel="alternate" href="/atom.xml" title="第二个Hexo博客" type="application/atom+xml">
<link rel="icon" href="/favicon.png">
<link href="//fonts.googleapis.com/css?family=Source+Code+Pro" rel="stylesheet" type="text/css">
<link rel="stylesheet" href="/css/style.css">
</head>
<body>
<div id="container">
<div id="wrap">
<header id="header">
<div id="banner"></div>
<div id="header-outer" class="outer">
<div id="header-title" class="inner">
<h1 id="logo-wrap">
<a href="/" id="logo">第二个Hexo博客</a>
</h1>
</div>
<div id="header-inner" class="inner">
<nav id="main-nav">
<a id="main-nav-toggle" class="nav-icon"></a>
<a class="main-nav-link" href="/">Home</a>
<a class="main-nav-link" href="/archives">Archives</a>
</nav>
<nav id="sub-nav">
<a id="nav-rss-link" class="nav-icon" href="/atom.xml" title="RSS Feed"></a>
<a id="nav-search-btn" class="nav-icon" title="Search"></a>
</nav>
<div id="search-form-wrap">
<form action="//google.com/search" method="get" accept-charset="UTF-8" class="search-form"><input type="search" name="q" class="search-form-input" placeholder="Search"><button type="submit" class="search-form-submit"></button><input type="hidden" name="sitesearch" value="http://yoursite.com"></form>
</div>
</div>
</div>
</header>
<div class="outer">
<section id="main">
<article id="post-如何使用Hexo搭建博客" class="article article-type-post" itemscope itemprop="blogPost">
<div class="article-meta">
<a href="/2017/10/19/如何使用Hexo搭建博客/" class="article-date">
<time datetime="2017-10-19T14:26:23.000Z" itemprop="datePublished">2017-10-19</time>
</a>
</div>
<div class="article-inner">
<header class="article-header">
<h1 itemprop="name">
<a class="article-title" href="/2017/10/19/如何使用Hexo搭建博客/">如何使用Hexo搭建博客</a>
</h1>
</header>
<div class="article-entry" itemprop="articleBody">
<p>第1步:创建一个目录(建议:别在根目录 ) mkdir hexoblog<br>第2步:进入目录 cd hexoblog<br>第3步:在 GitHub 上新建一个空 repo ,repo 名称是「仓库名.github.io」(仓库名一定要这个格式)<br>第4步:安装Hexo,执行命令 npm install -g hexo-cli<br>第5步:创建博客系统 hexo init myBlog<br>第6步:进入博客系统 cd myBlog<br>第7步:安装模块 npm i<br>第8步:创建博客(文章) hexo new 开博大吉(开博大吉为文章标题),返回一个 md 文件的路径<br>第9步:start xxxxxxxxxxxxxxxxxxx.md,编辑这个 md 文件,内容在第二个—之后编写<br> (注意:Ubuntu 系统用 xdg-open xxxxxxxxxxxxxxxxxxx.md 命令)<br>第10步:编辑网站配置 start _config.yml(该文件在hexoblog根目录下)<br> 可改项:</p>
<pre><code>1. 第 6 行的 title 文章标题
2. 第 9 行的 author 作者名
必改项:
1. type 改成 type: git
2. 在最后一行,与 type 垂直对齐,加上一行 repo: 仓库地址(repo: 后面有个空格)
(仓库地址为firstblog所对应的地址,仓库地址以 git@github.com:)
</code></pre><p>第11步:安装 git 部署插件 npm install hexo-deployer-git –save<br> (之后再修改博客需要上传,可执行:hexo generate代替该步)<br>第12步:上传博客系统(包括文章)hexo deploy<br>第13步:进入「仓库名.github.io」对应的 repo,打开 GitHub Pages 功能(setting中),就可以直接点击预览链接</p>
</div>
<footer class="article-footer">
<a data-url="http://yoursite.com/2017/10/19/如何使用Hexo搭建博客/" data-id="cj8ynuaof00005kok874e0a5g" class="article-share-link">Share</a>
</footer>
</div>
</article>
<article id="post-hello-world" class="article article-type-post" itemscope itemprop="blogPost">
<div class="article-meta">
<a href="/2017/10/19/hello-world/" class="article-date">
<time datetime="2017-10-19T14:06:00.286Z" itemprop="datePublished">2017-10-19</time>
</a>
</div>
<div class="article-inner">
<header class="article-header">
<h1 itemprop="name">
<a class="article-title" href="/2017/10/19/hello-world/">Hello World</a>
</h1>
</header>
<div class="article-entry" itemprop="articleBody">
<p>Welcome to <a href="https://hexo.io/" target="_blank" rel="external">Hexo</a>! This is your very first post. Check <a href="https://hexo.io/docs/" target="_blank" rel="external">documentation</a> for more info. If you get any problems when using Hexo, you can find the answer in <a href="https://hexo.io/docs/troubleshooting.html" target="_blank" rel="external">troubleshooting</a> or you can ask me on <a href="https://github.com/hexojs/hexo/issues" target="_blank" rel="external">GitHub</a>.</p>
<h2 id="Quick-Start"><a href="#Quick-Start" class="headerlink" title="Quick Start"></a>Quick Start</h2><h3 id="Create-a-new-post"><a href="#Create-a-new-post" class="headerlink" title="Create a new post"></a>Create a new post</h3><figure class="highlight bash"><table><tr><td class="gutter"><pre><div class="line">1</div></pre></td><td class="code"><pre><div class="line">$ hexo new <span class="string">"My New Post"</span></div></pre></td></tr></table></figure>
<p>More info: <a href="https://hexo.io/docs/writing.html" target="_blank" rel="external">Writing</a></p>
<h3 id="Run-server"><a href="#Run-server" class="headerlink" title="Run server"></a>Run server</h3><figure class="highlight bash"><table><tr><td class="gutter"><pre><div class="line">1</div></pre></td><td class="code"><pre><div class="line">$ hexo server</div></pre></td></tr></table></figure>
<p>More info: <a href="https://hexo.io/docs/server.html" target="_blank" rel="external">Server</a></p>
<h3 id="Generate-static-files"><a href="#Generate-static-files" class="headerlink" title="Generate static files"></a>Generate static files</h3><figure class="highlight bash"><table><tr><td class="gutter"><pre><div class="line">1</div></pre></td><td class="code"><pre><div class="line">$ hexo generate</div></pre></td></tr></table></figure>
<p>More info: <a href="https://hexo.io/docs/generating.html" target="_blank" rel="external">Generating</a></p>
<h3 id="Deploy-to-remote-sites"><a href="#Deploy-to-remote-sites" class="headerlink" title="Deploy to remote sites"></a>Deploy to remote sites</h3><figure class="highlight bash"><table><tr><td class="gutter"><pre><div class="line">1</div></pre></td><td class="code"><pre><div class="line">$ hexo deploy</div></pre></td></tr></table></figure>
<p>More info: <a href="https://hexo.io/docs/deployment.html" target="_blank" rel="external">Deployment</a></p>
</div>
<footer class="article-footer">
<a data-url="http://yoursite.com/2017/10/19/hello-world/" data-id="cj8ynuarx00015kokau2mc58r" class="article-share-link">Share</a>
</footer>
</div>
</article>
</section>
<aside id="sidebar">
<div class="widget-wrap">
<h3 class="widget-title">Archives</h3>
<div class="widget">
<ul class="archive-list"><li class="archive-list-item"><a class="archive-list-link" href="/archives/2017/10/">October 2017</a></li></ul>
</div>
</div>
<div class="widget-wrap">
<h3 class="widget-title">Recent Posts</h3>
<div class="widget">
<ul>
<li>
<a href="/2017/10/19/如何使用Hexo搭建博客/">如何使用Hexo搭建博客</a>
</li>
<li>
<a href="/2017/10/19/hello-world/">Hello World</a>
</li>
</ul>
</div>
</div>
</aside>
</div>
<footer id="footer">
<div class="outer">
<div id="footer-info" class="inner">
© 2017 Erica Sun<br>
Powered by <a href="http://hexo.io/" target="_blank">Hexo</a>
</div>
</div>
</footer>
</div>
<nav id="mobile-nav">
<a href="/" class="mobile-nav-link">Home</a>
<a href="/archives" class="mobile-nav-link">Archives</a>
</nav>
<script src="//ajax.googleapis.com/ajax/libs/jquery/2.0.3/jquery.min.js"></script>
<link rel="stylesheet" href="/fancybox/jquery.fancybox.css">
<script src="/fancybox/jquery.fancybox.pack.js"></script>
<script src="/js/script.js"></script>
</div>
</body>
</html>