Skip to content

Commit

Permalink
support comment
Browse files Browse the repository at this point in the history
  • Loading branch information
MoonOld committed Apr 7, 2023
1 parent 07816be commit c0db5d3
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 8 deletions.
1 change: 0 additions & 1 deletion config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,6 @@ theme = "FixIt"
categoryId = "DIC_kwDOJGe7Zc4CVm_a"
mapping = "pathname"
strict = "0" # FixIt 0.2.18 | 新增
term = ""
reactionsEnabled = "1"
emitMetadata = "0"
inputPosition = "top" # ["top", "bottom"]
Expand Down
16 changes: 14 additions & 2 deletions content/env_building/Hugo搭建个人博客.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: "使用Hugo搭建Fix it主题博客"
subtitle: "记录搭建这个博客过程的一些细节和坑点"
draft: true
draft: false
descriprion: this is a test md
date: 2023-03-06T23:55:17+08:00
type : posts
Expand Down Expand Up @@ -331,7 +331,19 @@ lightgallery : true
具体配置可以查看[Hugo官网链接](https://gohugo.io/content-management/front-matter/)或者开头提到的FixIt文档,或者你自己选择的那个主题所提供的文档去详细参阅。我个人其实比较推荐,去看一下总体提供什么功能,自己用到的时候能知道有什么自己需要的,再去详细查看即可。以下收集一些自己用到的Option。

* lightgallery true可以在外面显示avatar
* hugo summary默认截取前70个字符进行摘要显示(在home),或者以```<!--more-->```来标记之前的内容形成摘要。
* hugo summary默认截取前70个字符进行摘要显示(在home),或者以 ***<\!--more-->*** 来标记之前的内容形成摘要。

## 评论系统
一般Hugo主题都会提供评论系统的支持。以我选择的Fixit主题为例,可以在```params.page.comment```中进行评论系统的配置。

主流的评论系统giscus\utterancs\commento等。giscus通过github repo的discussions获取评论数据,所以在github page上可以非常简单的应用。下面以选择giscus进行配置为例,可以大致列出流程。
* 在Github Settings里中的Applications进行giscus的安装
* 在Settings中进入giscus应用的配置页面,将目标仓库的访问权限给予giscus
* 为目标仓库开启discussions模块
*[giscus网站](https://giscus.app/zh-CN)上获取配置,在这里可以顺便检测自己仓库是否可以用来使用giscus
* 将最后生成的配置填入自己主题的config选项中,包括mapping、repo、category等配置

需要注意Front Matter中有```comment:```选项,此项为false时禁用评论系统。

## 踩坑点记录
* 用edge没有正确显示icon,调试了很多次才发现。最后决定一直用chrome了
Expand Down
1 change: 0 additions & 1 deletion content/posts/cpu/BranchPrediction.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ draft: false
type: posts
description: 记录水群中学到的一个CPU机制
keywords: CPU
comment: false
tags:
- CPU
- 分支预测
Expand Down
1 change: 0 additions & 1 deletion content/posts/lab/rcore/record.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ date: 2023-04-04T12:11:16+08:00
draft: false
description: 记录一下自己的留级rcore
keywords:
comment: false
tags:
- rust
- os
Expand Down
3 changes: 1 addition & 2 deletions content/posts/lab/rcore/rustlings.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ subtitle: 将做Rustlings过程中觉得疑惑或者有趣的地方单独列出
date: 2023-04-07T14:03:22+08:00
draft: false
description: 将做Rustlings过程中觉得疑惑或者有趣的地方单独列出来
keywords:
comment: false
keywords: rust
tags:
- Rust
categories:
Expand Down
2 changes: 1 addition & 1 deletion content/posts/music/吉他指弹记录.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ title: "吉他指弹记录"
subtitle: "记录练习和弹奏过程中的一些体验和细节"
date: 2023-03-07T09:45:41+08:00
draft: false
descriprion: 记录练习和弹奏过程中的一些体验和细节
description: 记录练习和弹奏过程中的一些体验和细节
keywords: 指弹
tags:
- 吉他
Expand Down

0 comments on commit c0db5d3

Please sign in to comment.