Personalize Meta for Social Sharing

Hi! I have been searching ways to customize Meta Tags for Social Sharing.

Here is an example, so to context:

  • Title: ‘Macro’
  • First post: ‘Este tópico …’

What I was looking for was a way to perform og:title and twitter:title meta tags. This way I would like to customize texts like the title to 'Felipe on Discourse - Macro’

Thoughts: I think It’ll be some workaround over plugin, to customize app/views like _head.html.erb

Could you help me ?

Regards,

This tags are set here in core Discourse:

https://github.com/discourse/discourse/blob/721ee3642558d960db9345c6238a457aa7f5d674/app/helpers/application_helper.rb#L214

A plugin can change the behavior of it.

6 Likes

Yooooo! Thank you Falco! That’s it!

In plugin, I got through evaluation of ApplicationHelper, like (in case anyone needs):

after_initialize do 
   ApplicationHelper.class_eval do
      def crawlable_meta_data(opts = nil)
       ...

Appreciate your help!

4 Likes