Skip to content

Commit

Permalink
添加评论支持
Browse files Browse the repository at this point in the history
  • Loading branch information
fenghui2.xu committed Jul 17, 2024
1 parent 841bb07 commit ff1919f
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 8 deletions.
13 changes: 12 additions & 1 deletion content/about.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
+++
title = 'About'
title = '关于'
date = 2024-07-10T14:14:26+08:00
draft = false
+++
Expand All @@ -8,3 +8,14 @@ draft = false
a->b:
```

```csharp
System.Console.WriteLine("Hello World!");
```

```c
printf("Hello World!");
```
```java
System.out.println("Hello World!");
```
4 changes: 3 additions & 1 deletion hugo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,12 @@ baseURL = 'https://misaya.github.io'
languageCode = 'zh-cn'
title = '内观自在'
theme = 'hyde'
disqusShortname = 'on'

[params]
description = '观心无心,心空境寂'
copyright = 'Copyright © 2024 内观自在'
copyright = 'Copyright © 2024 Misaya'
codeLineNumbers = true

[Menus]
main = [
Expand Down
9 changes: 3 additions & 6 deletions themes/hyde/layouts/_default/single.html
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
{{ define "main" -}}
<div class="post">
<h1>{{ .Title }}</h1>
<time datetime={{ .Date.Format "2006-01-02T15:04:05Z0700" }} class="post-date">{{ .Date.Format "Mon, Jan 2, 2006" }}</time>
<time datetime={{ .Date.Format "2006-01-02T15:04:05Z0700" }} class="post-date">{{ .Date.Format "Mon, Jan 2, 2006"
}}</time>
{{ .Content }}
</div>

{{ if .Site.DisqusShortname -}}
<h2>Comments</h2>
{{ template "_internal/disqus.html" . }}
{{- end }}
{{- end }}
{{- end }}
8 changes: 8 additions & 0 deletions themes/hyde/layouts/_internal/disqus.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<di style="border-top: 1px solid rgba(0, 0, 0, 0.1);width: 100%;">
hello world!
<script src="https://giscus.app/client.js" data-repo="misaya/misaya.github.io" data-repo-id="R_kgDOMXa6GA"
data-category="Announcements" data-category-id="DIC_kwDOMXa6GM4Cg2lV" data-mapping="url" data-strict="1"
data-reactions-enabled="1" data-emit-metadata="0" data-input-position="bottom"
data-theme="preferred_color_scheme" data-lang="zh-CN" data-loading="lazy" crossorigin="anonymous" async>
</script>
</di>

0 comments on commit ff1919f

Please sign in to comment.