简介#
Blowfish 添加了对 Firebase 的支持以在网站上使用动态数据.
配置方法#
在
Firebase 官网免费注册一个账号
选择「添加项目」,输入项目名





<script> 标记」, 并记录下 config 数据,如黄框所示
config/_default/params.toml 文件中将上一步中的配置变量覆盖原配置
# 实例,请替换为自己的数据
[firebase]
apiKey: "AIzaSyB5tqlqDky77Vb4Tc4apiHV4hRZI18KGiY",
authDomain: "blowfish-21fff.firebaseapp.com",
projectId: "blowfish-21fff",
storageBucket: "blowfish-21fff.appspot.com",
messagingSenderId: "60108104191",
appId: "1:60108104191:web:039842ebe1370698b487ca",
measurementId: "G-PEDMYR1V0K"配置 Authentication
在「项目首页」或「侧边栏」中选择 Authentication






rules_version = '2';
service cloud.firestore {
match /databases/{database}/documents {
match /{document=**} {
allow read, write: if request.auth != null;
}
}
}如果你之前已经将 showViews 和 showLikes 设置为 true 的话, 现在阅读量和点赞量应该可以正常显示了.