Differentiating tags in search results

Hey. I’m using tags + algolia search for a hugo site and a small but annoying problem I have is that when you search, the tags populate indiscriminately along with full articles. so it could look like this:

  • apples
  • How to Pick Apples
    • Snippet here from the article…
  • How to Wash Apples
    • Snippet here from the article…
  • baking
  • low carb

I would prefer to be able to visually distinguish between them better in some way, like this:

  • #apples
  • How to Pick Apples
    • Snippet here from the article…
  • How to Wash Apples
    • Snippet here from the article…
  • #baking
  • #low carb

but it won’t publish tag pages like this because the /tags/#apples/_index.html has a # in it.

Is there a recommended way to do this?

You need to differentiate between slug (apples) and title (#apples) or even linktitle (#apples, with title being for instance “Apple Variants”).

Hugo can do that, but you need to post more details, like your algolia.json file and your content structure.

There is no “recommended” way for search as this is an external feature. But using Algolia I am pretty sure it’s possible to somehow “format” results independent from your content setup.