Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

能否考虑为卜算子的统计添加手动初始化的功能 #716

Closed
clwater opened this issue Nov 25, 2021 · 4 comments
Closed

能否考虑为卜算子的统计添加手动初始化的功能 #716

clwater opened this issue Nov 25, 2021 · 4 comments

Comments

@clwater
Copy link

clwater commented Nov 25, 2021

此处的数据由于卜算子一直没有登录的功能, 导致数据不能自定义
image

之前使用的next的主题, 通过修改swig内的文件进行了手动的初始化情况,

image

pug个人能力无法修改

ps: 还涉及到域名的迁移, 不知能否支持不同域名下的不同初始化情况

@jerryc127
Copy link
Owner

卜算子就只是引用它的js而已
访问人数由卜算子根据域名返回。。
怎么进行初始化?

你想要初始化可能需要去联系 卜算子 作者了

@clwater
Copy link
Author

clwater commented Nov 25, 2021

@jerryc127

card_webinfo.pug中是进行显示的部分, 能否在_config.yml中添加初始化的配置项, 再在card_webinfo.pug中显示的时候先将获取_config.yml的配置项并合并, 计算结果后再显示,

对pug不是很熟悉, 不知道这些的操作理论上是否可行

@jerryc127
Copy link
Owner

你这种操作只能通过js解决
既然js 那使用pug还是swig都没啥影响

pug 的 script 写法

script.
    你的script代码

你可以在 script 代码里获取 配置文件的内容

!{xxxxxx}

例如你在配置文件添加 bushuangzi_limit
那在 script 里获取 !{theme.bushuangzi_limit}

DIY 问题自己解决
我只提供思路

@clwater
Copy link
Author

clwater commented Nov 26, 2021

好的 已经实现了

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants