Extract tags from a blog post list as an array of sorted and unique tags.
const tags = allPosts .reduce( (acc, post) => Array.from(new Set([...acc, ...post.tags])), [], ) .sort();