Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/l33z22l11/giscus-theme-with-font
Default theme with various fonts for Giscus.
https://github.com/l33z22l11/giscus-theme-with-font
giscus theme
Last synced: 19 days ago
JSON representation
Default theme with various fonts for Giscus.
- Host: GitHub
- URL: https://github.com/l33z22l11/giscus-theme-with-font
- Owner: L33Z22L11
- License: mit
- Created: 2024-02-06T13:13:12.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2024-04-17T04:37:39.000Z (9 months ago)
- Last Synced: 2024-11-02T03:23:44.902Z (2 months ago)
- Topics: giscus, theme
- Language: CSS
- Homepage:
- Size: 5.86 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Giscus Theme / Giscus 主题
This repository provides custom CSS for the Giscus comment system's `data-theme` field.
该存储库提供了用于 Giscus 评论系统的 `data-theme` 字段的自定义 CSS。
## Font Themes / 字体主题
For more detailed instructions, please refer to the [ADVANCED-USAGE.md](https://github.com/giscus/giscus/blob/main/ADVANCED-USAGE.md#data-theme) file in the [giscus](https://github.com/giscus/giscus) repository.
有关更详细的说明,请参阅 [giscus](https://github.com/giscus/giscus) 存储库中的 [ADVANCED-USAGE.md](https://github.com/giscus/giscus/blob/main/ADVANCED-USAGE.md#data-theme) 文件。
To use a custom font theme, configure the `data-theme` field in Giscus with one of the following links:
要使用自定义字体主题,请在 Giscus 中的 `data-theme` 字段中配置以下链接之一:
### LXGW-wenkai / 霞鹜文楷
Use the following CSS file for the LXGW-wenkai font theme:
使用以下 CSS 文件作为 LXGW-wenkai 字体主题:
https://cdn.jsdelivr.net/gh/L33Z22L11/giscus-theme/lxgw-wenkai.css
### HarmonyOS Sans / 鸿蒙字体
Use the following CSS file for the HarmonyOS Sans font theme:
使用以下 CSS 文件作为 HarmonyOS Sans 字体主题:
https://cdn.jsdelivr.net/gh/L33Z22L11/giscus-theme/harmonyos-sans.css
> [!TIP]
> You can also replace the domain with `fastly.jsdelivr.net`, `gcore.jsdelivr.net`, or other alternatives.
>
> 您还可以将域名替换为 `fastly.jsdelivr.net`、`gcore.jsdelivr.net` 或其他可用的选项。## Usage / 使用方法
If your Hexo theme (e.g. [Stellar](https://github.com/xaoxuu/hexo-theme-stellar)) supports Giscus, you can configure Giscus with a font theme using a configuration similar to the following:
如果您的 Hexo 主题(如 [Stellar](https://github.com/xaoxuu/hexo-theme-stellar))支持 Giscus,则可以使用类似以下配置的方式配置 Giscus 的字体主题:
```yaml
comments:
service: giscus
giscus:
data-repo: #
data-category: #
data-theme: https://cdn.jsdelivr.net/gh/L33Z22L11/giscus-theme/lxgw-wenkai.css
```Otherwise, add the following JavaScript code to your web page:
否则,将以下 JavaScript 代码添加到您的网页中:
```html
```
Please note that you need to replace the placeholders `[在此输入仓库]` and `[在此输入分类名]` with the appropriate values for your repository and category.
请注意,您需要将 `[在此输入仓库]` 和 `[在此输入分类名]` 的占位符替换为您的存储库和分类的正确值。
This will enable Giscus with the specified font theme on your website.
这将在您的网站上启用使用指定字体主题的 Giscus。