Can we display category in page title?


(Daniel) #1

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


(Jeff Atwood) #2

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


(Daniel) #3

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


(Jeff Atwood) #4

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


(Daniel) #5

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


(Robin Ward) #6

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


(Jeff Atwood) #7

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

Topic title - Category name / Subcategory name - Discourse title


(Robin Ward) #8

OK

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


(Jeff Atwood) #9