Skip to content

自定义样式怎么在本地调试? #1406

Closed Answered by zhenyou-nide
ymc0182 asked this question in Q&A
Discussion options

You must be logged in to vote

一个思路是:
css 文件放在 public 下,data-theme={location.origin + '/custom.css'}

repo root 下添加 giscus.json ,

{
  "origins": ["https://giscus.app"], // 这里可以写你生产的地址
  "originsRegex": ["http://localhost:[0-9]+"] // 这里把你本地环境的 origin 列入
}

详细示例:https://github.com/giscus/giscus/blob/main/giscus.json

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by ymc0182
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants