Noticed that Discourse does not use "meta keyword" and probably with good reason since this meta "keyword" tag is considered obsolete and not a used SEO signal by Google.
However, it never hurts to have this meta tag and I have been considering to add this kind of code to our Discourse layout to extract keywords from the posts and create a meta keyword tag, just because we can and why not?
require 'rake_text'
rake = RakeText.new, RakeText.SMART
text = "dkjflksdajfl fdfsd dsss dd dfsdf dssls slslls sssl The dependency tzinfo-data (>= 0) will be unused by any of the platforms Bundler is installing for. Bundler i
installing for ruby but the dependency is only for x86-mingw32, x86-mswin32, x64-mingw32, java. To add those platforms to the bundle, run `bundle lock --add-platform x86-mingw32 x86
mswin32 x64-mingw32 java`"
raw = rake.analyse text, RakeText.SMART
arr = []
raw.each do |word, score|
arr << word if ((score > 3) && (score < 10))
end
meta_keys = arr.join(",")
meta_keys
=> "dependency tzinfo-data,x86-mingw32,x64-mingw32,java,bundle"
See Also:
https://rubygems.org/gems/rake_text/versions/0.0.1
Frankly, I have not decided if I will migrate this code fragment into a Discourse plugin, but I may do so for fun and add this meta keyword tag back into the site.
I may add this to my "under construction" plugin for Discourse I am calling "discourse-selfish-seo-layout-changes" for now: