Thanks. I will look into how to create a Discourse plugin and how Ruby works!
In general, though, will I have to replace the whole method, and look out for relevant changes on every Discourse upgrade?
…
Creating a plugin seems like something I won’t have time for in the short term. What would happen if I found the relevant file in my Discourse installation and just commented out these lines each time I upgrade?
if opts[:twitter_summary_large_image].present?
result << tag(:meta, name: 'twitter:card', content: "summary_large_image")
result << tag(:meta, name: "twitter:image", content: opts[:twitter_summary_large_image])
elsif opts[:image].present?
result << tag(:meta, name: 'twitter:card', content: "summary")
result << tag(:meta, name: "twitter:image", content: opts[:image])
else
result << tag(:meta, name: 'twitter:card', content: "summary")
end