Skip to content

Commit bf2ab4e

Browse files
committed
fix: enable giscus comments
1 parent 0e52896 commit bf2ab4e

18 files changed

Lines changed: 266 additions & 85 deletions

File tree

content/posts/hello-world.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
---
22
title: "Hello World"
33
date: 2026-01-10
4-
tags: ["博客", "Hugo"]
4+
tags: ["博客"]
5+
comments: true
56
---
67

78
这是我的第一篇技术博客 🚀
@@ -11,4 +12,4 @@ tags: ["博客", "Hugo"]
1112
int main() {
1213
std::cout << "Hello World";
1314
}
14-
15+
```

public/404.html

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
<!DOCTYPE html>
2-
<html lang="en" dir="auto" data-theme="auto">
2+
<html lang="zh" dir="auto" data-theme="auto">
33

44
<head><script src="/livereload.js?mindelay=10&amp;v=2&amp;port=1313&amp;path=livereload" data-no-instant defer></script><meta charset="utf-8">
55
<meta http-equiv="X-UA-Compatible" content="IE=edge">
66
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
7-
<meta name="robots" content="noindex, nofollow">
8-
<title>404 Page not found | 技术博客</title>
7+
<meta name="robots" content="index, follow">
8+
<title>404 Page not found | homemoon 的技术博客</title>
99
<meta name="keywords" content="">
10-
<meta name="description" content="">
10+
<meta name="description" content="记录机器人学习的技术博客">
1111
<meta name="author" content="">
1212
<link rel="canonical" href="http://localhost:1313/404.html">
1313
<link crossorigin="anonymous" href="/assets/css/stylesheet.a29c24210eb31d9ce56f669c66a35c9c51b17376b7764e336a49af7dec914cf0.css" integrity="sha256-opwkIQ6zHZzlb2acZqNcnFGxc3a3dk4zakmvfeyRTPA=" rel="preload stylesheet" as="style">
@@ -18,7 +18,7 @@
1818
<link rel="mask-icon" href="http://localhost:1313/safari-pinned-tab.svg">
1919
<meta name="theme-color" content="#2e2e33">
2020
<meta name="msapplication-TileColor" content="#2e2e33">
21-
<link rel="alternate" hreflang="en" href="http://localhost:1313/404.html">
21+
<link rel="alternate" hreflang="zh" href="http://localhost:1313/404.html">
2222
<noscript>
2323
<style>
2424
#theme-toggle,
@@ -70,13 +70,22 @@
7070
document.querySelector("html").dataset.theme = 'light';
7171
}
7272

73-
</script>
73+
</script><meta property="og:url" content="http://localhost:1313/404.html">
74+
<meta property="og:site_name" content="homemoon 的技术博客">
75+
<meta property="og:title" content="404 Page not found">
76+
<meta property="og:description" content="记录机器人学习的技术博客">
77+
<meta property="og:locale" content="zh-cn">
78+
<meta property="og:type" content="website">
79+
<meta name="twitter:card" content="summary">
80+
<meta name="twitter:title" content="404 Page not found">
81+
<meta name="twitter:description" content="记录机器人学习的技术博客">
82+
7483
</head>
7584
<body class="list" id="top">
7685
<header class="header">
7786
<nav class="nav">
7887
<div class="logo">
79-
<a href="http://localhost:1313/" accesskey="h" title="技术博客 (Alt + H)">技术博客</a>
88+
<a href="http://localhost:1313/" accesskey="h" title="homemoon 的技术博客 (Alt + H)">homemoon 的技术博客</a>
8089
<div class="logo-switches">
8190
<button id="theme-toggle" accesskey="t" title="(Alt + T)" aria-label="Toggle theme">
8291
<svg id="moon" xmlns="http://www.w3.org/2000/svg" width="24" height="18" viewBox="0 0 24 24"
@@ -109,7 +118,7 @@
109118
</main>
110119

111120
<footer class="footer">
112-
<span>&copy; 2026 <a href="http://localhost:1313/">技术博客</a></span> ·
121+
<span>&copy; 2026 <a href="http://localhost:1313/">homemoon 的技术博客</a></span> ·
113122

114123
<span>
115124
Powered by

public/categories/index.html

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
<!DOCTYPE html>
2-
<html lang="en" dir="auto" data-theme="auto">
2+
<html lang="zh" dir="auto" data-theme="auto">
33

44
<head><script src="/livereload.js?mindelay=10&amp;v=2&amp;port=1313&amp;path=livereload" data-no-instant defer></script><meta charset="utf-8">
55
<meta http-equiv="X-UA-Compatible" content="IE=edge">
66
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
7-
<meta name="robots" content="noindex, nofollow">
8-
<title>Categories | 技术博客</title>
7+
<meta name="robots" content="index, follow">
8+
<title>Categories | homemoon 的技术博客</title>
99
<meta name="keywords" content="">
10-
<meta name="description" content="">
10+
<meta name="description" content="记录机器人学习的技术博客">
1111
<meta name="author" content="">
1212
<link rel="canonical" href="http://localhost:1313/categories/">
1313
<link crossorigin="anonymous" href="/assets/css/stylesheet.a29c24210eb31d9ce56f669c66a35c9c51b17376b7764e336a49af7dec914cf0.css" integrity="sha256-opwkIQ6zHZzlb2acZqNcnFGxc3a3dk4zakmvfeyRTPA=" rel="preload stylesheet" as="style">
@@ -19,7 +19,7 @@
1919
<meta name="theme-color" content="#2e2e33">
2020
<meta name="msapplication-TileColor" content="#2e2e33">
2121
<link rel="alternate" type="application/rss+xml" href="http://localhost:1313/categories/index.xml" title="rss">
22-
<link rel="alternate" hreflang="en" href="http://localhost:1313/categories/">
22+
<link rel="alternate" hreflang="zh" href="http://localhost:1313/categories/">
2323
<noscript>
2424
<style>
2525
#theme-toggle,
@@ -71,13 +71,22 @@
7171
document.querySelector("html").dataset.theme = 'light';
7272
}
7373

74-
</script>
74+
</script><meta property="og:url" content="http://localhost:1313/categories/">
75+
<meta property="og:site_name" content="homemoon 的技术博客">
76+
<meta property="og:title" content="Categories">
77+
<meta property="og:description" content="记录机器人学习的技术博客">
78+
<meta property="og:locale" content="zh-cn">
79+
<meta property="og:type" content="website">
80+
<meta name="twitter:card" content="summary">
81+
<meta name="twitter:title" content="Categories">
82+
<meta name="twitter:description" content="记录机器人学习的技术博客">
83+
7584
</head>
7685
<body class="list" id="top">
7786
<header class="header">
7887
<nav class="nav">
7988
<div class="logo">
80-
<a href="http://localhost:1313/" accesskey="h" title="技术博客 (Alt + H)">技术博客</a>
89+
<a href="http://localhost:1313/" accesskey="h" title="homemoon 的技术博客 (Alt + H)">homemoon 的技术博客</a>
8190
<div class="logo-switches">
8291
<button id="theme-toggle" accesskey="t" title="(Alt + T)" aria-label="Toggle theme">
8392
<svg id="moon" xmlns="http://www.w3.org/2000/svg" width="24" height="18" viewBox="0 0 24 24"
@@ -115,7 +124,7 @@ <h1>Categories</h1>
115124
</main>
116125

117126
<footer class="footer">
118-
<span>&copy; 2026 <a href="http://localhost:1313/">技术博客</a></span> ·
127+
<span>&copy; 2026 <a href="http://localhost:1313/">homemoon 的技术博客</a></span> ·
119128

120129
<span>
121130
Powered by

public/categories/index.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
22
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
33
<channel>
4-
<title>Categories on 技术博客</title>
4+
<title>Categories on homemoon 的技术博客</title>
55
<link>http://localhost:1313/categories/</link>
6-
<description>Recent content in Categories on 技术博客</description>
6+
<description>Recent content in Categories on homemoon 的技术博客</description>
77
<generator>Hugo -- 0.154.3</generator>
88
<language>zh-cn</language>
99
<atom:link href="http://localhost:1313/categories/index.xml" rel="self" type="application/rss+xml" />

public/index.html

Lines changed: 31 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
<!DOCTYPE html>
2-
<html lang="en" dir="auto" data-theme="auto">
2+
<html lang="zh" dir="auto" data-theme="auto">
33

44
<head>
55
<meta name="generator" content="Hugo 0.154.3"><script src="/livereload.js?mindelay=10&amp;v=2&amp;port=1313&amp;path=livereload" data-no-instant defer></script><meta charset="utf-8">
66
<meta http-equiv="X-UA-Compatible" content="IE=edge">
77
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
8-
<meta name="robots" content="noindex, nofollow">
9-
<title>技术博客</title>
8+
<meta name="robots" content="index, follow">
9+
<title>homemoon 的技术博客</title>
1010

11-
<meta name="description" content="">
11+
<meta name="description" content="记录机器人学习的技术博客">
1212
<meta name="author" content="">
1313
<link rel="canonical" href="http://localhost:1313/">
1414
<link crossorigin="anonymous" href="/assets/css/stylesheet.a29c24210eb31d9ce56f669c66a35c9c51b17376b7764e336a49af7dec914cf0.css" integrity="sha256-opwkIQ6zHZzlb2acZqNcnFGxc3a3dk4zakmvfeyRTPA=" rel="preload stylesheet" as="style">
@@ -20,7 +20,8 @@
2020
<meta name="theme-color" content="#2e2e33">
2121
<meta name="msapplication-TileColor" content="#2e2e33">
2222
<link rel="alternate" type="application/rss+xml" href="http://localhost:1313/index.xml" title="rss">
23-
<link rel="alternate" hreflang="en" href="http://localhost:1313/">
23+
<link rel="alternate" type="application/json" href="http://localhost:1313/index.json" title="json">
24+
<link rel="alternate" hreflang="zh" href="http://localhost:1313/">
2425
<noscript>
2526
<style>
2627
#theme-toggle,
@@ -72,13 +73,35 @@
7273
document.querySelector("html").dataset.theme = 'light';
7374
}
7475

76+
</script><meta property="og:url" content="http://localhost:1313/">
77+
<meta property="og:site_name" content="homemoon 的技术博客">
78+
<meta property="og:title" content="homemoon 的技术博客">
79+
<meta property="og:description" content="记录机器人学习的技术博客">
80+
<meta property="og:locale" content="zh-cn">
81+
<meta property="og:type" content="website">
82+
<meta name="twitter:card" content="summary">
83+
<meta name="twitter:title" content="homemoon 的技术博客">
84+
<meta name="twitter:description" content="记录机器人学习的技术博客">
85+
86+
<script type="application/ld+json">
87+
{
88+
"@context": "https://schema.org",
89+
"@type": "Organization",
90+
"name": "homemoon 的技术博客",
91+
"url": "http://localhost:1313/",
92+
"description": "记录机器人学习的技术博客",
93+
"logo": "http://localhost:1313/favicon.ico",
94+
"sameAs": [
95+
96+
]
97+
}
7598
</script>
7699
</head>
77100
<body class="list" id="top">
78101
<header class="header">
79102
<nav class="nav">
80103
<div class="logo">
81-
<a href="http://localhost:1313/" accesskey="h" title="技术博客 (Alt + H)">技术博客</a>
104+
<a href="http://localhost:1313/" accesskey="h" title="homemoon 的技术博客 (Alt + H)">homemoon 的技术博客</a>
82105
<div class="logo-switches">
83106
<button id="theme-toggle" accesskey="t" title="(Alt + T)" aria-label="Toggle theme">
84107
<svg id="moon" xmlns="http://www.w3.org/2000/svg" width="24" height="18" viewBox="0 0 24 24"
@@ -117,13 +140,13 @@ <h2 class="entry-hint-parent">Hello World
117140
<p>这是我的第一篇技术博客 🚀
118141
#include &lt;iostream&gt; int main() { std::cout &lt;&lt; &#34;Hello World&#34;; } </p>
119142
</div>
120-
<footer class="entry-footer"><span title='2026-01-10 00:00:00 +0000 UTC'>January 10, 2026</span>&nbsp;·&nbsp;<span>1 min</span></footer>
143+
<footer class="entry-footer"><span title='2026-01-10 00:00:00 +0000 UTC'>2026-01-10</span>&nbsp;·&nbsp;<span>1 分钟</span>&nbsp;·&nbsp;<span>22 字</span></footer>
121144
<a class="entry-link" aria-label="post link to Hello World" href="http://localhost:1313/posts/hello-world/"></a>
122145
</article>
123146
</main>
124147

125148
<footer class="footer">
126-
<span>&copy; 2026 <a href="http://localhost:1313/">技术博客</a></span> ·
149+
<span>&copy; 2026 <a href="http://localhost:1313/">homemoon 的技术博客</a></span> ·
127150

128151
<span>
129152
Powered by

public/index.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
[{"content":"这是我的第一篇技术博客 🚀\n#include \u0026lt;iostream\u0026gt; int main() { std::cout \u0026lt;\u0026lt; \u0026#34;Hello World\u0026#34;; } ","permalink":"http://localhost:1313/posts/hello-world/","summary":"\u003cp\u003e这是我的第一篇技术博客 🚀\u003c/p\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-cpp\" data-lang=\"cpp\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#75715e\"\u003e#include\u003c/span\u003e \u003cspan style=\"color:#75715e\"\u003e\u0026lt;iostream\u0026gt;\u003c/span\u003e\u003cspan style=\"color:#75715e\"\u003e\n\u003c/span\u003e\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#66d9ef\"\u003eint\u003c/span\u003e \u003cspan style=\"color:#a6e22e\"\u003emain\u003c/span\u003e() {\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e std\u003cspan style=\"color:#f92672\"\u003e::\u003c/span\u003ecout \u003cspan style=\"color:#f92672\"\u003e\u0026lt;\u0026lt;\u003c/span\u003e \u003cspan style=\"color:#e6db74\"\u003e\u0026#34;Hello World\u0026#34;\u003c/span\u003e;\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e}\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e","title":"Hello World"}]

public/index.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
22
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
33
<channel>
4-
<title>技术博客</title>
4+
<title>homemoon 的技术博客</title>
55
<link>http://localhost:1313/</link>
6-
<description>Recent content on 技术博客</description>
6+
<description>Recent content on homemoon 的技术博客</description>
77
<generator>Hugo -- 0.154.3</generator>
88
<language>zh-cn</language>
99
<lastBuildDate>Sat, 10 Jan 2026 00:00:00 +0000</lastBuildDate>

public/posts/hello-world/index.html

Lines changed: 80 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
<!DOCTYPE html>
2-
<html lang="en" dir="auto" data-theme="auto">
2+
<html lang="zh" dir="auto" data-theme="auto">
33

44
<head><script src="/livereload.js?mindelay=10&amp;v=2&amp;port=1313&amp;path=livereload" data-no-instant defer></script><meta charset="utf-8">
55
<meta http-equiv="X-UA-Compatible" content="IE=edge">
66
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
7-
<meta name="robots" content="noindex, nofollow">
8-
<title>Hello World | 技术博客</title>
7+
<meta name="robots" content="index, follow">
8+
<title>Hello World | homemoon 的技术博客</title>
99
<meta name="keywords" content="博客, Hugo">
1010
<meta name="description" content="这是我的第一篇技术博客 🚀
1111
#include &lt;iostream&gt;
@@ -23,7 +23,7 @@
2323
<link rel="mask-icon" href="http://localhost:1313/safari-pinned-tab.svg">
2424
<meta name="theme-color" content="#2e2e33">
2525
<meta name="msapplication-TileColor" content="#2e2e33">
26-
<link rel="alternate" hreflang="en" href="http://localhost:1313/posts/hello-world/">
26+
<link rel="alternate" hreflang="zh" href="http://localhost:1313/posts/hello-world/">
2727
<noscript>
2828
<style>
2929
#theme-toggle,
@@ -75,13 +75,83 @@
7575
document.querySelector("html").dataset.theme = 'light';
7676
}
7777

78+
</script><meta property="og:url" content="http://localhost:1313/posts/hello-world/">
79+
<meta property="og:site_name" content="homemoon 的技术博客">
80+
<meta property="og:title" content="Hello World">
81+
<meta property="og:description" content="这是我的第一篇技术博客 🚀
82+
#include &lt;iostream&gt; int main() { std::cout &lt;&lt; &#34;Hello World&#34;; } ">
83+
<meta property="og:locale" content="zh-cn">
84+
<meta property="og:type" content="article">
85+
<meta property="article:section" content="posts">
86+
<meta property="article:published_time" content="2026-01-10T00:00:00+00:00">
87+
<meta property="article:modified_time" content="2026-01-10T00:00:00+00:00">
88+
<meta property="article:tag" content="博客">
89+
<meta property="article:tag" content="Hugo">
90+
<meta name="twitter:card" content="summary">
91+
<meta name="twitter:title" content="Hello World">
92+
<meta name="twitter:description" content="这是我的第一篇技术博客 🚀
93+
#include &lt;iostream&gt;
94+
int main() {
95+
std::cout &lt;&lt; &#34;Hello World&#34;;
96+
}
97+
">
98+
99+
100+
<script type="application/ld+json">
101+
{
102+
"@context": "https://schema.org",
103+
"@type": "BreadcrumbList",
104+
"itemListElement": [
105+
{
106+
"@type": "ListItem",
107+
"position": 1 ,
108+
"name": "Posts",
109+
"item": "http://localhost:1313/posts/"
110+
},
111+
{
112+
"@type": "ListItem",
113+
"position": 2 ,
114+
"name": "Hello World",
115+
"item": "http://localhost:1313/posts/hello-world/"
116+
}
117+
]
118+
}
119+
</script>
120+
<script type="application/ld+json">
121+
{
122+
"@context": "https://schema.org",
123+
"@type": "BlogPosting",
124+
"headline": "Hello World",
125+
"name": "Hello World",
126+
"description": "这是我的第一篇技术博客 🚀\n#include \u0026lt;iostream\u0026gt; int main() { std::cout \u0026lt;\u0026lt; \u0026#34;Hello World\u0026#34;; } ",
127+
"keywords": [
128+
"博客", "Hugo"
129+
],
130+
"articleBody": "这是我的第一篇技术博客 🚀\n#include int main() { std::cout \u003c\u003c \"Hello World\"; } ",
131+
"wordCount" : "22",
132+
"inLanguage": "zh",
133+
"datePublished": "2026-01-10T00:00:00Z",
134+
"dateModified": "2026-01-10T00:00:00Z",
135+
"mainEntityOfPage": {
136+
"@type": "WebPage",
137+
"@id": "http://localhost:1313/posts/hello-world/"
138+
},
139+
"publisher": {
140+
"@type": "Organization",
141+
"name": "homemoon 的技术博客",
142+
"logo": {
143+
"@type": "ImageObject",
144+
"url": "http://localhost:1313/favicon.ico"
145+
}
146+
}
147+
}
78148
</script>
79149
</head>
80150
<body id="top">
81151
<header class="header">
82152
<nav class="nav">
83153
<div class="logo">
84-
<a href="http://localhost:1313/" accesskey="h" title="技术博客 (Alt + H)">技术博客</a>
154+
<a href="http://localhost:1313/" accesskey="h" title="homemoon 的技术博客 (Alt + H)">homemoon 的技术博客</a>
85155
<div class="logo-switches">
86156
<button id="theme-toggle" accesskey="t" title="(Alt + T)" aria-label="Toggle theme">
87157
<svg id="moon" xmlns="http://www.w3.org/2000/svg" width="24" height="18" viewBox="0 0 24 24"
@@ -117,7 +187,7 @@
117187
<h1 class="post-title entry-hint-parent">
118188
Hello World
119189
</h1>
120-
<div class="post-meta"><span title='2026-01-10 00:00:00 +0000 UTC'>January 10, 2026</span>&nbsp;·&nbsp;<span>1 min</span>
190+
<div class="post-meta"><span title='2026-01-10 00:00:00 +0000 UTC'>2026-01-10</span>&nbsp;·&nbsp;<span>1 分钟</span>&nbsp;·&nbsp;<span>22 字</span>
121191

122192
</div>
123193
</header>
@@ -141,7 +211,7 @@ <h1 class="post-title entry-hint-parent">
141211
</main>
142212

143213
<footer class="footer">
144-
<span>&copy; 2026 <a href="http://localhost:1313/">技术博客</a></span> ·
214+
<span>&copy; 2026 <a href="http://localhost:1313/">homemoon 的技术博客</a></span> ·
145215

146216
<span>
147217
Powered by
@@ -221,12 +291,12 @@ <h1 class="post-title entry-hint-parent">
221291

222292
const copybutton = document.createElement('button');
223293
copybutton.classList.add('copy-code');
224-
copybutton.innerHTML = 'copy';
294+
copybutton.innerHTML = '复制';
225295

226296
function copyingDone() {
227-
copybutton.innerHTML = 'copied!';
297+
copybutton.innerHTML = '已复制!';
228298
setTimeout(() => {
229-
copybutton.innerHTML = 'copy';
299+
copybutton.innerHTML = '复制';
230300
}, 2000);
231301
}
232302

0 commit comments

Comments
 (0)