Change title in head section for specific category


(Mathieu Menut) #1

Hello there,

I’m trying to do something by creating a plugin but I have problems to find the best way to.

I have on my Discourse instance a specific category for which I want to change the in the head section.
I need all titles on this category to be transformed by "some text :" + title when rendering.

I do not need to change title in database or something like this because the title in h1 is the good one. Just need to do what I explained.

Can someone guide me?
Thanks by advance.


(Vinoth Kannan) #2

“some text :” is static text? If yes, then you can use CSS like below

.category-dev h1:before {
    content: "some text : ";
}

In above replace dev with your category slug.

Do you mean in <head> tag? Then you may need to use either Theme Components or Plugins.


(Mathieu Menut) #3

Thanks for your answer.

Like I said, I mean in tag yes.
This is why I need to build a plugin to do this.


(Mathieu Menut) #4

Anyone can help me with this?