====== KeyWords Plugin ======
---- plugin ----
description: Adds keywords to the page meta header
author : i-net /// software GmbH; Ilya Lebedev
email : tools@inetsoftware.de; ilya@lebedev.net
type : Action, Syntax
lastupdate : 2023-06-19
compatible : 2014-05-05+, Binky, 2007-06-03
depends :
conflicts :
similar : meta
tags : meta search seo
downloadurl: https://github.com/i-net-software/dokuwiki-plugin-keywords/zipball/master
bugtracker : https://github.com/i-net-software/dokuwiki-plugin-keywords/issues
sourcerepo : https://github.com/i-net-software/dokuwiki-plugin-keywords/
donationurl:
screenshot_img :
----
This plugin adds page keywords to the meta header, used by the web crawlers for the page indexing and categorization.
===== Syntax =====
{{keywords>art in the park,Sheffield,urban,street,creative}}
===== Installation =====
Search and install the plugin using the [[plugin:extension|Extension Manager]]. Refer to [[:Plugins]] on how to install plugins manually.
===== Change Log =====
{{rss>https://github.com/i-net-software/dokuwiki-plugin-keywords/commits/master.atom date}}
===== Discussion =====
> Installing this plugin in Dokuwiki 2018-04-22b "Greebo" gives so me **warning messages** like this:
This is fixed in the current release --- [[user>gamma|gamma]] //2020-08-04 14:25//
Warning: Declaration of action_plugin_keywords::register(&$controller) should
be compatible with DokuWiki_Action_Plugin::register(Doku_Event_Handler $controller)
in /web/htdocs/www.rigacci.net/home/wiki/lib/plugins/keywords/action.php on line 65
Adding the proper variable declaration, seems to fix the problem allowing the plugin to work.
--- [[user>Rigacci.Org|Rigacci.Org]] //2019-02-01 10:44//
----
Hi, Can I have some help on how to use this plugin?
Can this be used for assigning keywords to headlines in a page, and then 'reproduce' these headlines when I performed the search using the keyword assigned to the headlines?
It works. Very useful, thank you.
>Hi. Cannot download keywords.zip.
>Has location changed?
Nope, everything works pretty fine. --- //[[ilya@lebedev.net|Ilya Lebedev]] 2008/11/07 11:37//
> Well, now I can download. But this zip contains nothing.
It's really strange, but for me it contains the plugin.
> Hello Ilya. I got it now and it works fine. Probably the server was down or cache problem.
> I have read in [[http://de.selfhtml.org/index.htm|SelfHtml]] that a keyword
> may contain more than one word, e.g.: content="nice film, horses, salt and pepper" />
> To accomplish this I have tried a little change in keywords.php:
> before: $renderer->meta['keywords'] = ",".join(",",$data);
> after: $renderer->meta['keywords'] = ",".join(" ",$data);
>
> Do you think it is wise and ok? ---// Jorge from Germany //
>
>> This change seems a bit strange, because you just make a single "phrase" from the bunch of keywords. Probably it would be better skipping keywords explosion at all: ''%%{{keywords>nice film, horses, salt and pepper}}%%'' --- //[[ilya@lebedev.net|Ilya Lebedev]] 2008/11/07 17:21//
>
>>>I am not sure what you mean with explosion. Of course there should not be too much keywords.
>>>Here is another example:
>>> ''%%{{keywords>Vladimir Putin,Moskow}}%%''
>>> old way results in: ...content="Vladimir,Putin,Moskow"
>>>
>>> ''%%{{keywords>Vladimir Putin,Moskow}}%%''
>>> new way results in: ...content="Vladimir Putin,Moskow"
>>>---// Jorge from Germany //
>>>>You've modified plugin code, by changing join symbol from comma to space. I suggest you removing ''join'' and corresponding ''explode'' at all.
>>>> before: ''%%$renderer->meta['keywords'] = ",".join(",",$data);%%''
>>>> after: ''%%$renderer->meta['keywords'] = ",".$data;%%''
>>>> before: ''%%return explode(" ",preg_replace("/{{keywords>(.*?)}}/","\\1",$match));%%''
>>>> after: ''%%return preg_replace("/{{keywords>(.*?)}}/","\\1",$match);%%''
>>>> --- //[[ilya@lebedev.net|Ilya Lebedev]] 2008/11/10 07:03//
>>>>> Ok, Ilya. Now it gives the results as desired and you have given
>>>>> the safer code. Thank You!
>>>>> ---// Jorge //
>This is a great plugin, thanks Jorge!
Здравствуйте, Илья!
Я пока плохо во всём этом разбираюсь. Скажите, пожалуйста, куда надо эту строку с keyword вставлять? В любую часть текста?
С уважением, Андреев Александр.