自定义样式怎么在本地调试? #1406
自定义样式怎么在本地调试?
#1406
-
配置css链接必须是线上的吗?我引入本地文件不生效,怎么在本地调试样式? |
Beta Was this translation helpful? Give feedback.
Answered by
zhenyou-nide
Jul 22, 2024
Replies: 2 comments
-
一个思路是: repo root 下添加 giscus.json , {
"origins": ["https://giscus.app"], // 这里可以写你生产的地址
"originsRegex": ["http://localhost:[0-9]+"] // 这里把你本地环境的 origin 列入
} 详细示例:https://github.com/giscus/giscus/blob/main/giscus.json |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
ymc0182
-
在public下新建css文件giscus.css,引入http://localhost:1234/giscus.css 直接引入./discus。css 不生效 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
一个思路是:
css 文件放在 public 下,
data-theme={location.origin + '/custom.css'}
repo root 下添加 giscus.json ,
详细示例:https://github.com/giscus/giscus/blob/main/giscus.json