-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
186 lines (91 loc) · 4.53 KB
/
index.html
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
<!DOCTYPE html>
<html lang="zh-Hans">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title> Hugo Blog </title>
<meta name="viewport" content="width=device-width,minimum-scale=1">
<meta name="generator" content="Hugo 0.66.0" />
<META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW">
<link href="/dist/css/app.1cb140d8ba31d5b2f1114537dd04802a.css" rel="stylesheet">
<link href="/index.xml" rel="alternate" type="application/rss+xml" title=" Hugo Blog" />
<link href="/index.xml" rel="feed" type="application/rss+xml" title=" Hugo Blog" />
<meta property="og:title" content=" Hugo Blog" />
<meta property="og:description" content="" />
<meta property="og:type" content="website" />
<meta property="og:url" content="http://example.org/" />
<meta property="og:updated_time" content="2020-03-05T21:14:01+08:00" />
<meta itemprop="name" content=" Hugo Blog">
<meta itemprop="description" content=""><meta name="twitter:card" content="summary"/>
<meta name="twitter:title" content=" Hugo Blog"/>
<meta name="twitter:description" content=""/>
</head>
<body class="ma0 avenir bg-near-white">
<header>
<div class="pb3-m pb6-l bg-black">
<nav class="pv3 ph3 ph4-ns" role="navigation">
<div class="flex-l justify-between items-center center">
<a href="http://example.org/" class="f3 fw2 hover-white no-underline white-90 dib">
Hugo Blog
</a>
<div class="flex-l items-center">
</div>
</div>
</nav>
<div class="tc-l pv3 ph3 ph4-ns">
<h1 class="f2 f-subheadline-l fw2 light-silver mb0 lh-title">
Hugo Blog
</h1>
</div>
</div>
</header>
<main class="pb7" role="main">
<article class="cf ph3 ph5-l pv3 pv4-l f4 tc-l center measure-wide lh-copy mid-gray">
</article>
<div class="pa3 pa4-ns w-100 w-70-ns center">
<h1 class="flex-none">
Recent Posts
</h1>
<section class="w-100 mw8">
<div class="relative w-100 mb4">
<article class="bb b--black-10">
<div class="db pv4 ph3 ph0-l no-underline dark-gray">
<div class="flex flex-column flex-row-ns">
<div class="blah w-100">
<h1 class="f3 fw1 athelas mt0 lh-title">
<a href="http://example.org/posts/hugo%E5%8D%9A%E5%AE%A2%E6%90%AD%E5%BB%BA/" class="color-inherit dim link">
Hugo博客搭建
</a>
</h1>
<div class="f6 f5-l lh-copy nested-copy-line-height nested-links">
hugo 下载hugo 在 github 选择自己合适的版本下载,然后安装 将hugo添加到系统环境变量中 在bash中运行 hugo version 提示版本则说明安装成功 配置hugo 运行 hugo new site name 创建一个博客创建器,name为github用户名小写.github.io.creator
创建完成后进入文件夹,然后git init把文件夹作为一个git仓库
下载主题git submodule add https://github.com/budparr/gohugo-theme-ananke.git themes/ananke
然后,将主题添加到站点配置中:echo 'theme = "ananke"' >> config.toml
然后运行 hugo new posts/my-first-post.md 添加第一篇博客,名字可以自己更改
自定义主题,通过修改config.toml中的设置可以修改博客名字,博客主题,博客字体,博客地址
运行 hugo server -d 运行hugo静态页面,点击可以查看
将博客上传至github 运行hugo之后会在目录中生成一个public文件夹,将这个文件夹加入.gitignor中,然后在publi中运行git init git add .,将public作为一个仓库
在github 创建一个仓库,仓库名为github用户名.
</div>
<a href="http://example.org/posts/hugo%E5%8D%9A%E5%AE%A2%E6%90%AD%E5%BB%BA/" class="ba b--moon-gray bg-light-gray br2 color-inherit dib f7 hover-bg-moon-gray link mt2 ph2 pv1">read more</a>
</div>
</div>
</div>
</article>
</div>
</section>
</div>
</main>
<footer class="bg-black bottom-0 w-100 pa3" role="contentinfo">
<div class="flex justify-between">
<a class="f4 fw4 hover-white no-underline white-70 dn dib-ns pv2 ph3" href="http://example.org/" >
© Hugo Blog 2020
</a>
<div>
</div>
</div>
</footer>
<script src="/dist/js/app.3fc0f988d21662902933.js"></script>
</body>
</html>