mirror of
https://github.com/ChenQihan666/MyBlog-Next.git
synced 2026-08-14 07:33:07 +08:00
d383439c4e
* refactor: getUniqueTags should perform conversions exactly once per tag Previously, the `forEach` loop was spreading the tags list and updating it on every iteration. So for every post, the slugify operation was happening on previously converted data again. Similarly, the last filter operation to remove duplicates was repeated for every post (`O(N * log N)`) instead of checking once at the end (`O(N)`). * feat: Sort the tags in ascending order (lexicographic) As per feedback from: https://github.com/satnaing/astro-paper/pull/78#issuecomment-1593979458