Can we display category in page title?

AI-generated summary

Users are discussing the possibility of adding the category to the page title on Discourse. danwad suggests this would be helpful in search results, and recommends placing the category after the topic title for consistency. codinghorror inquires about the desired order, and danwad and eviltrout agree that the category should not be first. codinghorror decides to add the category and subcategory to the end of the title, and eviltrout implements the change with a commit to the Discourse GitHub repository.

I find that the category is part of the context which is often required to fully understand what a topic title means.

Is it possible to add the category to the page title? I think it would be useful in search results (as in Google, not Discourse’s built-in search).

Cheers,
Dan

Where do you think it should appear? Before or after the topic in the title tag?

Don’t think it’s super important but I would say after, just for consistency - keeping the elements in order of specificity.

Topic title - Category name - Discourse title

Well right now if you view source you can see the <title> of this page, for example, has

Can we display category in page title? - Discourse Meta

So should that become

Can we display category in page title? - Support - Discourse Meta

or

Support - Can we display category in page title? - Discourse Meta

As the category is the 2nd most/least specific term out of it, the forum name and the topic, I’d just slot it in the middle.

Topic title - Category name - Discourse title

Can we display category in page title? - Support - Discourse Meta

1 Mi Piace

It definitely should not be first. I keep my tabs pretty small and the title of the topic is much more important than the category.

I’m happy to make this change, should take 5 mins or so, just say the word @codinghorror

1 Mi Piace

Yeah probably fine, add category / subcategory to the end ala:

Topic title - Category name / Subcategory name - Discourse title

2 Mi Piace

OK

https://github.com/discourse/discourse/commit/2b2837fa12744cab330c2f1334d82854544774e5

3 Mi Piace