evannotfound / vercount Goto Github PK
View Code? Open in Web Editor NEWBusuanzi Compatible Website Counter Powered by Vercel + Redis
Home Page: https://vercount.one
Busuanzi Compatible Website Counter Powered by Vercel + Redis
Home Page: https://vercount.one
这两行重复了 :)
vercount/public/home-carrd.html
Lines 250 to 251 in 026ca00
我的博客是hexo 和 fluid 主题搭建的, fluid主题支持不蒜子,开启下就行,不用编辑代码。
因为不蒜子有移动端的问题,我转成了vercount,不过有些麻烦:
_config.fluid.yml
(加上?i=
以忽略fluid在后面添加的部分): # busuanzi: https://busuanzi.ibruce.info/busuanzi/2.3/
busuanzi: https://cn.vercount.one/js?i=
themes/fluid/layout/_partial/scripts.ejs
, 加了段script:<% if ((theme.footer.statistics.enable && theme.footer.statistics.source === 'busuanzi')
|| (page.meta !== false && theme.post.meta.views.enable && theme.post.meta.views.source === 'busuanzi')) { %>
<script>
function observeAndDisplay(sourceId, targetId) {
if (document.getElementById(sourceId)) {
new MutationObserver(m => {
m.forEach(m => {
if (m.target.textContent.trim() !== '') {
document.getElementById(targetId).style.display = 'inline';
}
});
})
.observe(
document.getElementById(sourceId),
{ childList: true, characterData: true, subtree: true }
);
}
}
observeAndDisplay('busuanzi_value_page_pv', 'busuanzi_container_page_pv');
observeAndDisplay('busuanzi_value_site_pv', 'busuanzi_container_site_pv');
observeAndDisplay('busuanzi_value_site_uv', 'busuanzi_container_site_uv');
</script>
<%- js_ex(theme.static_prefix.busuanzi, 'busuanzi.pure.mini.js', 'defer') %>
<% } %>
可以考虑添加进各个hexo主题,改成用vercount统计不用这么麻烦
推荐出一个自有服务器部署方案
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.