TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Adding view count and like button to 11ty

14 点作者 chilling11 个月前

3 条评论

bastawhiz11 个月前
The HSET calls are not just unnecessary, they're a bug. It introduces the possibility of a race condition where a view or like happens between the HGET and HSET. HSETing the values to zero doesn't actually make anything faster or more correct, it just introduces the possibility of overwriting a value that came in moments ago.
评论 #40772431 未加载
jsheard11 个月前
There doesn't seem to be a limit to how many times a reader can smash that like button, which brings a new degree of expression to smashing that like. You can smash that like 10 times the article was good, 100 times if it was amazing, or 100 million times if you hated it and want the author to be bankrupted by their Vercel bill.
评论 #40771554 未加载
评论 #40772424 未加载
d3v1an711 个月前
Only semi-related, I have also found the 11ty docs lacking from time to time, but don’t really have a great idea in my head about what good docs look like vs bad ones.<p>If you have a moment, I’d love to hear why you think these are exceptionally bad docs, and some examples or thoughts on what you feel are excellent docs!<p>We use and financially support 11ty at work, so if it’s something I can manage, I’d like to help make the docs better over time.
评论 #40774613 未加载