TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Adding view count and like button to 11ty

14 pointsby chilling11 months ago

3 comments

bastawhiz11 months ago
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 months ago
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 months ago
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 未加载