Skip to content

Commit 381d122

Browse files
committed
博客主题初始化
1 parent 7b69aea commit 381d122

15 files changed

+814
-2
lines changed

config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ baseurl: https://example.com
22
languageCode: en-us
33
theme: hugo-theme-stack
44
paginate: 5
5-
title: Example Site
5+
title: 知微
66

77
# Change it to your Disqus shortname before using
88
disqusShortname: hugo-theme-stack
@@ -12,7 +12,7 @@ googleAnalytics:
1212

1313
# Theme i18n support
1414
# Available values: en, fr, id, ja, ko, pt-br, zh-cn, es, de, nl, it
15-
DefaultContentLanguage: en
15+
DefaultContentLanguage: zh-cn
1616

1717
permalinks:
1818
post: /p/:slug/

public/404.html

Lines changed: 157 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,157 @@
1+
<!DOCTYPE html>
2+
<html lang="en-us">
3+
<head><meta charset='utf-8'>
4+
<meta name='viewport' content='width=device-width, initial-scale=1'><meta name='description' content='Lorem ipsum dolor sit amet, consectetur adipiscing elit.'><title>404 Page not found</title>
5+
6+
<link rel='canonical' href='https://example.com/404.html'>
7+
8+
<link rel="stylesheet" href="/scss/style.min.css"><meta property='og:title' content='404 Page not found'>
9+
<meta property='og:description' content='Lorem ipsum dolor sit amet, consectetur adipiscing elit.'>
10+
<meta property='og:url' content='https://example.com/404.html'>
11+
<meta property='og:site_name' content='知微'>
12+
<meta property='og:type' content='website'>
13+
<meta name="twitter:title" content="404 Page not found">
14+
<meta name="twitter:description" content="Lorem ipsum dolor sit amet, consectetur adipiscing elit.">
15+
</head>
16+
<body class="">
17+
<script>
18+
(function() {
19+
const colorSchemeKey = 'StackColorScheme';
20+
if(!localStorage.getItem(colorSchemeKey)){
21+
localStorage.setItem(colorSchemeKey, "auto");
22+
}
23+
})();
24+
</script><script>
25+
(function() {
26+
const colorSchemeKey = 'StackColorScheme';
27+
const colorSchemeItem = localStorage.getItem(colorSchemeKey);
28+
const supportDarkMode = window.matchMedia('(prefers-color-scheme: dark)').matches === true;
29+
30+
if (colorSchemeItem == 'dark' || colorSchemeItem === 'auto' && supportDarkMode) {
31+
32+
33+
document.documentElement.dataset.scheme = 'dark';
34+
} else {
35+
document.documentElement.dataset.scheme = 'light';
36+
}
37+
})();
38+
</script>
39+
<div class="container main-container flex on-phone--column extended"><aside class="sidebar left-sidebar sticky">
40+
<button class="hamburger hamburger--spin" type="button" id="toggle-menu" aria-label="切换菜单">
41+
<span class="hamburger-box">
42+
<span class="hamburger-inner"></span>
43+
</span>
44+
</button>
45+
46+
<header class="site-info">
47+
48+
49+
<figure class="site-avatar">
50+
51+
52+
53+
54+
55+
<img src="/img/avatar_huda2458f72ce188392d75c5d51cd8e24e_373_300x0_resize_box_3.png" width="300"
56+
height="300" class="site-logo" loading="lazy" alt="Avatar">
57+
58+
59+
60+
61+
<span class="emoji">🍥</span>
62+
63+
</figure>
64+
65+
66+
<h1 class="site-name"><a href="https://example.com">知微</a></h1>
67+
<h2 class="site-description">Lorem ipsum dolor sit amet, consectetur adipiscing elit.</h2>
68+
</header>
69+
70+
<ol class="menu" id="main-menu">
71+
72+
73+
74+
75+
<li >
76+
<a href='/' target="_blank">
77+
78+
<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-home" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
79+
<path stroke="none" d="M0 0h24v24H0z"/>
80+
<polyline points="5 12 3 12 12 3 21 12 19 12" />
81+
<path d="M5 12v7a2 2 0 0 0 2 2h10a2 2 0 0 0 2 -2v-7" />
82+
<path d="M9 21v-6a2 2 0 0 1 2 -2h2a2 2 0 0 1 2 2v6" />
83+
</svg>
84+
85+
86+
87+
88+
<span>Home</span>
89+
</a>
90+
</li>
91+
92+
93+
94+
<li id="dark-mode-toggle">
95+
<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-toggle-left" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
96+
<path stroke="none" d="M0 0h24v24H0z"/>
97+
<circle cx="8" cy="12" r="2" />
98+
<rect x="2" y="6" width="20" height="12" rx="6" />
99+
</svg>
100+
101+
102+
103+
<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-toggle-right" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
104+
<path stroke="none" d="M0 0h24v24H0z"/>
105+
<circle cx="16" cy="12" r="2" />
106+
<rect x="2" y="6" width="20" height="12" rx="6" />
107+
</svg>
108+
109+
110+
111+
<span>暗色模式</span>
112+
</li>
113+
114+
</ol>
115+
</aside>
116+
<main class="main full-width">
117+
<div class="not-found-card">
118+
<h1 class="article-title">404 错误</h1>
119+
<h2 class="article-subtitle">页面不存在</h2>
120+
</div>
121+
<footer class="site-footer">
122+
<section class="copyright">
123+
&copy;
124+
125+
2020 -
126+
127+
2021 知微
128+
</section>
129+
130+
<section class="powerby">
131+
Built with <a href="https://gohugo.io/" target="_blank" rel="noopener">Hugo</a> <br />
132+
Theme <b><a href="https://github.com/CaiJimmy/hugo-theme-stack" target="_blank" rel="noopener" data-version="3.2.0">Stack</a></b> designed by <a href="https://jimmycai.com" target="_blank" rel="noopener">Jimmy</a>
133+
</section>
134+
</footer>
135+
136+
137+
</main>
138+
</div>
139+
<script
140+
src="https://cdn.jsdelivr.net/npm/node-vibrant@3.1.5/dist/vibrant.min.js"integrity="sha256-5NovOZc4iwiAWTYIFiIM7DxKUXKWvpVEuMEPLzcm5/g="crossorigin="anonymous"
141+
defer="false"
142+
>
143+
</script><script type="text/javascript" src="/ts/main.js" defer></script>
144+
<script>
145+
(function () {
146+
const customFont = document.createElement('link');
147+
customFont.href = "https://fonts.googleapis.com/css2?family=Lato:wght@300;400;700&display=swap";
148+
149+
customFont.type = "text/css";
150+
customFont.rel = "stylesheet";
151+
152+
document.head.appendChild(customFont);
153+
}());
154+
</script>
155+
156+
</body>
157+
</html>

public/categories/index.html

Lines changed: 200 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,200 @@
1+
<!DOCTYPE html>
2+
<html lang="en-us">
3+
<head><meta charset='utf-8'>
4+
<meta name='viewport' content='width=device-width, initial-scale=1'><meta name='description' content='Lorem ipsum dolor sit amet, consectetur adipiscing elit.'><title>Categories</title>
5+
6+
<link rel='canonical' href='https://example.com/categories/'>
7+
8+
<link rel="stylesheet" href="/scss/style.min.css"><meta property='og:title' content='Categories'>
9+
<meta property='og:description' content='Lorem ipsum dolor sit amet, consectetur adipiscing elit.'>
10+
<meta property='og:url' content='https://example.com/categories/'>
11+
<meta property='og:site_name' content='知微'>
12+
<meta property='og:type' content='website'>
13+
<meta name="twitter:title" content="Categories">
14+
<meta name="twitter:description" content="Lorem ipsum dolor sit amet, consectetur adipiscing elit."><link rel="alternate" type="application/rss&#43;xml" href="https://example.com/categories/index.xml">
15+
</head>
16+
<body class="">
17+
<script>
18+
(function() {
19+
const colorSchemeKey = 'StackColorScheme';
20+
if(!localStorage.getItem(colorSchemeKey)){
21+
localStorage.setItem(colorSchemeKey, "auto");
22+
}
23+
})();
24+
</script><script>
25+
(function() {
26+
const colorSchemeKey = 'StackColorScheme';
27+
const colorSchemeItem = localStorage.getItem(colorSchemeKey);
28+
const supportDarkMode = window.matchMedia('(prefers-color-scheme: dark)').matches === true;
29+
30+
if (colorSchemeItem == 'dark' || colorSchemeItem === 'auto' && supportDarkMode) {
31+
32+
33+
document.documentElement.dataset.scheme = 'dark';
34+
} else {
35+
document.documentElement.dataset.scheme = 'light';
36+
}
37+
})();
38+
</script>
39+
<div class="container main-container flex on-phone--column extended"><aside class="sidebar left-sidebar sticky">
40+
<button class="hamburger hamburger--spin" type="button" id="toggle-menu" aria-label="切换菜单">
41+
<span class="hamburger-box">
42+
<span class="hamburger-inner"></span>
43+
</span>
44+
</button>
45+
46+
<header class="site-info">
47+
48+
49+
<figure class="site-avatar">
50+
51+
52+
53+
54+
55+
<img src="/img/avatar_huda2458f72ce188392d75c5d51cd8e24e_373_300x0_resize_box_3.png" width="300"
56+
height="300" class="site-logo" loading="lazy" alt="Avatar">
57+
58+
59+
60+
61+
<span class="emoji">🍥</span>
62+
63+
</figure>
64+
65+
66+
<h1 class="site-name"><a href="https://example.com">知微</a></h1>
67+
<h2 class="site-description">Lorem ipsum dolor sit amet, consectetur adipiscing elit.</h2>
68+
</header>
69+
70+
<ol class="menu" id="main-menu">
71+
72+
73+
74+
75+
<li >
76+
<a href='/' target="_blank">
77+
78+
<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-home" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
79+
<path stroke="none" d="M0 0h24v24H0z"/>
80+
<polyline points="5 12 3 12 12 3 21 12 19 12" />
81+
<path d="M5 12v7a2 2 0 0 0 2 2h10a2 2 0 0 0 2 -2v-7" />
82+
<path d="M9 21v-6a2 2 0 0 1 2 -2h2a2 2 0 0 1 2 2v6" />
83+
</svg>
84+
85+
86+
87+
88+
<span>Home</span>
89+
</a>
90+
</li>
91+
92+
93+
94+
<li id="dark-mode-toggle">
95+
<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-toggle-left" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
96+
<path stroke="none" d="M0 0h24v24H0z"/>
97+
<circle cx="8" cy="12" r="2" />
98+
<rect x="2" y="6" width="20" height="12" rx="6" />
99+
</svg>
100+
101+
102+
103+
<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-toggle-right" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
104+
<path stroke="none" d="M0 0h24v24H0z"/>
105+
<circle cx="16" cy="12" r="2" />
106+
<rect x="2" y="6" width="20" height="12" rx="6" />
107+
</svg>
108+
109+
110+
111+
<span>暗色模式</span>
112+
</li>
113+
114+
</ol>
115+
</aside>
116+
<main class="main full-width">
117+
<h3 class="section-title">
118+
119+
Section
120+
121+
</h3>
122+
123+
<div class="section-card">
124+
<div class="section-details">
125+
<h3 class="section-count">0 pages</h3>
126+
<h1 class="section-term">Categories</h1>
127+
128+
</div>
129+
</div>
130+
131+
132+
<section class="article-list--compact">
133+
134+
</section>
135+
<footer class="site-footer">
136+
<section class="copyright">
137+
&copy;
138+
139+
2020 -
140+
141+
2021 知微
142+
</section>
143+
144+
<section class="powerby">
145+
Built with <a href="https://gohugo.io/" target="_blank" rel="noopener">Hugo</a> <br />
146+
Theme <b><a href="https://github.com/CaiJimmy/hugo-theme-stack" target="_blank" rel="noopener" data-version="3.2.0">Stack</a></b> designed by <a href="https://jimmycai.com" target="_blank" rel="noopener">Jimmy</a>
147+
</section>
148+
</footer>
149+
150+
151+
</main>
152+
153+
154+
<aside class="sidebar right-sidebar sticky">
155+
156+
157+
158+
159+
160+
<section class="widget tagCloud">
161+
<div class="widget-icon">
162+
<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-tag" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
163+
<path stroke="none" d="M0 0h24v24H0z"/>
164+
<path d="M11 3L20 12a1.5 1.5 0 0 1 0 2L14 20a1.5 1.5 0 0 1 -2 0L3 11v-4a4 4 0 0 1 4 -4h4" />
165+
<circle cx="9" cy="9" r="2" />
166+
</svg>
167+
168+
169+
170+
</div>
171+
<h2 class="widget-title section-title">标签云</h2>
172+
173+
<div class="tagCloud-tags">
174+
175+
</div>
176+
</section>
177+
178+
</aside>
179+
180+
181+
</div>
182+
<script
183+
src="https://cdn.jsdelivr.net/npm/node-vibrant@3.1.5/dist/vibrant.min.js"integrity="sha256-5NovOZc4iwiAWTYIFiIM7DxKUXKWvpVEuMEPLzcm5/g="crossorigin="anonymous"
184+
defer="false"
185+
>
186+
</script><script type="text/javascript" src="/ts/main.js" defer></script>
187+
<script>
188+
(function () {
189+
const customFont = document.createElement('link');
190+
customFont.href = "https://fonts.googleapis.com/css2?family=Lato:wght@300;400;700&display=swap";
191+
192+
customFont.type = "text/css";
193+
customFont.rel = "stylesheet";
194+
195+
document.head.appendChild(customFont);
196+
}());
197+
</script>
198+
199+
</body>
200+
</html>

public/categories/index.xml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
2+
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
3+
<channel>
4+
<title>Categories on 知微</title>
5+
<link>https://example.com/categories/</link>
6+
<description>Recent content in Categories on 知微</description>
7+
<generator>Hugo -- gohugo.io</generator>
8+
<language>en-us</language><atom:link href="https://example.com/categories/index.xml" rel="self" type="application/rss+xml" />
9+
</channel>
10+
</rss>

public/categories/page/1/index.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<!DOCTYPE html><html><head><title>https://example.com/categories/</title><link rel="canonical" href="https://example.com/categories/"/><meta name="robots" content="noindex"><meta charset="utf-8" /><meta http-equiv="refresh" content="0; url=https://example.com/categories/" /></head></html>

0 commit comments

Comments
 (0)